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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final StageCanarySettingsArgs Empty = new StageCanarySettingsArgs();

    /**
     * Percent `0.0` - `100.0` of traffic to divert to the canary deployment.
     * 
     */
    @Import(name="percentTraffic")
    private @Nullable Output<Double> percentTraffic;

    /**
     * @return Percent `0.0` - `100.0` of traffic to divert to the canary deployment.
     * 
     */
    public Optional<Output<Double>> percentTraffic() {
        return Optional.ofNullable(this.percentTraffic);
    }

    /**
     * Map of overridden stage `variables` (including new variables) for the canary deployment.
     * 
     */
    @Import(name="stageVariableOverrides")
    private @Nullable Output<Map<String,Object>> stageVariableOverrides;

    /**
     * @return Map of overridden stage `variables` (including new variables) for the canary deployment.
     * 
     */
    public Optional<Output<Map<String,Object>>> stageVariableOverrides() {
        return Optional.ofNullable(this.stageVariableOverrides);
    }

    /**
     * Whether the canary deployment uses the stage cache. Defaults to false.
     * 
     */
    @Import(name="useStageCache")
    private @Nullable Output<Boolean> useStageCache;

    /**
     * @return Whether the canary deployment uses the stage cache. Defaults to false.
     * 
     */
    public Optional<Output<Boolean>> useStageCache() {
        return Optional.ofNullable(this.useStageCache);
    }

    private StageCanarySettingsArgs() {}

    private StageCanarySettingsArgs(StageCanarySettingsArgs $) {
        this.percentTraffic = $.percentTraffic;
        this.stageVariableOverrides = $.stageVariableOverrides;
        this.useStageCache = $.useStageCache;
    }

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

    public static final class Builder {
        private StageCanarySettingsArgs $;

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

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

        /**
         * @param percentTraffic Percent `0.0` - `100.0` of traffic to divert to the canary deployment.
         * 
         * @return builder
         * 
         */
        public Builder percentTraffic(@Nullable Output<Double> percentTraffic) {
            $.percentTraffic = percentTraffic;
            return this;
        }

        /**
         * @param percentTraffic Percent `0.0` - `100.0` of traffic to divert to the canary deployment.
         * 
         * @return builder
         * 
         */
        public Builder percentTraffic(Double percentTraffic) {
            return percentTraffic(Output.of(percentTraffic));
        }

        /**
         * @param stageVariableOverrides Map of overridden stage `variables` (including new variables) for the canary deployment.
         * 
         * @return builder
         * 
         */
        public Builder stageVariableOverrides(@Nullable Output<Map<String,Object>> stageVariableOverrides) {
            $.stageVariableOverrides = stageVariableOverrides;
            return this;
        }

        /**
         * @param stageVariableOverrides Map of overridden stage `variables` (including new variables) for the canary deployment.
         * 
         * @return builder
         * 
         */
        public Builder stageVariableOverrides(Map<String,Object> stageVariableOverrides) {
            return stageVariableOverrides(Output.of(stageVariableOverrides));
        }

        /**
         * @param useStageCache Whether the canary deployment uses the stage cache. Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder useStageCache(@Nullable Output<Boolean> useStageCache) {
            $.useStageCache = useStageCache;
            return this;
        }

        /**
         * @param useStageCache Whether the canary deployment uses the stage cache. Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder useStageCache(Boolean useStageCache) {
            return useStageCache(Output.of(useStageCache));
        }

        public StageCanarySettingsArgs build() {
            return $;
        }
    }

}
