// *** 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.aws.vpclattice.inputs;

import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigHealthCheckMatcherArgs;
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 TargetGroupConfigHealthCheckArgs extends com.pulumi.resources.ResourceArgs {

    public static final TargetGroupConfigHealthCheckArgs Empty = new TargetGroupConfigHealthCheckArgs();

    /**
     * Indicates whether health checking is enabled. Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output<Boolean> enabled;

    /**
     * @return Indicates whether health checking is enabled. Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
     * 
     */
    @Import(name="healthCheckIntervalSeconds")
    private @Nullable Output<Integer> healthCheckIntervalSeconds;

    /**
     * @return The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
     * 
     */
    public Optional<Output<Integer>> healthCheckIntervalSeconds() {
        return Optional.ofNullable(this.healthCheckIntervalSeconds);
    }

    /**
     * The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.
     * * ` healthy_threshold_count  ` - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
     * 
     */
    @Import(name="healthCheckTimeoutSeconds")
    private @Nullable Output<Integer> healthCheckTimeoutSeconds;

    /**
     * @return The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.
     * * ` healthy_threshold_count  ` - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
     * 
     */
    public Optional<Output<Integer>> healthCheckTimeoutSeconds() {
        return Optional.ofNullable(this.healthCheckTimeoutSeconds);
    }

    @Import(name="healthyThresholdCount")
    private @Nullable Output<Integer> healthyThresholdCount;

    public Optional<Output<Integer>> healthyThresholdCount() {
        return Optional.ofNullable(this.healthyThresholdCount);
    }

    /**
     * The codes to use when checking for a successful response from a target. These are called _Success codes_ in the console.
     * 
     */
    @Import(name="matcher")
    private @Nullable Output<TargetGroupConfigHealthCheckMatcherArgs> matcher;

    /**
     * @return The codes to use when checking for a successful response from a target. These are called _Success codes_ in the console.
     * 
     */
    public Optional<Output<TargetGroupConfigHealthCheckMatcherArgs>> matcher() {
        return Optional.ofNullable(this.matcher);
    }

    /**
     * The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is `/`. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
     * 
     */
    @Import(name="path")
    private @Nullable Output<String> path;

    /**
     * @return The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is `/`. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
     * 
     */
    public Optional<Output<String>> path() {
        return Optional.ofNullable(this.path);
    }

    /**
     * The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
     * 
     */
    @Import(name="port")
    private @Nullable Output<Integer> port;

    /**
     * @return The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
     * 
     */
    public Optional<Output<Integer>> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * The protocol used when performing health checks on targets. The possible protocols are `HTTP` and `HTTPS`.
     * 
     */
    @Import(name="protocol")
    private @Nullable Output<String> protocol;

    /**
     * @return The protocol used when performing health checks on targets. The possible protocols are `HTTP` and `HTTPS`.
     * 
     */
    public Optional<Output<String>> protocol() {
        return Optional.ofNullable(this.protocol);
    }

    /**
     * The protocol version used when performing health checks on targets. The possible protocol versions are `HTTP1` and `HTTP2`. The default is `HTTP1`.
     * 
     */
    @Import(name="protocolVersion")
    private @Nullable Output<String> protocolVersion;

    /**
     * @return The protocol version used when performing health checks on targets. The possible protocol versions are `HTTP1` and `HTTP2`. The default is `HTTP1`.
     * 
     */
    public Optional<Output<String>> protocolVersion() {
        return Optional.ofNullable(this.protocolVersion);
    }

    /**
     * The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
     * 
     */
    @Import(name="unhealthyThresholdCount")
    private @Nullable Output<Integer> unhealthyThresholdCount;

    /**
     * @return The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
     * 
     */
    public Optional<Output<Integer>> unhealthyThresholdCount() {
        return Optional.ofNullable(this.unhealthyThresholdCount);
    }

    private TargetGroupConfigHealthCheckArgs() {}

    private TargetGroupConfigHealthCheckArgs(TargetGroupConfigHealthCheckArgs $) {
        this.enabled = $.enabled;
        this.healthCheckIntervalSeconds = $.healthCheckIntervalSeconds;
        this.healthCheckTimeoutSeconds = $.healthCheckTimeoutSeconds;
        this.healthyThresholdCount = $.healthyThresholdCount;
        this.matcher = $.matcher;
        this.path = $.path;
        this.port = $.port;
        this.protocol = $.protocol;
        this.protocolVersion = $.protocolVersion;
        this.unhealthyThresholdCount = $.unhealthyThresholdCount;
    }

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

    public static final class Builder {
        private TargetGroupConfigHealthCheckArgs $;

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

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

        /**
         * @param enabled Indicates whether health checking is enabled. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output<Boolean> enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Indicates whether health checking is enabled. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param healthCheckIntervalSeconds The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
         * 
         * @return builder
         * 
         */
        public Builder healthCheckIntervalSeconds(@Nullable Output<Integer> healthCheckIntervalSeconds) {
            $.healthCheckIntervalSeconds = healthCheckIntervalSeconds;
            return this;
        }

        /**
         * @param healthCheckIntervalSeconds The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
         * 
         * @return builder
         * 
         */
        public Builder healthCheckIntervalSeconds(Integer healthCheckIntervalSeconds) {
            return healthCheckIntervalSeconds(Output.of(healthCheckIntervalSeconds));
        }

        /**
         * @param healthCheckTimeoutSeconds The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.
         * * ` healthy_threshold_count  ` - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
         * 
         * @return builder
         * 
         */
        public Builder healthCheckTimeoutSeconds(@Nullable Output<Integer> healthCheckTimeoutSeconds) {
            $.healthCheckTimeoutSeconds = healthCheckTimeoutSeconds;
            return this;
        }

        /**
         * @param healthCheckTimeoutSeconds The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.
         * * ` healthy_threshold_count  ` - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
         * 
         * @return builder
         * 
         */
        public Builder healthCheckTimeoutSeconds(Integer healthCheckTimeoutSeconds) {
            return healthCheckTimeoutSeconds(Output.of(healthCheckTimeoutSeconds));
        }

        public Builder healthyThresholdCount(@Nullable Output<Integer> healthyThresholdCount) {
            $.healthyThresholdCount = healthyThresholdCount;
            return this;
        }

        public Builder healthyThresholdCount(Integer healthyThresholdCount) {
            return healthyThresholdCount(Output.of(healthyThresholdCount));
        }

        /**
         * @param matcher The codes to use when checking for a successful response from a target. These are called _Success codes_ in the console.
         * 
         * @return builder
         * 
         */
        public Builder matcher(@Nullable Output<TargetGroupConfigHealthCheckMatcherArgs> matcher) {
            $.matcher = matcher;
            return this;
        }

        /**
         * @param matcher The codes to use when checking for a successful response from a target. These are called _Success codes_ in the console.
         * 
         * @return builder
         * 
         */
        public Builder matcher(TargetGroupConfigHealthCheckMatcherArgs matcher) {
            return matcher(Output.of(matcher));
        }

        /**
         * @param path The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is `/`. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output<String> path) {
            $.path = path;
            return this;
        }

        /**
         * @param path The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is `/`. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param port The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output<Integer> port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param protocol The protocol used when performing health checks on targets. The possible protocols are `HTTP` and `HTTPS`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output<String> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol The protocol used when performing health checks on targets. The possible protocols are `HTTP` and `HTTPS`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param protocolVersion The protocol version used when performing health checks on targets. The possible protocol versions are `HTTP1` and `HTTP2`. The default is `HTTP1`.
         * 
         * @return builder
         * 
         */
        public Builder protocolVersion(@Nullable Output<String> protocolVersion) {
            $.protocolVersion = protocolVersion;
            return this;
        }

        /**
         * @param protocolVersion The protocol version used when performing health checks on targets. The possible protocol versions are `HTTP1` and `HTTP2`. The default is `HTTP1`.
         * 
         * @return builder
         * 
         */
        public Builder protocolVersion(String protocolVersion) {
            return protocolVersion(Output.of(protocolVersion));
        }

        /**
         * @param unhealthyThresholdCount The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThresholdCount(@Nullable Output<Integer> unhealthyThresholdCount) {
            $.unhealthyThresholdCount = unhealthyThresholdCount;
            return this;
        }

        /**
         * @param unhealthyThresholdCount The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThresholdCount(Integer unhealthyThresholdCount) {
            return unhealthyThresholdCount(Output.of(unhealthyThresholdCount));
        }

        public TargetGroupConfigHealthCheckArgs build() {
            return $;
        }
    }

}
