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

import com.pulumi.azure.appservice.outputs.FunctionAppSlotSiteConfigCors;
import com.pulumi.azure.appservice.outputs.FunctionAppSlotSiteConfigIpRestriction;
import com.pulumi.azure.appservice.outputs.FunctionAppSlotSiteConfigScmIpRestriction;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class FunctionAppSlotSiteConfig {
    /**
     * @return Should the Function App be loaded at all times? Defaults to `false`.
     * 
     */
    private @Nullable Boolean alwaysOn;
    /**
     * @return The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.
     * 
     */
    private @Nullable Integer appScaleLimit;
    /**
     * @return The name of the slot to automatically swap to during deployment
     * 
     */
    private @Nullable String autoSwapSlotName;
    /**
     * @return A `cors` block as defined below.
     * 
     */
    private @Nullable FunctionAppSlotSiteConfigCors cors;
    /**
     * @return The version of the .NET framework&#39;s CLR used in this function app. Possible values are `v4.0` (including .NET Core 2.1 and 3.1), `v5.0` and `v6.0`. [For more information on which .NET Framework version to use based on the runtime version you&#39;re targeting - please see this table](https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library#supported-versions). Defaults to `v4.0`.
     * 
     */
    private @Nullable String dotnetFrameworkVersion;
    /**
     * @return The number of minimum instances for this function app. Only applicable to apps on the Premium plan.
     * 
     */
    private @Nullable Integer elasticInstanceMinimum;
    /**
     * @return State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`.
     * 
     */
    private @Nullable String ftpsState;
    /**
     * @return Path which will be checked for this function app health.
     * 
     */
    private @Nullable String healthCheckPath;
    /**
     * @return Specifies whether or not the HTTP2 protocol should be enabled. Defaults to `false`.
     * 
     */
    private @Nullable Boolean http2Enabled;
    /**
     * @return A [List of objects](https://www.terraform.io/docs/configuration/attr-as-blocks.html) representing IP restrictions as defined below.
     * 
     */
    private @Nullable List<FunctionAppSlotSiteConfigIpRestriction> ipRestrictions;
    /**
     * @return Java version hosted by the function app in Azure. Possible values are `1.8`, `11` &amp; `17` (In-Preview).
     * 
     */
    private @Nullable String javaVersion;
    /**
     * @return Linux App Framework and version for the AppService, e.g. `DOCKER|(golang:latest)`.
     * 
     */
    private @Nullable String linuxFxVersion;
    /**
     * @return The minimum supported TLS version for the function app. Possible values are `1.0`, `1.1`, and `1.2`. Defaults to `1.2` for new function apps.
     * 
     */
    private @Nullable String minTlsVersion;
    /**
     * @return The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.
     * 
     */
    private @Nullable Integer preWarmedInstanceCount;
    /**
     * @return Should Runtime Scale Monitoring be enabled?. Only applicable to apps on the Premium plan. Defaults to `false`.
     * 
     */
    private @Nullable Boolean runtimeScaleMonitoringEnabled;
    /**
     * @return A [List of objects](https://www.terraform.io/docs/configuration/attr-as-blocks.html) representing IP restrictions as defined below.
     * 
     * &gt; **NOTE** User has to explicitly set `scm_ip_restriction` to empty slice (`[]`) to remove it.
     * 
     */
    private @Nullable List<FunctionAppSlotSiteConfigScmIpRestriction> scmIpRestrictions;
    /**
     * @return The type of Source Control used by this function App. Valid values include: `BitBucketGit`, `BitBucketHg`, `CodePlexGit`, `CodePlexHg`, `Dropbox`, `ExternalGit`, `ExternalHg`, `GitHub`, `LocalGit`, `None` (default), `OneDrive`, `Tfs`, `VSO`, and `VSTSRM`.
     * 
     * &gt; **NOTE:** This setting is incompatible with the `source_control` block which updates this value based on the setting provided.
     * 
     */
    private @Nullable String scmType;
    /**
     * @return IP security restrictions for scm to use main. Defaults to `false`.
     * 
     * &gt; **NOTE** Any `scm_ip_restriction` blocks configured are ignored by the service when `scm_use_main_ip_restriction` is set to `true`. Any scm restrictions will become active if this is subsequently set to `false` or removed.
     * 
     */
    private @Nullable Boolean scmUseMainIpRestriction;
    /**
     * @return Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to `true`.
     * 
     * &gt; **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`.
     * 
     */
    private @Nullable Boolean use32BitWorkerProcess;
    private @Nullable Boolean vnetRouteAllEnabled;
    /**
     * @return Should WebSockets be enabled?
     * 
     */
    private @Nullable Boolean websocketsEnabled;

    private FunctionAppSlotSiteConfig() {}
    /**
     * @return Should the Function App be loaded at all times? Defaults to `false`.
     * 
     */
    public Optional<Boolean> alwaysOn() {
        return Optional.ofNullable(this.alwaysOn);
    }
    /**
     * @return The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.
     * 
     */
    public Optional<Integer> appScaleLimit() {
        return Optional.ofNullable(this.appScaleLimit);
    }
    /**
     * @return The name of the slot to automatically swap to during deployment
     * 
     */
    public Optional<String> autoSwapSlotName() {
        return Optional.ofNullable(this.autoSwapSlotName);
    }
    /**
     * @return A `cors` block as defined below.
     * 
     */
    public Optional<FunctionAppSlotSiteConfigCors> cors() {
        return Optional.ofNullable(this.cors);
    }
    /**
     * @return The version of the .NET framework&#39;s CLR used in this function app. Possible values are `v4.0` (including .NET Core 2.1 and 3.1), `v5.0` and `v6.0`. [For more information on which .NET Framework version to use based on the runtime version you&#39;re targeting - please see this table](https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library#supported-versions). Defaults to `v4.0`.
     * 
     */
    public Optional<String> dotnetFrameworkVersion() {
        return Optional.ofNullable(this.dotnetFrameworkVersion);
    }
    /**
     * @return The number of minimum instances for this function app. Only applicable to apps on the Premium plan.
     * 
     */
    public Optional<Integer> elasticInstanceMinimum() {
        return Optional.ofNullable(this.elasticInstanceMinimum);
    }
    /**
     * @return State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`.
     * 
     */
    public Optional<String> ftpsState() {
        return Optional.ofNullable(this.ftpsState);
    }
    /**
     * @return Path which will be checked for this function app health.
     * 
     */
    public Optional<String> healthCheckPath() {
        return Optional.ofNullable(this.healthCheckPath);
    }
    /**
     * @return Specifies whether or not the HTTP2 protocol should be enabled. Defaults to `false`.
     * 
     */
    public Optional<Boolean> http2Enabled() {
        return Optional.ofNullable(this.http2Enabled);
    }
    /**
     * @return A [List of objects](https://www.terraform.io/docs/configuration/attr-as-blocks.html) representing IP restrictions as defined below.
     * 
     */
    public List<FunctionAppSlotSiteConfigIpRestriction> ipRestrictions() {
        return this.ipRestrictions == null ? List.of() : this.ipRestrictions;
    }
    /**
     * @return Java version hosted by the function app in Azure. Possible values are `1.8`, `11` &amp; `17` (In-Preview).
     * 
     */
    public Optional<String> javaVersion() {
        return Optional.ofNullable(this.javaVersion);
    }
    /**
     * @return Linux App Framework and version for the AppService, e.g. `DOCKER|(golang:latest)`.
     * 
     */
    public Optional<String> linuxFxVersion() {
        return Optional.ofNullable(this.linuxFxVersion);
    }
    /**
     * @return The minimum supported TLS version for the function app. Possible values are `1.0`, `1.1`, and `1.2`. Defaults to `1.2` for new function apps.
     * 
     */
    public Optional<String> minTlsVersion() {
        return Optional.ofNullable(this.minTlsVersion);
    }
    /**
     * @return The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.
     * 
     */
    public Optional<Integer> preWarmedInstanceCount() {
        return Optional.ofNullable(this.preWarmedInstanceCount);
    }
    /**
     * @return Should Runtime Scale Monitoring be enabled?. Only applicable to apps on the Premium plan. Defaults to `false`.
     * 
     */
    public Optional<Boolean> runtimeScaleMonitoringEnabled() {
        return Optional.ofNullable(this.runtimeScaleMonitoringEnabled);
    }
    /**
     * @return A [List of objects](https://www.terraform.io/docs/configuration/attr-as-blocks.html) representing IP restrictions as defined below.
     * 
     * &gt; **NOTE** User has to explicitly set `scm_ip_restriction` to empty slice (`[]`) to remove it.
     * 
     */
    public List<FunctionAppSlotSiteConfigScmIpRestriction> scmIpRestrictions() {
        return this.scmIpRestrictions == null ? List.of() : this.scmIpRestrictions;
    }
    /**
     * @return The type of Source Control used by this function App. Valid values include: `BitBucketGit`, `BitBucketHg`, `CodePlexGit`, `CodePlexHg`, `Dropbox`, `ExternalGit`, `ExternalHg`, `GitHub`, `LocalGit`, `None` (default), `OneDrive`, `Tfs`, `VSO`, and `VSTSRM`.
     * 
     * &gt; **NOTE:** This setting is incompatible with the `source_control` block which updates this value based on the setting provided.
     * 
     */
    public Optional<String> scmType() {
        return Optional.ofNullable(this.scmType);
    }
    /**
     * @return IP security restrictions for scm to use main. Defaults to `false`.
     * 
     * &gt; **NOTE** Any `scm_ip_restriction` blocks configured are ignored by the service when `scm_use_main_ip_restriction` is set to `true`. Any scm restrictions will become active if this is subsequently set to `false` or removed.
     * 
     */
    public Optional<Boolean> scmUseMainIpRestriction() {
        return Optional.ofNullable(this.scmUseMainIpRestriction);
    }
    /**
     * @return Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to `true`.
     * 
     * &gt; **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`.
     * 
     */
    public Optional<Boolean> use32BitWorkerProcess() {
        return Optional.ofNullable(this.use32BitWorkerProcess);
    }
    public Optional<Boolean> vnetRouteAllEnabled() {
        return Optional.ofNullable(this.vnetRouteAllEnabled);
    }
    /**
     * @return Should WebSockets be enabled?
     * 
     */
    public Optional<Boolean> websocketsEnabled() {
        return Optional.ofNullable(this.websocketsEnabled);
    }

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

    public static Builder builder(FunctionAppSlotSiteConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean alwaysOn;
        private @Nullable Integer appScaleLimit;
        private @Nullable String autoSwapSlotName;
        private @Nullable FunctionAppSlotSiteConfigCors cors;
        private @Nullable String dotnetFrameworkVersion;
        private @Nullable Integer elasticInstanceMinimum;
        private @Nullable String ftpsState;
        private @Nullable String healthCheckPath;
        private @Nullable Boolean http2Enabled;
        private @Nullable List<FunctionAppSlotSiteConfigIpRestriction> ipRestrictions;
        private @Nullable String javaVersion;
        private @Nullable String linuxFxVersion;
        private @Nullable String minTlsVersion;
        private @Nullable Integer preWarmedInstanceCount;
        private @Nullable Boolean runtimeScaleMonitoringEnabled;
        private @Nullable List<FunctionAppSlotSiteConfigScmIpRestriction> scmIpRestrictions;
        private @Nullable String scmType;
        private @Nullable Boolean scmUseMainIpRestriction;
        private @Nullable Boolean use32BitWorkerProcess;
        private @Nullable Boolean vnetRouteAllEnabled;
        private @Nullable Boolean websocketsEnabled;
        public Builder() {}
        public Builder(FunctionAppSlotSiteConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.alwaysOn = defaults.alwaysOn;
    	      this.appScaleLimit = defaults.appScaleLimit;
    	      this.autoSwapSlotName = defaults.autoSwapSlotName;
    	      this.cors = defaults.cors;
    	      this.dotnetFrameworkVersion = defaults.dotnetFrameworkVersion;
    	      this.elasticInstanceMinimum = defaults.elasticInstanceMinimum;
    	      this.ftpsState = defaults.ftpsState;
    	      this.healthCheckPath = defaults.healthCheckPath;
    	      this.http2Enabled = defaults.http2Enabled;
    	      this.ipRestrictions = defaults.ipRestrictions;
    	      this.javaVersion = defaults.javaVersion;
    	      this.linuxFxVersion = defaults.linuxFxVersion;
    	      this.minTlsVersion = defaults.minTlsVersion;
    	      this.preWarmedInstanceCount = defaults.preWarmedInstanceCount;
    	      this.runtimeScaleMonitoringEnabled = defaults.runtimeScaleMonitoringEnabled;
    	      this.scmIpRestrictions = defaults.scmIpRestrictions;
    	      this.scmType = defaults.scmType;
    	      this.scmUseMainIpRestriction = defaults.scmUseMainIpRestriction;
    	      this.use32BitWorkerProcess = defaults.use32BitWorkerProcess;
    	      this.vnetRouteAllEnabled = defaults.vnetRouteAllEnabled;
    	      this.websocketsEnabled = defaults.websocketsEnabled;
        }

        @CustomType.Setter
        public Builder alwaysOn(@Nullable Boolean alwaysOn) {
            this.alwaysOn = alwaysOn;
            return this;
        }
        @CustomType.Setter
        public Builder appScaleLimit(@Nullable Integer appScaleLimit) {
            this.appScaleLimit = appScaleLimit;
            return this;
        }
        @CustomType.Setter
        public Builder autoSwapSlotName(@Nullable String autoSwapSlotName) {
            this.autoSwapSlotName = autoSwapSlotName;
            return this;
        }
        @CustomType.Setter
        public Builder cors(@Nullable FunctionAppSlotSiteConfigCors cors) {
            this.cors = cors;
            return this;
        }
        @CustomType.Setter
        public Builder dotnetFrameworkVersion(@Nullable String dotnetFrameworkVersion) {
            this.dotnetFrameworkVersion = dotnetFrameworkVersion;
            return this;
        }
        @CustomType.Setter
        public Builder elasticInstanceMinimum(@Nullable Integer elasticInstanceMinimum) {
            this.elasticInstanceMinimum = elasticInstanceMinimum;
            return this;
        }
        @CustomType.Setter
        public Builder ftpsState(@Nullable String ftpsState) {
            this.ftpsState = ftpsState;
            return this;
        }
        @CustomType.Setter
        public Builder healthCheckPath(@Nullable String healthCheckPath) {
            this.healthCheckPath = healthCheckPath;
            return this;
        }
        @CustomType.Setter
        public Builder http2Enabled(@Nullable Boolean http2Enabled) {
            this.http2Enabled = http2Enabled;
            return this;
        }
        @CustomType.Setter
        public Builder ipRestrictions(@Nullable List<FunctionAppSlotSiteConfigIpRestriction> ipRestrictions) {
            this.ipRestrictions = ipRestrictions;
            return this;
        }
        public Builder ipRestrictions(FunctionAppSlotSiteConfigIpRestriction... ipRestrictions) {
            return ipRestrictions(List.of(ipRestrictions));
        }
        @CustomType.Setter
        public Builder javaVersion(@Nullable String javaVersion) {
            this.javaVersion = javaVersion;
            return this;
        }
        @CustomType.Setter
        public Builder linuxFxVersion(@Nullable String linuxFxVersion) {
            this.linuxFxVersion = linuxFxVersion;
            return this;
        }
        @CustomType.Setter
        public Builder minTlsVersion(@Nullable String minTlsVersion) {
            this.minTlsVersion = minTlsVersion;
            return this;
        }
        @CustomType.Setter
        public Builder preWarmedInstanceCount(@Nullable Integer preWarmedInstanceCount) {
            this.preWarmedInstanceCount = preWarmedInstanceCount;
            return this;
        }
        @CustomType.Setter
        public Builder runtimeScaleMonitoringEnabled(@Nullable Boolean runtimeScaleMonitoringEnabled) {
            this.runtimeScaleMonitoringEnabled = runtimeScaleMonitoringEnabled;
            return this;
        }
        @CustomType.Setter
        public Builder scmIpRestrictions(@Nullable List<FunctionAppSlotSiteConfigScmIpRestriction> scmIpRestrictions) {
            this.scmIpRestrictions = scmIpRestrictions;
            return this;
        }
        public Builder scmIpRestrictions(FunctionAppSlotSiteConfigScmIpRestriction... scmIpRestrictions) {
            return scmIpRestrictions(List.of(scmIpRestrictions));
        }
        @CustomType.Setter
        public Builder scmType(@Nullable String scmType) {
            this.scmType = scmType;
            return this;
        }
        @CustomType.Setter
        public Builder scmUseMainIpRestriction(@Nullable Boolean scmUseMainIpRestriction) {
            this.scmUseMainIpRestriction = scmUseMainIpRestriction;
            return this;
        }
        @CustomType.Setter
        public Builder use32BitWorkerProcess(@Nullable Boolean use32BitWorkerProcess) {
            this.use32BitWorkerProcess = use32BitWorkerProcess;
            return this;
        }
        @CustomType.Setter
        public Builder vnetRouteAllEnabled(@Nullable Boolean vnetRouteAllEnabled) {
            this.vnetRouteAllEnabled = vnetRouteAllEnabled;
            return this;
        }
        @CustomType.Setter
        public Builder websocketsEnabled(@Nullable Boolean websocketsEnabled) {
            this.websocketsEnabled = websocketsEnabled;
            return this;
        }
        public FunctionAppSlotSiteConfig build() {
            final var o = new FunctionAppSlotSiteConfig();
            o.alwaysOn = alwaysOn;
            o.appScaleLimit = appScaleLimit;
            o.autoSwapSlotName = autoSwapSlotName;
            o.cors = cors;
            o.dotnetFrameworkVersion = dotnetFrameworkVersion;
            o.elasticInstanceMinimum = elasticInstanceMinimum;
            o.ftpsState = ftpsState;
            o.healthCheckPath = healthCheckPath;
            o.http2Enabled = http2Enabled;
            o.ipRestrictions = ipRestrictions;
            o.javaVersion = javaVersion;
            o.linuxFxVersion = linuxFxVersion;
            o.minTlsVersion = minTlsVersion;
            o.preWarmedInstanceCount = preWarmedInstanceCount;
            o.runtimeScaleMonitoringEnabled = runtimeScaleMonitoringEnabled;
            o.scmIpRestrictions = scmIpRestrictions;
            o.scmType = scmType;
            o.scmUseMainIpRestriction = scmUseMainIpRestriction;
            o.use32BitWorkerProcess = use32BitWorkerProcess;
            o.vnetRouteAllEnabled = vnetRouteAllEnabled;
            o.websocketsEnabled = websocketsEnabled;
            return o;
        }
    }
}
