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

import com.pulumi.azure.cosmosdb.inputs.AccountAnalyticalStorageArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountBackupArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountCapabilityArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountCapacityArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountCorsRuleArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountIdentityArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountRestoreArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountVirtualNetworkRuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AccountState Empty = new AccountState();

    /**
     * Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to `true`.
     * 
     */
    @Import(name="accessKeyMetadataWritesEnabled")
    private @Nullable Output<Boolean> accessKeyMetadataWritesEnabled;

    /**
     * @return Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> accessKeyMetadataWritesEnabled() {
        return Optional.ofNullable(this.accessKeyMetadataWritesEnabled);
    }

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

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

    /**
     * Enable Analytical Storage option for this Cosmos DB account. Defaults to `false`. Enabling and then disabling analytical storage forces a new resource to be created.
     * 
     */
    @Import(name="analyticalStorageEnabled")
    private @Nullable Output<Boolean> analyticalStorageEnabled;

    /**
     * @return Enable Analytical Storage option for this Cosmos DB account. Defaults to `false`. Enabling and then disabling analytical storage forces a new resource to be created.
     * 
     */
    public Optional<Output<Boolean>> analyticalStorageEnabled() {
        return Optional.ofNullable(this.analyticalStorageEnabled);
    }

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

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

    /**
     * The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below.
     * 
     */
    @Import(name="capabilities")
    private @Nullable Output<List<AccountCapabilityArgs>> capabilities;

    /**
     * @return The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below.
     * 
     */
    public Optional<Output<List<AccountCapabilityArgs>>> capabilities() {
        return Optional.ofNullable(this.capabilities);
    }

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

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

    /**
     * A list of connection strings available for this CosmosDB account.
     * 
     */
    @Import(name="connectionStrings")
    private @Nullable Output<List<String>> connectionStrings;

    /**
     * @return A list of connection strings available for this CosmosDB account.
     * 
     */
    public Optional<Output<List<String>>> connectionStrings() {
        return Optional.ofNullable(this.connectionStrings);
    }

    /**
     * Specifies a `consistency_policy` resource, used to define the consistency policy for this CosmosDB account.
     * 
     */
    @Import(name="consistencyPolicy")
    private @Nullable Output<AccountConsistencyPolicyArgs> consistencyPolicy;

    /**
     * @return Specifies a `consistency_policy` resource, used to define the consistency policy for this CosmosDB account.
     * 
     */
    public Optional<Output<AccountConsistencyPolicyArgs>> consistencyPolicy() {
        return Optional.ofNullable(this.consistencyPolicy);
    }

    /**
     * A `cors_rule` block as defined below.
     * 
     */
    @Import(name="corsRule")
    private @Nullable Output<AccountCorsRuleArgs> corsRule;

    /**
     * @return A `cors_rule` block as defined below.
     * 
     */
    public Optional<Output<AccountCorsRuleArgs>> corsRule() {
        return Optional.ofNullable(this.corsRule);
    }

    /**
     * The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** `create_mode` only works when `backup.type` is `Continuous`.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output<String> createMode;

    /**
     * @return The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** `create_mode` only works when `backup.type` is `Continuous`.
     * 
     */
    public Optional<Output<String>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
     * 
     */
    @Import(name="defaultIdentityType")
    private @Nullable Output<String> defaultIdentityType;

    /**
     * @return The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
     * 
     */
    public Optional<Output<String>> defaultIdentityType() {
        return Optional.ofNullable(this.defaultIdentityType);
    }

    /**
     * Enable automatic failover for this Cosmos DB account.
     * 
     */
    @Import(name="enableAutomaticFailover")
    private @Nullable Output<Boolean> enableAutomaticFailover;

    /**
     * @return Enable automatic failover for this Cosmos DB account.
     * 
     */
    public Optional<Output<Boolean>> enableAutomaticFailover() {
        return Optional.ofNullable(this.enableAutomaticFailover);
    }

    /**
     * Enable the Free Tier pricing option for this Cosmos DB account. Defaults to `false`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="enableFreeTier")
    private @Nullable Output<Boolean> enableFreeTier;

    /**
     * @return Enable the Free Tier pricing option for this Cosmos DB account. Defaults to `false`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<Boolean>> enableFreeTier() {
        return Optional.ofNullable(this.enableFreeTier);
    }

    /**
     * Enable multiple write locations for this Cosmos DB account.
     * 
     */
    @Import(name="enableMultipleWriteLocations")
    private @Nullable Output<Boolean> enableMultipleWriteLocations;

    /**
     * @return Enable multiple write locations for this Cosmos DB account.
     * 
     */
    public Optional<Output<Boolean>> enableMultipleWriteLocations() {
        return Optional.ofNullable(this.enableMultipleWriteLocations);
    }

    /**
     * The endpoint used to connect to the CosmosDB account.
     * 
     */
    @Import(name="endpoint")
    private @Nullable Output<String> endpoint;

    /**
     * @return The endpoint used to connect to the CosmosDB account.
     * 
     */
    public Optional<Output<String>> endpoint() {
        return Optional.ofNullable(this.endpoint);
    }

    /**
     * Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below.
     * 
     */
    @Import(name="geoLocations")
    private @Nullable Output<List<AccountGeoLocationArgs>> geoLocations;

    /**
     * @return Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below.
     * 
     */
    public Optional<Output<List<AccountGeoLocationArgs>>> geoLocations() {
        return Optional.ofNullable(this.geoLocations);
    }

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

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

    /**
     * CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
     * 
     * &gt; **NOTE:** To enable the &#34;Allow access from the Azure portal&#34; behavior, you should add the IP addresses provided by the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal) to this list.
     * 
     * &gt; **NOTE:** To enable the &#34;Accept connections from within public Azure datacenters&#34; behavior, you should add `0.0.0.0` to the list, see the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure) for more details.
     * 
     */
    @Import(name="ipRangeFilter")
    private @Nullable Output<String> ipRangeFilter;

    /**
     * @return CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
     * 
     * &gt; **NOTE:** To enable the &#34;Allow access from the Azure portal&#34; behavior, you should add the IP addresses provided by the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal) to this list.
     * 
     * &gt; **NOTE:** To enable the &#34;Accept connections from within public Azure datacenters&#34; behavior, you should add `0.0.0.0` to the list, see the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure) for more details.
     * 
     */
    public Optional<Output<String>> ipRangeFilter() {
        return Optional.ofNullable(this.ipRangeFilter);
    }

    /**
     * Enables virtual network filtering for this Cosmos DB account.
     * 
     */
    @Import(name="isVirtualNetworkFilterEnabled")
    private @Nullable Output<Boolean> isVirtualNetworkFilterEnabled;

    /**
     * @return Enables virtual network filtering for this Cosmos DB account.
     * 
     */
    public Optional<Output<Boolean>> isVirtualNetworkFilterEnabled() {
        return Optional.ofNullable(this.isVirtualNetworkFilterEnabled);
    }

    /**
     * A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When referencing an `azure.keyvault.Key` resource, use `versionless_id` instead of `id`
     * 
     * &gt; **NOTE:** In order to use a `Custom Key` from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the [product documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-cmk#add-an-access-policy-to-your-azure-key-vault-instance)
     * 
     */
    @Import(name="keyVaultKeyId")
    private @Nullable Output<String> keyVaultKeyId;

    /**
     * @return A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** When referencing an `azure.keyvault.Key` resource, use `versionless_id` instead of `id`
     * 
     * &gt; **NOTE:** In order to use a `Custom Key` from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the [product documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-cmk#add-an-access-policy-to-your-azure-key-vault-instance)
     * 
     */
    public Optional<Output<String>> keyVaultKeyId() {
        return Optional.ofNullable(this.keyVaultKeyId);
    }

    /**
     * Specifies the Kind of CosmosDB to create - possible values are `GlobalDocumentDB`, `MongoDB` and `Parse`. Defaults to `GlobalDocumentDB`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="kind")
    private @Nullable Output<String> kind;

    /**
     * @return Specifies the Kind of CosmosDB to create - possible values are `GlobalDocumentDB`, `MongoDB` and `Parse`. Defaults to `GlobalDocumentDB`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to `false`. Can be set only when using the SQL API.
     * 
     */
    @Import(name="localAuthenticationDisabled")
    private @Nullable Output<Boolean> localAuthenticationDisabled;

    /**
     * @return Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to `false`. Can be set only when using the SQL API.
     * 
     */
    public Optional<Output<Boolean>> localAuthenticationDisabled() {
        return Optional.ofNullable(this.localAuthenticationDisabled);
    }

    /**
     * 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 Server Version of a MongoDB account. Possible values are `4.2`, `4.0`, `3.6`, and `3.2`.
     * 
     */
    @Import(name="mongoServerVersion")
    private @Nullable Output<String> mongoServerVersion;

    /**
     * @return The Server Version of a MongoDB account. Possible values are `4.2`, `4.0`, `3.6`, and `3.2`.
     * 
     */
    public Optional<Output<String>> mongoServerVersion() {
        return Optional.ofNullable(this.mongoServerVersion);
    }

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

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

    /**
     * If Azure services can bypass ACLs. Defaults to `false`.
     * 
     */
    @Import(name="networkAclBypassForAzureServices")
    private @Nullable Output<Boolean> networkAclBypassForAzureServices;

    /**
     * @return If Azure services can bypass ACLs. Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> networkAclBypassForAzureServices() {
        return Optional.ofNullable(this.networkAclBypassForAzureServices);
    }

    /**
     * The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
     * 
     */
    @Import(name="networkAclBypassIds")
    private @Nullable Output<List<String>> networkAclBypassIds;

    /**
     * @return The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
     * 
     */
    public Optional<Output<List<String>>> networkAclBypassIds() {
        return Optional.ofNullable(this.networkAclBypassIds);
    }

    /**
     * Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
     * 
     */
    @Import(name="offerType")
    private @Nullable Output<String> offerType;

    /**
     * @return Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
     * 
     */
    public Optional<Output<String>> offerType() {
        return Optional.ofNullable(this.offerType);
    }

    /**
     * The Primary key for the CosmosDB Account.
     * 
     */
    @Import(name="primaryKey")
    private @Nullable Output<String> primaryKey;

    /**
     * @return The Primary key for the CosmosDB Account.
     * 
     */
    public Optional<Output<String>> primaryKey() {
        return Optional.ofNullable(this.primaryKey);
    }

    /**
     * The Primary read-only Key for the CosmosDB Account.
     * 
     */
    @Import(name="primaryReadonlyKey")
    private @Nullable Output<String> primaryReadonlyKey;

    /**
     * @return The Primary read-only Key for the CosmosDB Account.
     * 
     */
    public Optional<Output<String>> primaryReadonlyKey() {
        return Optional.ofNullable(this.primaryReadonlyKey);
    }

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

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

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

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

    /**
     * Whether or not public network access is allowed for this CosmosDB account. Defaults to `true`.
     * 
     */
    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output<Boolean> publicNetworkAccessEnabled;

    /**
     * @return Whether or not public network access is allowed for this CosmosDB account. Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * A list of read endpoints available for this CosmosDB account.
     * 
     */
    @Import(name="readEndpoints")
    private @Nullable Output<List<String>> readEndpoints;

    /**
     * @return A list of read endpoints available for this CosmosDB account.
     * 
     */
    public Optional<Output<List<String>>> readEndpoints() {
        return Optional.ofNullable(this.readEndpoints);
    }

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

    /**
     * A `restore` block as defined below.
     * 
     * &gt; **NOTE:** `restore` should be set when `create_mode` is `Restore`.
     * 
     */
    @Import(name="restore")
    private @Nullable Output<AccountRestoreArgs> restore;

    /**
     * @return A `restore` block as defined below.
     * 
     * &gt; **NOTE:** `restore` should be set when `create_mode` is `Restore`.
     * 
     */
    public Optional<Output<AccountRestoreArgs>> restore() {
        return Optional.ofNullable(this.restore);
    }

    /**
     * The Secondary key for the CosmosDB Account.
     * 
     */
    @Import(name="secondaryKey")
    private @Nullable Output<String> secondaryKey;

    /**
     * @return The Secondary key for the CosmosDB Account.
     * 
     */
    public Optional<Output<String>> secondaryKey() {
        return Optional.ofNullable(this.secondaryKey);
    }

    /**
     * The Secondary read-only key for the CosmosDB Account.
     * 
     */
    @Import(name="secondaryReadonlyKey")
    private @Nullable Output<String> secondaryReadonlyKey;

    /**
     * @return The Secondary read-only key for the CosmosDB Account.
     * 
     */
    public Optional<Output<String>> secondaryReadonlyKey() {
        return Optional.ofNullable(this.secondaryReadonlyKey);
    }

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

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

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

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

    /**
     * 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 a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account.
     * 
     */
    @Import(name="virtualNetworkRules")
    private @Nullable Output<List<AccountVirtualNetworkRuleArgs>> virtualNetworkRules;

    /**
     * @return Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account.
     * 
     */
    public Optional<Output<List<AccountVirtualNetworkRuleArgs>>> virtualNetworkRules() {
        return Optional.ofNullable(this.virtualNetworkRules);
    }

    /**
     * A list of write endpoints available for this CosmosDB account.
     * 
     */
    @Import(name="writeEndpoints")
    private @Nullable Output<List<String>> writeEndpoints;

    /**
     * @return A list of write endpoints available for this CosmosDB account.
     * 
     */
    public Optional<Output<List<String>>> writeEndpoints() {
        return Optional.ofNullable(this.writeEndpoints);
    }

    private AccountState() {}

    private AccountState(AccountState $) {
        this.accessKeyMetadataWritesEnabled = $.accessKeyMetadataWritesEnabled;
        this.analyticalStorage = $.analyticalStorage;
        this.analyticalStorageEnabled = $.analyticalStorageEnabled;
        this.backup = $.backup;
        this.capabilities = $.capabilities;
        this.capacity = $.capacity;
        this.connectionStrings = $.connectionStrings;
        this.consistencyPolicy = $.consistencyPolicy;
        this.corsRule = $.corsRule;
        this.createMode = $.createMode;
        this.defaultIdentityType = $.defaultIdentityType;
        this.enableAutomaticFailover = $.enableAutomaticFailover;
        this.enableFreeTier = $.enableFreeTier;
        this.enableMultipleWriteLocations = $.enableMultipleWriteLocations;
        this.endpoint = $.endpoint;
        this.geoLocations = $.geoLocations;
        this.identity = $.identity;
        this.ipRangeFilter = $.ipRangeFilter;
        this.isVirtualNetworkFilterEnabled = $.isVirtualNetworkFilterEnabled;
        this.keyVaultKeyId = $.keyVaultKeyId;
        this.kind = $.kind;
        this.localAuthenticationDisabled = $.localAuthenticationDisabled;
        this.location = $.location;
        this.mongoServerVersion = $.mongoServerVersion;
        this.name = $.name;
        this.networkAclBypassForAzureServices = $.networkAclBypassForAzureServices;
        this.networkAclBypassIds = $.networkAclBypassIds;
        this.offerType = $.offerType;
        this.primaryKey = $.primaryKey;
        this.primaryReadonlyKey = $.primaryReadonlyKey;
        this.primaryReadonlySqlConnectionString = $.primaryReadonlySqlConnectionString;
        this.primarySqlConnectionString = $.primarySqlConnectionString;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.readEndpoints = $.readEndpoints;
        this.resourceGroupName = $.resourceGroupName;
        this.restore = $.restore;
        this.secondaryKey = $.secondaryKey;
        this.secondaryReadonlyKey = $.secondaryReadonlyKey;
        this.secondaryReadonlySqlConnectionString = $.secondaryReadonlySqlConnectionString;
        this.secondarySqlConnectionString = $.secondarySqlConnectionString;
        this.tags = $.tags;
        this.virtualNetworkRules = $.virtualNetworkRules;
        this.writeEndpoints = $.writeEndpoints;
    }

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

    public static final class Builder {
        private AccountState $;

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

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

        /**
         * @param accessKeyMetadataWritesEnabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder accessKeyMetadataWritesEnabled(@Nullable Output<Boolean> accessKeyMetadataWritesEnabled) {
            $.accessKeyMetadataWritesEnabled = accessKeyMetadataWritesEnabled;
            return this;
        }

        /**
         * @param accessKeyMetadataWritesEnabled Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder accessKeyMetadataWritesEnabled(Boolean accessKeyMetadataWritesEnabled) {
            return accessKeyMetadataWritesEnabled(Output.of(accessKeyMetadataWritesEnabled));
        }

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

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

        /**
         * @param analyticalStorageEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to `false`. Enabling and then disabling analytical storage forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageEnabled(@Nullable Output<Boolean> analyticalStorageEnabled) {
            $.analyticalStorageEnabled = analyticalStorageEnabled;
            return this;
        }

        /**
         * @param analyticalStorageEnabled Enable Analytical Storage option for this Cosmos DB account. Defaults to `false`. Enabling and then disabling analytical storage forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageEnabled(Boolean analyticalStorageEnabled) {
            return analyticalStorageEnabled(Output.of(analyticalStorageEnabled));
        }

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

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

        /**
         * @param capabilities The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder capabilities(@Nullable Output<List<AccountCapabilityArgs>> capabilities) {
            $.capabilities = capabilities;
            return this;
        }

        /**
         * @param capabilities The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder capabilities(List<AccountCapabilityArgs> capabilities) {
            return capabilities(Output.of(capabilities));
        }

        /**
         * @param capabilities The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder capabilities(AccountCapabilityArgs... capabilities) {
            return capabilities(List.of(capabilities));
        }

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

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

        /**
         * @param connectionStrings A list of connection strings available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(@Nullable Output<List<String>> connectionStrings) {
            $.connectionStrings = connectionStrings;
            return this;
        }

        /**
         * @param connectionStrings A list of connection strings available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(List<String> connectionStrings) {
            return connectionStrings(Output.of(connectionStrings));
        }

        /**
         * @param connectionStrings A list of connection strings available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(String... connectionStrings) {
            return connectionStrings(List.of(connectionStrings));
        }

        /**
         * @param consistencyPolicy Specifies a `consistency_policy` resource, used to define the consistency policy for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder consistencyPolicy(@Nullable Output<AccountConsistencyPolicyArgs> consistencyPolicy) {
            $.consistencyPolicy = consistencyPolicy;
            return this;
        }

        /**
         * @param consistencyPolicy Specifies a `consistency_policy` resource, used to define the consistency policy for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder consistencyPolicy(AccountConsistencyPolicyArgs consistencyPolicy) {
            return consistencyPolicy(Output.of(consistencyPolicy));
        }

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

        /**
         * @param corsRule A `cors_rule` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder corsRule(AccountCorsRuleArgs corsRule) {
            return corsRule(Output.of(corsRule));
        }

        /**
         * @param createMode The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** `create_mode` only works when `backup.type` is `Continuous`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output<String> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** `create_mode` only works when `backup.type` is `Continuous`.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param defaultIdentityType The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
         * 
         * @return builder
         * 
         */
        public Builder defaultIdentityType(@Nullable Output<String> defaultIdentityType) {
            $.defaultIdentityType = defaultIdentityType;
            return this;
        }

        /**
         * @param defaultIdentityType The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
         * 
         * @return builder
         * 
         */
        public Builder defaultIdentityType(String defaultIdentityType) {
            return defaultIdentityType(Output.of(defaultIdentityType));
        }

        /**
         * @param enableAutomaticFailover Enable automatic failover for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticFailover(@Nullable Output<Boolean> enableAutomaticFailover) {
            $.enableAutomaticFailover = enableAutomaticFailover;
            return this;
        }

        /**
         * @param enableAutomaticFailover Enable automatic failover for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticFailover(Boolean enableAutomaticFailover) {
            return enableAutomaticFailover(Output.of(enableAutomaticFailover));
        }

        /**
         * @param enableFreeTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to `false`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder enableFreeTier(@Nullable Output<Boolean> enableFreeTier) {
            $.enableFreeTier = enableFreeTier;
            return this;
        }

        /**
         * @param enableFreeTier Enable the Free Tier pricing option for this Cosmos DB account. Defaults to `false`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder enableFreeTier(Boolean enableFreeTier) {
            return enableFreeTier(Output.of(enableFreeTier));
        }

        /**
         * @param enableMultipleWriteLocations Enable multiple write locations for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder enableMultipleWriteLocations(@Nullable Output<Boolean> enableMultipleWriteLocations) {
            $.enableMultipleWriteLocations = enableMultipleWriteLocations;
            return this;
        }

        /**
         * @param enableMultipleWriteLocations Enable multiple write locations for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder enableMultipleWriteLocations(Boolean enableMultipleWriteLocations) {
            return enableMultipleWriteLocations(Output.of(enableMultipleWriteLocations));
        }

        /**
         * @param endpoint The endpoint used to connect to the CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder endpoint(@Nullable Output<String> endpoint) {
            $.endpoint = endpoint;
            return this;
        }

        /**
         * @param endpoint The endpoint used to connect to the CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder endpoint(String endpoint) {
            return endpoint(Output.of(endpoint));
        }

        /**
         * @param geoLocations Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder geoLocations(@Nullable Output<List<AccountGeoLocationArgs>> geoLocations) {
            $.geoLocations = geoLocations;
            return this;
        }

        /**
         * @param geoLocations Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder geoLocations(List<AccountGeoLocationArgs> geoLocations) {
            return geoLocations(Output.of(geoLocations));
        }

        /**
         * @param geoLocations Specifies a `geo_location` resource, used to define where data should be replicated with the `failover_priority` 0 specifying the primary location. Value is a `geo_location` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder geoLocations(AccountGeoLocationArgs... geoLocations) {
            return geoLocations(List.of(geoLocations));
        }

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

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

        /**
         * @param ipRangeFilter CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
         * 
         * &gt; **NOTE:** To enable the &#34;Allow access from the Azure portal&#34; behavior, you should add the IP addresses provided by the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal) to this list.
         * 
         * &gt; **NOTE:** To enable the &#34;Accept connections from within public Azure datacenters&#34; behavior, you should add `0.0.0.0` to the list, see the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure) for more details.
         * 
         * @return builder
         * 
         */
        public Builder ipRangeFilter(@Nullable Output<String> ipRangeFilter) {
            $.ipRangeFilter = ipRangeFilter;
            return this;
        }

        /**
         * @param ipRangeFilter CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
         * 
         * &gt; **NOTE:** To enable the &#34;Allow access from the Azure portal&#34; behavior, you should add the IP addresses provided by the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-the-azure-portal) to this list.
         * 
         * &gt; **NOTE:** To enable the &#34;Accept connections from within public Azure datacenters&#34; behavior, you should add `0.0.0.0` to the list, see the [documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure) for more details.
         * 
         * @return builder
         * 
         */
        public Builder ipRangeFilter(String ipRangeFilter) {
            return ipRangeFilter(Output.of(ipRangeFilter));
        }

        /**
         * @param isVirtualNetworkFilterEnabled Enables virtual network filtering for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder isVirtualNetworkFilterEnabled(@Nullable Output<Boolean> isVirtualNetworkFilterEnabled) {
            $.isVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
            return this;
        }

        /**
         * @param isVirtualNetworkFilterEnabled Enables virtual network filtering for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder isVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled) {
            return isVirtualNetworkFilterEnabled(Output.of(isVirtualNetworkFilterEnabled));
        }

        /**
         * @param keyVaultKeyId A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** When referencing an `azure.keyvault.Key` resource, use `versionless_id` instead of `id`
         * 
         * &gt; **NOTE:** In order to use a `Custom Key` from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the [product documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-cmk#add-an-access-policy-to-your-azure-key-vault-instance)
         * 
         * @return builder
         * 
         */
        public Builder keyVaultKeyId(@Nullable Output<String> keyVaultKeyId) {
            $.keyVaultKeyId = keyVaultKeyId;
            return this;
        }

        /**
         * @param keyVaultKeyId A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** When referencing an `azure.keyvault.Key` resource, use `versionless_id` instead of `id`
         * 
         * &gt; **NOTE:** In order to use a `Custom Key` from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the [product documentation](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-cmk#add-an-access-policy-to-your-azure-key-vault-instance)
         * 
         * @return builder
         * 
         */
        public Builder keyVaultKeyId(String keyVaultKeyId) {
            return keyVaultKeyId(Output.of(keyVaultKeyId));
        }

        /**
         * @param kind Specifies the Kind of CosmosDB to create - possible values are `GlobalDocumentDB`, `MongoDB` and `Parse`. Defaults to `GlobalDocumentDB`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output<String> kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Specifies the Kind of CosmosDB to create - possible values are `GlobalDocumentDB`, `MongoDB` and `Parse`. Defaults to `GlobalDocumentDB`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param localAuthenticationDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to `false`. Can be set only when using the SQL API.
         * 
         * @return builder
         * 
         */
        public Builder localAuthenticationDisabled(@Nullable Output<Boolean> localAuthenticationDisabled) {
            $.localAuthenticationDisabled = localAuthenticationDisabled;
            return this;
        }

        /**
         * @param localAuthenticationDisabled Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to `false`. Can be set only when using the SQL API.
         * 
         * @return builder
         * 
         */
        public Builder localAuthenticationDisabled(Boolean localAuthenticationDisabled) {
            return localAuthenticationDisabled(Output.of(localAuthenticationDisabled));
        }

        /**
         * @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 mongoServerVersion The Server Version of a MongoDB account. Possible values are `4.2`, `4.0`, `3.6`, and `3.2`.
         * 
         * @return builder
         * 
         */
        public Builder mongoServerVersion(@Nullable Output<String> mongoServerVersion) {
            $.mongoServerVersion = mongoServerVersion;
            return this;
        }

        /**
         * @param mongoServerVersion The Server Version of a MongoDB account. Possible values are `4.2`, `4.0`, `3.6`, and `3.2`.
         * 
         * @return builder
         * 
         */
        public Builder mongoServerVersion(String mongoServerVersion) {
            return mongoServerVersion(Output.of(mongoServerVersion));
        }

        /**
         * @param name Specifies the name of the CosmosDB Account. 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 CosmosDB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param networkAclBypassForAzureServices If Azure services can bypass ACLs. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassForAzureServices(@Nullable Output<Boolean> networkAclBypassForAzureServices) {
            $.networkAclBypassForAzureServices = networkAclBypassForAzureServices;
            return this;
        }

        /**
         * @param networkAclBypassForAzureServices If Azure services can bypass ACLs. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassForAzureServices(Boolean networkAclBypassForAzureServices) {
            return networkAclBypassForAzureServices(Output.of(networkAclBypassForAzureServices));
        }

        /**
         * @param networkAclBypassIds The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassIds(@Nullable Output<List<String>> networkAclBypassIds) {
            $.networkAclBypassIds = networkAclBypassIds;
            return this;
        }

        /**
         * @param networkAclBypassIds The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassIds(List<String> networkAclBypassIds) {
            return networkAclBypassIds(Output.of(networkAclBypassIds));
        }

        /**
         * @param networkAclBypassIds The list of resource Ids for Network Acl Bypass for this Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassIds(String... networkAclBypassIds) {
            return networkAclBypassIds(List.of(networkAclBypassIds));
        }

        /**
         * @param offerType Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
         * 
         * @return builder
         * 
         */
        public Builder offerType(@Nullable Output<String> offerType) {
            $.offerType = offerType;
            return this;
        }

        /**
         * @param offerType Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
         * 
         * @return builder
         * 
         */
        public Builder offerType(String offerType) {
            return offerType(Output.of(offerType));
        }

        /**
         * @param primaryKey The Primary key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(@Nullable Output<String> primaryKey) {
            $.primaryKey = primaryKey;
            return this;
        }

        /**
         * @param primaryKey The Primary key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(String primaryKey) {
            return primaryKey(Output.of(primaryKey));
        }

        /**
         * @param primaryReadonlyKey The Primary read-only Key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder primaryReadonlyKey(@Nullable Output<String> primaryReadonlyKey) {
            $.primaryReadonlyKey = primaryReadonlyKey;
            return this;
        }

        /**
         * @param primaryReadonlyKey The Primary read-only Key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder primaryReadonlyKey(String primaryReadonlyKey) {
            return primaryReadonlyKey(Output.of(primaryReadonlyKey));
        }

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

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

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

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

        /**
         * @param publicNetworkAccessEnabled Whether or not public network access is allowed for this CosmosDB account. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(@Nullable Output<Boolean> publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        /**
         * @param publicNetworkAccessEnabled Whether or not public network access is allowed for this CosmosDB account. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param readEndpoints A list of read endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder readEndpoints(@Nullable Output<List<String>> readEndpoints) {
            $.readEndpoints = readEndpoints;
            return this;
        }

        /**
         * @param readEndpoints A list of read endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder readEndpoints(List<String> readEndpoints) {
            return readEndpoints(Output.of(readEndpoints));
        }

        /**
         * @param readEndpoints A list of read endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder readEndpoints(String... readEndpoints) {
            return readEndpoints(List.of(readEndpoints));
        }

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

        /**
         * @param restore A `restore` block as defined below.
         * 
         * &gt; **NOTE:** `restore` should be set when `create_mode` is `Restore`.
         * 
         * @return builder
         * 
         */
        public Builder restore(@Nullable Output<AccountRestoreArgs> restore) {
            $.restore = restore;
            return this;
        }

        /**
         * @param restore A `restore` block as defined below.
         * 
         * &gt; **NOTE:** `restore` should be set when `create_mode` is `Restore`.
         * 
         * @return builder
         * 
         */
        public Builder restore(AccountRestoreArgs restore) {
            return restore(Output.of(restore));
        }

        /**
         * @param secondaryKey The Secondary key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(@Nullable Output<String> secondaryKey) {
            $.secondaryKey = secondaryKey;
            return this;
        }

        /**
         * @param secondaryKey The Secondary key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(String secondaryKey) {
            return secondaryKey(Output.of(secondaryKey));
        }

        /**
         * @param secondaryReadonlyKey The Secondary read-only key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder secondaryReadonlyKey(@Nullable Output<String> secondaryReadonlyKey) {
            $.secondaryReadonlyKey = secondaryReadonlyKey;
            return this;
        }

        /**
         * @param secondaryReadonlyKey The Secondary read-only key for the CosmosDB Account.
         * 
         * @return builder
         * 
         */
        public Builder secondaryReadonlyKey(String secondaryReadonlyKey) {
            return secondaryReadonlyKey(Output.of(secondaryReadonlyKey));
        }

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

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

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

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

        /**
         * @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 virtualNetworkRules Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(@Nullable Output<List<AccountVirtualNetworkRuleArgs>> virtualNetworkRules) {
            $.virtualNetworkRules = virtualNetworkRules;
            return this;
        }

        /**
         * @param virtualNetworkRules Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(List<AccountVirtualNetworkRuleArgs> virtualNetworkRules) {
            return virtualNetworkRules(Output.of(virtualNetworkRules));
        }

        /**
         * @param virtualNetworkRules Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(AccountVirtualNetworkRuleArgs... virtualNetworkRules) {
            return virtualNetworkRules(List.of(virtualNetworkRules));
        }

        /**
         * @param writeEndpoints A list of write endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder writeEndpoints(@Nullable Output<List<String>> writeEndpoints) {
            $.writeEndpoints = writeEndpoints;
            return this;
        }

        /**
         * @param writeEndpoints A list of write endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder writeEndpoints(List<String> writeEndpoints) {
            return writeEndpoints(Output.of(writeEndpoints));
        }

        /**
         * @param writeEndpoints A list of write endpoints available for this CosmosDB account.
         * 
         * @return builder
         * 
         */
        public Builder writeEndpoints(String... writeEndpoints) {
            return writeEndpoints(List.of(writeEndpoints));
        }

        public AccountState build() {
            return $;
        }
    }

}
