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

import com.pulumi.azure.webpubsub.inputs.ServiceIdentityArgs;
import com.pulumi.azure.webpubsub.inputs.ServiceLiveTraceArgs;
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 ServiceState extends com.pulumi.resources.ResourceArgs {

    public static final ServiceState Empty = new ServiceState();

    /**
     * Whether to enable AAD auth? Defaults to `true`.
     * 
     */
    @Import(name="aadAuthEnabled")
    private @Nullable Output<Boolean> aadAuthEnabled;

    /**
     * @return Whether to enable AAD auth? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> aadAuthEnabled() {
        return Optional.ofNullable(this.aadAuthEnabled);
    }

    /**
     * Specifies the number of units associated with this Web PubSub resource. Valid values are: Free: `1`, Standard: `1`, `2`, `5`, `10`, `20`, `50`, `100`.
     * 
     */
    @Import(name="capacity")
    private @Nullable Output<Integer> capacity;

    /**
     * @return Specifies the number of units associated with this Web PubSub resource. Valid values are: Free: `1`, Standard: `1`, `2`, `5`, `10`, `20`, `50`, `100`.
     * 
     */
    public Optional<Output<Integer>> capacity() {
        return Optional.ofNullable(this.capacity);
    }

    /**
     * The publicly accessible IP of the Web PubSub service.
     * 
     */
    @Import(name="externalIp")
    private @Nullable Output<String> externalIp;

    /**
     * @return The publicly accessible IP of the Web PubSub service.
     * 
     */
    public Optional<Output<String>> externalIp() {
        return Optional.ofNullable(this.externalIp);
    }

    /**
     * The FQDN of the Web PubSub service.
     * 
     */
    @Import(name="hostname")
    private @Nullable Output<String> hostname;

    /**
     * @return The FQDN of the Web PubSub service.
     * 
     */
    public Optional<Output<String>> hostname() {
        return Optional.ofNullable(this.hostname);
    }

    /**
     * An `identity` block as defined below.
     * 
     */
    @Import(name="identity")
    private @Nullable Output<ServiceIdentityArgs> identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Optional<Output<ServiceIdentityArgs>> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * A `live_trace` block as defined below.
     * 
     */
    @Import(name="liveTrace")
    private @Nullable Output<ServiceLiveTraceArgs> liveTrace;

    /**
     * @return A `live_trace` block as defined below.
     * 
     */
    public Optional<Output<ServiceLiveTraceArgs>> liveTrace() {
        return Optional.ofNullable(this.liveTrace);
    }

    /**
     * Whether to enable local auth? Defaults to `true`.
     * 
     */
    @Import(name="localAuthEnabled")
    private @Nullable Output<Boolean> localAuthEnabled;

    /**
     * @return Whether to enable local auth? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> localAuthEnabled() {
        return Optional.ofNullable(this.localAuthEnabled);
    }

    /**
     * Specifies the supported Azure location where the Web PubSub service 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 Web PubSub service exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the Web PubSub service. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name of the Web PubSub service. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The primary access key for the Web PubSub service.
     * 
     */
    @Import(name="primaryAccessKey")
    private @Nullable Output<String> primaryAccessKey;

    /**
     * @return The primary access key for the Web PubSub service.
     * 
     */
    public Optional<Output<String>> primaryAccessKey() {
        return Optional.ofNullable(this.primaryAccessKey);
    }

    /**
     * The primary connection string for the Web PubSub service.
     * 
     */
    @Import(name="primaryConnectionString")
    private @Nullable Output<String> primaryConnectionString;

    /**
     * @return The primary connection string for the Web PubSub service.
     * 
     */
    public Optional<Output<String>> primaryConnectionString() {
        return Optional.ofNullable(this.primaryConnectionString);
    }

    /**
     * Whether to enable public network access? Defaults to `true`.
     * 
     */
    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output<Boolean> publicNetworkAccessEnabled;

    /**
     * @return Whether to enable public network access? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * The publicly accessible port of the Web PubSub service which is designed for browser/client use.
     * 
     */
    @Import(name="publicPort")
    private @Nullable Output<Integer> publicPort;

    /**
     * @return The publicly accessible port of the Web PubSub service which is designed for browser/client use.
     * 
     */
    public Optional<Output<Integer>> publicPort() {
        return Optional.ofNullable(this.publicPort);
    }

    /**
     * The name of the resource group in which to create the Web PubSub service. 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 Web PubSub service. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The secondary access key for the Web PubSub service.
     * 
     */
    @Import(name="secondaryAccessKey")
    private @Nullable Output<String> secondaryAccessKey;

    /**
     * @return The secondary access key for the Web PubSub service.
     * 
     */
    public Optional<Output<String>> secondaryAccessKey() {
        return Optional.ofNullable(this.secondaryAccessKey);
    }

    /**
     * The secondary connection string for the Web PubSub service.
     * 
     */
    @Import(name="secondaryConnectionString")
    private @Nullable Output<String> secondaryConnectionString;

    /**
     * @return The secondary connection string for the Web PubSub service.
     * 
     */
    public Optional<Output<String>> secondaryConnectionString() {
        return Optional.ofNullable(this.secondaryConnectionString);
    }

    /**
     * The publicly accessible port of the Web PubSub service which is designed for customer server side use.
     * 
     */
    @Import(name="serverPort")
    private @Nullable Output<Integer> serverPort;

    /**
     * @return The publicly accessible port of the Web PubSub service which is designed for customer server side use.
     * 
     */
    public Optional<Output<Integer>> serverPort() {
        return Optional.ofNullable(this.serverPort);
    }

    /**
     * Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, and `Premium_P1`.
     * 
     */
    @Import(name="sku")
    private @Nullable Output<String> sku;

    /**
     * @return Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, and `Premium_P1`.
     * 
     */
    public Optional<Output<String>> 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);
    }

    /**
     * Whether to request client certificate during TLS handshake? Defaults to `false`.
     * 
     */
    @Import(name="tlsClientCertEnabled")
    private @Nullable Output<Boolean> tlsClientCertEnabled;

    /**
     * @return Whether to request client certificate during TLS handshake? Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> tlsClientCertEnabled() {
        return Optional.ofNullable(this.tlsClientCertEnabled);
    }

    @Import(name="version")
    private @Nullable Output<String> version;

    public Optional<Output<String>> version() {
        return Optional.ofNullable(this.version);
    }

    private ServiceState() {}

    private ServiceState(ServiceState $) {
        this.aadAuthEnabled = $.aadAuthEnabled;
        this.capacity = $.capacity;
        this.externalIp = $.externalIp;
        this.hostname = $.hostname;
        this.identity = $.identity;
        this.liveTrace = $.liveTrace;
        this.localAuthEnabled = $.localAuthEnabled;
        this.location = $.location;
        this.name = $.name;
        this.primaryAccessKey = $.primaryAccessKey;
        this.primaryConnectionString = $.primaryConnectionString;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.publicPort = $.publicPort;
        this.resourceGroupName = $.resourceGroupName;
        this.secondaryAccessKey = $.secondaryAccessKey;
        this.secondaryConnectionString = $.secondaryConnectionString;
        this.serverPort = $.serverPort;
        this.sku = $.sku;
        this.tags = $.tags;
        this.tlsClientCertEnabled = $.tlsClientCertEnabled;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ServiceState $;

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

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

        /**
         * @param aadAuthEnabled Whether to enable AAD auth? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder aadAuthEnabled(@Nullable Output<Boolean> aadAuthEnabled) {
            $.aadAuthEnabled = aadAuthEnabled;
            return this;
        }

        /**
         * @param aadAuthEnabled Whether to enable AAD auth? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder aadAuthEnabled(Boolean aadAuthEnabled) {
            return aadAuthEnabled(Output.of(aadAuthEnabled));
        }

        /**
         * @param capacity Specifies the number of units associated with this Web PubSub resource. Valid values are: Free: `1`, Standard: `1`, `2`, `5`, `10`, `20`, `50`, `100`.
         * 
         * @return builder
         * 
         */
        public Builder capacity(@Nullable Output<Integer> capacity) {
            $.capacity = capacity;
            return this;
        }

        /**
         * @param capacity Specifies the number of units associated with this Web PubSub resource. Valid values are: Free: `1`, Standard: `1`, `2`, `5`, `10`, `20`, `50`, `100`.
         * 
         * @return builder
         * 
         */
        public Builder capacity(Integer capacity) {
            return capacity(Output.of(capacity));
        }

        /**
         * @param externalIp The publicly accessible IP of the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder externalIp(@Nullable Output<String> externalIp) {
            $.externalIp = externalIp;
            return this;
        }

        /**
         * @param externalIp The publicly accessible IP of the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder externalIp(String externalIp) {
            return externalIp(Output.of(externalIp));
        }

        /**
         * @param hostname The FQDN of the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder hostname(@Nullable Output<String> hostname) {
            $.hostname = hostname;
            return this;
        }

        /**
         * @param hostname The FQDN of the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder hostname(String hostname) {
            return hostname(Output.of(hostname));
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output<ServiceIdentityArgs> identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(ServiceIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param liveTrace A `live_trace` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder liveTrace(@Nullable Output<ServiceLiveTraceArgs> liveTrace) {
            $.liveTrace = liveTrace;
            return this;
        }

        /**
         * @param liveTrace A `live_trace` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder liveTrace(ServiceLiveTraceArgs liveTrace) {
            return liveTrace(Output.of(liveTrace));
        }

        /**
         * @param localAuthEnabled Whether to enable local auth? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder localAuthEnabled(@Nullable Output<Boolean> localAuthEnabled) {
            $.localAuthEnabled = localAuthEnabled;
            return this;
        }

        /**
         * @param localAuthEnabled Whether to enable local auth? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder localAuthEnabled(Boolean localAuthEnabled) {
            return localAuthEnabled(Output.of(localAuthEnabled));
        }

        /**
         * @param location Specifies the supported Azure location where the Web PubSub service 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 Web PubSub service exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name The name of the Web PubSub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the Web PubSub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param primaryAccessKey The primary access key for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder primaryAccessKey(@Nullable Output<String> primaryAccessKey) {
            $.primaryAccessKey = primaryAccessKey;
            return this;
        }

        /**
         * @param primaryAccessKey The primary access key for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder primaryAccessKey(String primaryAccessKey) {
            return primaryAccessKey(Output.of(primaryAccessKey));
        }

        /**
         * @param primaryConnectionString The primary connection string for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder primaryConnectionString(@Nullable Output<String> primaryConnectionString) {
            $.primaryConnectionString = primaryConnectionString;
            return this;
        }

        /**
         * @param primaryConnectionString The primary connection string for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder primaryConnectionString(String primaryConnectionString) {
            return primaryConnectionString(Output.of(primaryConnectionString));
        }

        /**
         * @param publicNetworkAccessEnabled Whether to enable public network access? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(@Nullable Output<Boolean> publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        /**
         * @param publicNetworkAccessEnabled Whether to enable public network access? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param publicPort The publicly accessible port of the Web PubSub service which is designed for browser/client use.
         * 
         * @return builder
         * 
         */
        public Builder publicPort(@Nullable Output<Integer> publicPort) {
            $.publicPort = publicPort;
            return this;
        }

        /**
         * @param publicPort The publicly accessible port of the Web PubSub service which is designed for browser/client use.
         * 
         * @return builder
         * 
         */
        public Builder publicPort(Integer publicPort) {
            return publicPort(Output.of(publicPort));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the Web PubSub service. 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 Web PubSub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param secondaryAccessKey The secondary access key for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder secondaryAccessKey(@Nullable Output<String> secondaryAccessKey) {
            $.secondaryAccessKey = secondaryAccessKey;
            return this;
        }

        /**
         * @param secondaryAccessKey The secondary access key for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder secondaryAccessKey(String secondaryAccessKey) {
            return secondaryAccessKey(Output.of(secondaryAccessKey));
        }

        /**
         * @param secondaryConnectionString The secondary connection string for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder secondaryConnectionString(@Nullable Output<String> secondaryConnectionString) {
            $.secondaryConnectionString = secondaryConnectionString;
            return this;
        }

        /**
         * @param secondaryConnectionString The secondary connection string for the Web PubSub service.
         * 
         * @return builder
         * 
         */
        public Builder secondaryConnectionString(String secondaryConnectionString) {
            return secondaryConnectionString(Output.of(secondaryConnectionString));
        }

        /**
         * @param serverPort The publicly accessible port of the Web PubSub service which is designed for customer server side use.
         * 
         * @return builder
         * 
         */
        public Builder serverPort(@Nullable Output<Integer> serverPort) {
            $.serverPort = serverPort;
            return this;
        }

        /**
         * @param serverPort The publicly accessible port of the Web PubSub service which is designed for customer server side use.
         * 
         * @return builder
         * 
         */
        public Builder serverPort(Integer serverPort) {
            return serverPort(Output.of(serverPort));
        }

        /**
         * @param sku Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, and `Premium_P1`.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output<String> sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, and `Premium_P1`.
         * 
         * @return builder
         * 
         */
        public Builder sku(String 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 tlsClientCertEnabled Whether to request client certificate during TLS handshake? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder tlsClientCertEnabled(@Nullable Output<Boolean> tlsClientCertEnabled) {
            $.tlsClientCertEnabled = tlsClientCertEnabled;
            return this;
        }

        /**
         * @param tlsClientCertEnabled Whether to request client certificate during TLS handshake? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder tlsClientCertEnabled(Boolean tlsClientCertEnabled) {
            return tlsClientCertEnabled(Output.of(tlsClientCertEnabled));
        }

        public Builder version(@Nullable Output<String> version) {
            $.version = version;
            return this;
        }

        public Builder version(String version) {
            return version(Output.of(version));
        }

        public ServiceState build() {
            return $;
        }
    }

}
