// *** 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.azure.appservice.inputs.PlanSkuArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PlanState Empty = new PlanState();

    /**
     * The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
     * 
     * &gt; **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
     * 
     */
    @Import(name="appServiceEnvironmentId")
    private @Nullable Output<String> appServiceEnvironmentId;

    /**
     * @return The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
     * 
     * &gt; **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
     * 
     */
    public Optional<Output<String>> appServiceEnvironmentId() {
        return Optional.ofNullable(this.appServiceEnvironmentId);
    }

    /**
     * Whether to create a xenon App Service Plan.
     * 
     */
    @Import(name="isXenon")
    private @Nullable Output<Boolean> isXenon;

    /**
     * @return Whether to create a xenon App Service Plan.
     * 
     */
    public Optional<Output<Boolean>> isXenon() {
        return Optional.ofNullable(this.isXenon);
    }

    /**
     * The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
     * 
     */
    @Import(name="kind")
    private @Nullable Output<String> kind;

    /**
     * @return The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
     * 
     */
    public Optional<Output<String>> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
     * 
     */
    @Import(name="maximumElasticWorkerCount")
    private @Nullable Output<Integer> maximumElasticWorkerCount;

    /**
     * @return The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
     * 
     */
    public Optional<Output<Integer>> maximumElasticWorkerCount() {
        return Optional.ofNullable(this.maximumElasticWorkerCount);
    }

    /**
     * The maximum number of workers supported with the App Service Plan&#39;s sku.
     * 
     */
    @Import(name="maximumNumberOfWorkers")
    private @Nullable Output<Integer> maximumNumberOfWorkers;

    /**
     * @return The maximum number of workers supported with the App Service Plan&#39;s sku.
     * 
     */
    public Optional<Output<Integer>> maximumNumberOfWorkers() {
        return Optional.ofNullable(this.maximumNumberOfWorkers);
    }

    /**
     * Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
     * 
     */
    @Import(name="perSiteScaling")
    private @Nullable Output<Boolean> perSiteScaling;

    /**
     * @return Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
     * 
     */
    public Optional<Output<Boolean>> perSiteScaling() {
        return Optional.ofNullable(this.perSiteScaling);
    }

    /**
     * Is this App Service Plan `Reserved`.
     * 
     */
    @Import(name="reserved")
    private @Nullable Output<Boolean> reserved;

    /**
     * @return Is this App Service Plan `Reserved`.
     * 
     */
    public Optional<Output<Boolean>> reserved() {
        return Optional.ofNullable(this.reserved);
    }

    /**
     * The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * A `sku` block as documented below.
     * 
     */
    @Import(name="sku")
    private @Nullable Output<PlanSkuArgs> sku;

    /**
     * @return A `sku` block as documented below.
     * 
     */
    public Optional<Output<PlanSkuArgs>> sku() {
        return Optional.ofNullable(this.sku);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
     * 
     */
    @Import(name="zoneRedundant")
    private @Nullable Output<Boolean> zoneRedundant;

    /**
     * @return Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
     * 
     */
    public Optional<Output<Boolean>> zoneRedundant() {
        return Optional.ofNullable(this.zoneRedundant);
    }

    private PlanState() {}

    private PlanState(PlanState $) {
        this.appServiceEnvironmentId = $.appServiceEnvironmentId;
        this.isXenon = $.isXenon;
        this.kind = $.kind;
        this.location = $.location;
        this.maximumElasticWorkerCount = $.maximumElasticWorkerCount;
        this.maximumNumberOfWorkers = $.maximumNumberOfWorkers;
        this.name = $.name;
        this.perSiteScaling = $.perSiteScaling;
        this.reserved = $.reserved;
        this.resourceGroupName = $.resourceGroupName;
        this.sku = $.sku;
        this.tags = $.tags;
        this.zoneRedundant = $.zoneRedundant;
    }

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

    public static final class Builder {
        private PlanState $;

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

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

        /**
         * @param appServiceEnvironmentId The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
         * 
         * &gt; **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
         * 
         * @return builder
         * 
         */
        public Builder appServiceEnvironmentId(@Nullable Output<String> appServiceEnvironmentId) {
            $.appServiceEnvironmentId = appServiceEnvironmentId;
            return this;
        }

        /**
         * @param appServiceEnvironmentId The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
         * 
         * &gt; **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
         * 
         * @return builder
         * 
         */
        public Builder appServiceEnvironmentId(String appServiceEnvironmentId) {
            return appServiceEnvironmentId(Output.of(appServiceEnvironmentId));
        }

        /**
         * @param isXenon Whether to create a xenon App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder isXenon(@Nullable Output<Boolean> isXenon) {
            $.isXenon = isXenon;
            return this;
        }

        /**
         * @param isXenon Whether to create a xenon App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder isXenon(Boolean isXenon) {
            return isXenon(Output.of(isXenon));
        }

        /**
         * @param kind The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output<String> kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param maximumElasticWorkerCount The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder maximumElasticWorkerCount(@Nullable Output<Integer> maximumElasticWorkerCount) {
            $.maximumElasticWorkerCount = maximumElasticWorkerCount;
            return this;
        }

        /**
         * @param maximumElasticWorkerCount The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder maximumElasticWorkerCount(Integer maximumElasticWorkerCount) {
            return maximumElasticWorkerCount(Output.of(maximumElasticWorkerCount));
        }

        /**
         * @param maximumNumberOfWorkers The maximum number of workers supported with the App Service Plan&#39;s sku.
         * 
         * @return builder
         * 
         */
        public Builder maximumNumberOfWorkers(@Nullable Output<Integer> maximumNumberOfWorkers) {
            $.maximumNumberOfWorkers = maximumNumberOfWorkers;
            return this;
        }

        /**
         * @param maximumNumberOfWorkers The maximum number of workers supported with the App Service Plan&#39;s sku.
         * 
         * @return builder
         * 
         */
        public Builder maximumNumberOfWorkers(Integer maximumNumberOfWorkers) {
            return maximumNumberOfWorkers(Output.of(maximumNumberOfWorkers));
        }

        /**
         * @param name Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param perSiteScaling Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
         * 
         * @return builder
         * 
         */
        public Builder perSiteScaling(@Nullable Output<Boolean> perSiteScaling) {
            $.perSiteScaling = perSiteScaling;
            return this;
        }

        /**
         * @param perSiteScaling Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
         * 
         * @return builder
         * 
         */
        public Builder perSiteScaling(Boolean perSiteScaling) {
            return perSiteScaling(Output.of(perSiteScaling));
        }

        /**
         * @param reserved Is this App Service Plan `Reserved`.
         * 
         * @return builder
         * 
         */
        public Builder reserved(@Nullable Output<Boolean> reserved) {
            $.reserved = reserved;
            return this;
        }

        /**
         * @param reserved Is this App Service Plan `Reserved`.
         * 
         * @return builder
         * 
         */
        public Builder reserved(Boolean reserved) {
            return reserved(Output.of(reserved));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param sku A `sku` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output<PlanSkuArgs> sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku A `sku` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder sku(PlanSkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param zoneRedundant Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(@Nullable Output<Boolean> zoneRedundant) {
            $.zoneRedundant = zoneRedundant;
            return this;
        }

        /**
         * @param zoneRedundant Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(Boolean zoneRedundant) {
            return zoneRedundant(Output.of(zoneRedundant));
        }

        public PlanState build() {
            return $;
        }
    }

}
