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

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


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

    public static final WebAppActiveSlotState Empty = new WebAppActiveSlotState();

    /**
     * The timestamp of the last successful swap with `Production`.
     * 
     */
    @Import(name="lastSuccessfulSwap")
    private @Nullable Output<String> lastSuccessfulSwap;

    /**
     * @return The timestamp of the last successful swap with `Production`.
     * 
     */
    public Optional<Output<String>> lastSuccessfulSwap() {
        return Optional.ofNullable(this.lastSuccessfulSwap);
    }

    /**
     * The swap action should overwrite the Production slot&#39;s network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="overwriteNetworkConfig")
    private @Nullable Output<Boolean> overwriteNetworkConfig;

    /**
     * @return The swap action should overwrite the Production slot&#39;s network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<Boolean>> overwriteNetworkConfig() {
        return Optional.ofNullable(this.overwriteNetworkConfig);
    }

    /**
     * The ID of the Slot to swap with `Production`.
     * 
     */
    @Import(name="slotId")
    private @Nullable Output<String> slotId;

    /**
     * @return The ID of the Slot to swap with `Production`.
     * 
     */
    public Optional<Output<String>> slotId() {
        return Optional.ofNullable(this.slotId);
    }

    private WebAppActiveSlotState() {}

    private WebAppActiveSlotState(WebAppActiveSlotState $) {
        this.lastSuccessfulSwap = $.lastSuccessfulSwap;
        this.overwriteNetworkConfig = $.overwriteNetworkConfig;
        this.slotId = $.slotId;
    }

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

    public static final class Builder {
        private WebAppActiveSlotState $;

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

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

        /**
         * @param lastSuccessfulSwap The timestamp of the last successful swap with `Production`.
         * 
         * @return builder
         * 
         */
        public Builder lastSuccessfulSwap(@Nullable Output<String> lastSuccessfulSwap) {
            $.lastSuccessfulSwap = lastSuccessfulSwap;
            return this;
        }

        /**
         * @param lastSuccessfulSwap The timestamp of the last successful swap with `Production`.
         * 
         * @return builder
         * 
         */
        public Builder lastSuccessfulSwap(String lastSuccessfulSwap) {
            return lastSuccessfulSwap(Output.of(lastSuccessfulSwap));
        }

        /**
         * @param overwriteNetworkConfig The swap action should overwrite the Production slot&#39;s network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder overwriteNetworkConfig(@Nullable Output<Boolean> overwriteNetworkConfig) {
            $.overwriteNetworkConfig = overwriteNetworkConfig;
            return this;
        }

        /**
         * @param overwriteNetworkConfig The swap action should overwrite the Production slot&#39;s network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder overwriteNetworkConfig(Boolean overwriteNetworkConfig) {
            return overwriteNetworkConfig(Output.of(overwriteNetworkConfig));
        }

        /**
         * @param slotId The ID of the Slot to swap with `Production`.
         * 
         * @return builder
         * 
         */
        public Builder slotId(@Nullable Output<String> slotId) {
            $.slotId = slotId;
            return this;
        }

        /**
         * @param slotId The ID of the Slot to swap with `Production`.
         * 
         * @return builder
         * 
         */
        public Builder slotId(String slotId) {
            return slotId(Output.of(slotId));
        }

        public WebAppActiveSlotState build() {
            return $;
        }
    }

}
