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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;


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

    public static final TargetGroupTargetFailoverArgs Empty = new TargetGroupTargetFailoverArgs();

    /**
     * Indicates how the GWLB handles existing flows when a target is deregistered. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_unhealthy`. Default: `no_rebalance`.
     * 
     */
    @Import(name="onDeregistration", required=true)
    private Output<String> onDeregistration;

    /**
     * @return Indicates how the GWLB handles existing flows when a target is deregistered. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_unhealthy`. Default: `no_rebalance`.
     * 
     */
    public Output<String> onDeregistration() {
        return this.onDeregistration;
    }

    /**
     * Indicates how the GWLB handles existing flows when a target is unhealthy. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_deregistration`. Default: `no_rebalance`.
     * 
     */
    @Import(name="onUnhealthy", required=true)
    private Output<String> onUnhealthy;

    /**
     * @return Indicates how the GWLB handles existing flows when a target is unhealthy. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_deregistration`. Default: `no_rebalance`.
     * 
     */
    public Output<String> onUnhealthy() {
        return this.onUnhealthy;
    }

    private TargetGroupTargetFailoverArgs() {}

    private TargetGroupTargetFailoverArgs(TargetGroupTargetFailoverArgs $) {
        this.onDeregistration = $.onDeregistration;
        this.onUnhealthy = $.onUnhealthy;
    }

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

    public static final class Builder {
        private TargetGroupTargetFailoverArgs $;

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

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

        /**
         * @param onDeregistration Indicates how the GWLB handles existing flows when a target is deregistered. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_unhealthy`. Default: `no_rebalance`.
         * 
         * @return builder
         * 
         */
        public Builder onDeregistration(Output<String> onDeregistration) {
            $.onDeregistration = onDeregistration;
            return this;
        }

        /**
         * @param onDeregistration Indicates how the GWLB handles existing flows when a target is deregistered. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_unhealthy`. Default: `no_rebalance`.
         * 
         * @return builder
         * 
         */
        public Builder onDeregistration(String onDeregistration) {
            return onDeregistration(Output.of(onDeregistration));
        }

        /**
         * @param onUnhealthy Indicates how the GWLB handles existing flows when a target is unhealthy. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_deregistration`. Default: `no_rebalance`.
         * 
         * @return builder
         * 
         */
        public Builder onUnhealthy(Output<String> onUnhealthy) {
            $.onUnhealthy = onUnhealthy;
            return this;
        }

        /**
         * @param onUnhealthy Indicates how the GWLB handles existing flows when a target is unhealthy. Possible values are `rebalance` and `no_rebalance`. Must match the attribute value set for `on_deregistration`. Default: `no_rebalance`.
         * 
         * @return builder
         * 
         */
        public Builder onUnhealthy(String onUnhealthy) {
            return onUnhealthy(Output.of(onUnhealthy));
        }

        public TargetGroupTargetFailoverArgs build() {
            $.onDeregistration = Objects.requireNonNull($.onDeregistration, "expected parameter 'onDeregistration' to be non-null");
            $.onUnhealthy = Objects.requireNonNull($.onUnhealthy, "expected parameter 'onUnhealthy' to be non-null");
            return $;
        }
    }

}
