// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.network.inputs;

import com.pulumi.azure.network.inputs.ApplicationGatewayProbeMatchArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ApplicationGatewayProbeArgs extends com.pulumi.resources.ResourceArgs {

    public static final ApplicationGatewayProbeArgs Empty = new ApplicationGatewayProbeArgs();

    /**
     * The Hostname used for this Probe. If the Application Gateway is configured for a single site, by default the Host name should be specified as `127.0.0.1`, unless otherwise configured in custom probe. Cannot be set if `pick_host_name_from_backend_http_settings` is set to `true`.
     * 
     */
    @Import(name="host")
    private @Nullable Output<String> host;

    /**
     * @return The Hostname used for this Probe. If the Application Gateway is configured for a single site, by default the Host name should be specified as `127.0.0.1`, unless otherwise configured in custom probe. Cannot be set if `pick_host_name_from_backend_http_settings` is set to `true`.
     * 
     */
    public Optional<Output<String>> host() {
        return Optional.ofNullable(this.host);
    }

    /**
     * The ID of the Rewrite Rule Set
     * 
     */
    @Import(name="id")
    private @Nullable Output<String> id;

    /**
     * @return The ID of the Rewrite Rule Set
     * 
     */
    public Optional<Output<String>> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The Interval between two consecutive probes in seconds. Possible values range from 1 second to a maximum of 86,400 seconds.
     * 
     */
    @Import(name="interval", required=true)
    private Output<Integer> interval;

    /**
     * @return The Interval between two consecutive probes in seconds. Possible values range from 1 second to a maximum of 86,400 seconds.
     * 
     */
    public Output<Integer> interval() {
        return this.interval;
    }

    /**
     * A `match` block as defined above.
     * 
     */
    @Import(name="match")
    private @Nullable Output<ApplicationGatewayProbeMatchArgs> match;

    /**
     * @return A `match` block as defined above.
     * 
     */
    public Optional<Output<ApplicationGatewayProbeMatchArgs>> match() {
        return Optional.ofNullable(this.match);
    }

    /**
     * The minimum number of servers that are always marked as healthy. Defaults to `0`.
     * 
     */
    @Import(name="minimumServers")
    private @Nullable Output<Integer> minimumServers;

    /**
     * @return The minimum number of servers that are always marked as healthy. Defaults to `0`.
     * 
     */
    public Optional<Output<Integer>> minimumServers() {
        return Optional.ofNullable(this.minimumServers);
    }

    /**
     * The Name of the Probe.
     * 
     */
    @Import(name="name", required=true)
    private Output<String> name;

    /**
     * @return The Name of the Probe.
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    /**
     * The Path used for this Probe.
     * 
     */
    @Import(name="path", required=true)
    private Output<String> path;

    /**
     * @return The Path used for this Probe.
     * 
     */
    public Output<String> path() {
        return this.path;
    }

    /**
     * Whether the host header should be picked from the backend HTTP settings. Defaults to `false`.
     * 
     */
    @Import(name="pickHostNameFromBackendHttpSettings")
    private @Nullable Output<Boolean> pickHostNameFromBackendHttpSettings;

    /**
     * @return Whether the host header should be picked from the backend HTTP settings. Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> pickHostNameFromBackendHttpSettings() {
        return Optional.ofNullable(this.pickHostNameFromBackendHttpSettings);
    }

    /**
     * Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
     * 
     */
    @Import(name="port")
    private @Nullable Output<Integer> port;

    /**
     * @return Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
     * 
     */
    public Optional<Output<Integer>> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * The Protocol used for this Probe. Possible values are `Http` and `Https`.
     * 
     */
    @Import(name="protocol", required=true)
    private Output<String> protocol;

    /**
     * @return The Protocol used for this Probe. Possible values are `Http` and `Https`.
     * 
     */
    public Output<String> protocol() {
        return this.protocol;
    }

    /**
     * The Timeout used for this Probe, which indicates when a probe becomes unhealthy. Possible values range from 1 second to a maximum of 86,400 seconds.
     * 
     */
    @Import(name="timeout", required=true)
    private Output<Integer> timeout;

    /**
     * @return The Timeout used for this Probe, which indicates when a probe becomes unhealthy. Possible values range from 1 second to a maximum of 86,400 seconds.
     * 
     */
    public Output<Integer> timeout() {
        return this.timeout;
    }

    /**
     * The Unhealthy Threshold for this Probe, which indicates the amount of retries which should be attempted before a node is deemed unhealthy. Possible values are from 1 to 20.
     * 
     */
    @Import(name="unhealthyThreshold", required=true)
    private Output<Integer> unhealthyThreshold;

    /**
     * @return The Unhealthy Threshold for this Probe, which indicates the amount of retries which should be attempted before a node is deemed unhealthy. Possible values are from 1 to 20.
     * 
     */
    public Output<Integer> unhealthyThreshold() {
        return this.unhealthyThreshold;
    }

    private ApplicationGatewayProbeArgs() {}

    private ApplicationGatewayProbeArgs(ApplicationGatewayProbeArgs $) {
        this.host = $.host;
        this.id = $.id;
        this.interval = $.interval;
        this.match = $.match;
        this.minimumServers = $.minimumServers;
        this.name = $.name;
        this.path = $.path;
        this.pickHostNameFromBackendHttpSettings = $.pickHostNameFromBackendHttpSettings;
        this.port = $.port;
        this.protocol = $.protocol;
        this.timeout = $.timeout;
        this.unhealthyThreshold = $.unhealthyThreshold;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ApplicationGatewayProbeArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ApplicationGatewayProbeArgs $;

        public Builder() {
            $ = new ApplicationGatewayProbeArgs();
        }

        public Builder(ApplicationGatewayProbeArgs defaults) {
            $ = new ApplicationGatewayProbeArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param host The Hostname used for this Probe. If the Application Gateway is configured for a single site, by default the Host name should be specified as `127.0.0.1`, unless otherwise configured in custom probe. Cannot be set if `pick_host_name_from_backend_http_settings` is set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder host(@Nullable Output<String> host) {
            $.host = host;
            return this;
        }

        /**
         * @param host The Hostname used for this Probe. If the Application Gateway is configured for a single site, by default the Host name should be specified as `127.0.0.1`, unless otherwise configured in custom probe. Cannot be set if `pick_host_name_from_backend_http_settings` is set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder host(String host) {
            return host(Output.of(host));
        }

        /**
         * @param id The ID of the Rewrite Rule Set
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output<String> id) {
            $.id = id;
            return this;
        }

        /**
         * @param id The ID of the Rewrite Rule Set
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param interval The Interval between two consecutive probes in seconds. Possible values range from 1 second to a maximum of 86,400 seconds.
         * 
         * @return builder
         * 
         */
        public Builder interval(Output<Integer> interval) {
            $.interval = interval;
            return this;
        }

        /**
         * @param interval The Interval between two consecutive probes in seconds. Possible values range from 1 second to a maximum of 86,400 seconds.
         * 
         * @return builder
         * 
         */
        public Builder interval(Integer interval) {
            return interval(Output.of(interval));
        }

        /**
         * @param match A `match` block as defined above.
         * 
         * @return builder
         * 
         */
        public Builder match(@Nullable Output<ApplicationGatewayProbeMatchArgs> match) {
            $.match = match;
            return this;
        }

        /**
         * @param match A `match` block as defined above.
         * 
         * @return builder
         * 
         */
        public Builder match(ApplicationGatewayProbeMatchArgs match) {
            return match(Output.of(match));
        }

        /**
         * @param minimumServers The minimum number of servers that are always marked as healthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder minimumServers(@Nullable Output<Integer> minimumServers) {
            $.minimumServers = minimumServers;
            return this;
        }

        /**
         * @param minimumServers The minimum number of servers that are always marked as healthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder minimumServers(Integer minimumServers) {
            return minimumServers(Output.of(minimumServers));
        }

        /**
         * @param name The Name of the Probe.
         * 
         * @return builder
         * 
         */
        public Builder name(Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The Name of the Probe.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param path The Path used for this Probe.
         * 
         * @return builder
         * 
         */
        public Builder path(Output<String> path) {
            $.path = path;
            return this;
        }

        /**
         * @param path The Path used for this Probe.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param pickHostNameFromBackendHttpSettings Whether the host header should be picked from the backend HTTP settings. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder pickHostNameFromBackendHttpSettings(@Nullable Output<Boolean> pickHostNameFromBackendHttpSettings) {
            $.pickHostNameFromBackendHttpSettings = pickHostNameFromBackendHttpSettings;
            return this;
        }

        /**
         * @param pickHostNameFromBackendHttpSettings Whether the host header should be picked from the backend HTTP settings. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder pickHostNameFromBackendHttpSettings(Boolean pickHostNameFromBackendHttpSettings) {
            return pickHostNameFromBackendHttpSettings(Output.of(pickHostNameFromBackendHttpSettings));
        }

        /**
         * @param port Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output<Integer> port) {
            $.port = port;
            return this;
        }

        /**
         * @param port Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param protocol The Protocol used for this Probe. Possible values are `Http` and `Https`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Output<String> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol The Protocol used for this Probe. Possible values are `Http` and `Https`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param timeout The Timeout used for this Probe, which indicates when a probe becomes unhealthy. Possible values range from 1 second to a maximum of 86,400 seconds.
         * 
         * @return builder
         * 
         */
        public Builder timeout(Output<Integer> timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout The Timeout used for this Probe, which indicates when a probe becomes unhealthy. Possible values range from 1 second to a maximum of 86,400 seconds.
         * 
         * @return builder
         * 
         */
        public Builder timeout(Integer timeout) {
            return timeout(Output.of(timeout));
        }

        /**
         * @param unhealthyThreshold The Unhealthy Threshold for this Probe, which indicates the amount of retries which should be attempted before a node is deemed unhealthy. Possible values are from 1 to 20.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThreshold(Output<Integer> unhealthyThreshold) {
            $.unhealthyThreshold = unhealthyThreshold;
            return this;
        }

        /**
         * @param unhealthyThreshold The Unhealthy Threshold for this Probe, which indicates the amount of retries which should be attempted before a node is deemed unhealthy. Possible values are from 1 to 20.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThreshold(Integer unhealthyThreshold) {
            return unhealthyThreshold(Output.of(unhealthyThreshold));
        }

        public ApplicationGatewayProbeArgs build() {
            $.interval = Objects.requireNonNull($.interval, "expected parameter 'interval' to be non-null");
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            $.path = Objects.requireNonNull($.path, "expected parameter 'path' to be non-null");
            $.protocol = Objects.requireNonNull($.protocol, "expected parameter 'protocol' to be non-null");
            $.timeout = Objects.requireNonNull($.timeout, "expected parameter 'timeout' to be non-null");
            $.unhealthyThreshold = Objects.requireNonNull($.unhealthyThreshold, "expected parameter 'unhealthyThreshold' to be non-null");
            return $;
        }
    }

}
