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

import com.pulumi.azure.sql.inputs.DatabaseImportArgs;
import com.pulumi.azure.sql.inputs.DatabaseThreatDetectionPolicyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DatabaseState Empty = new DatabaseState();

    /**
     * The name of the collation. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="collation")
    private @Nullable Output<String> collation;

    /**
     * @return The name of the collation. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> collation() {
        return Optional.ofNullable(this.collation);
    }

    /**
     * Specifies how to create the database. Valid values are: `Default`, `Copy`, `OnlineSecondary`, `NonReadableSecondary`, `PointInTimeRestore`, `Recovery`, `Restore` or `RestoreLongTermRetentionBackup`. Must be `Default` to create a new database. Defaults to `Default`. Please see [Azure SQL Database REST API](https://docs.microsoft.com/rest/api/sql/databases/createorupdate#createmode)
     * 
     */
    @Import(name="createMode")
    private @Nullable Output<String> createMode;

    /**
     * @return Specifies how to create the database. Valid values are: `Default`, `Copy`, `OnlineSecondary`, `NonReadableSecondary`, `PointInTimeRestore`, `Recovery`, `Restore` or `RestoreLongTermRetentionBackup`. Must be `Default` to create a new database. Defaults to `Default`. Please see [Azure SQL Database REST API](https://docs.microsoft.com/rest/api/sql/databases/createorupdate#createmode)
     * 
     */
    public Optional<Output<String>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * The creation date of the SQL Database.
     * 
     */
    @Import(name="creationDate")
    private @Nullable Output<String> creationDate;

    /**
     * @return The creation date of the SQL Database.
     * 
     */
    public Optional<Output<String>> creationDate() {
        return Optional.ofNullable(this.creationDate);
    }

    /**
     * The default secondary location of the SQL Database.
     * 
     */
    @Import(name="defaultSecondaryLocation")
    private @Nullable Output<String> defaultSecondaryLocation;

    /**
     * @return The default secondary location of the SQL Database.
     * 
     */
    public Optional<Output<String>> defaultSecondaryLocation() {
        return Optional.ofNullable(this.defaultSecondaryLocation);
    }

    /**
     * The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`, `DataWarehouse`, `Business`, `BusinessCritical`, `Free`, `GeneralPurpose`, `Hyperscale`, `Premium`, `PremiumRS`, `Standard`, `Stretch`, `System`, `System2`, or `Web`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
     * 
     */
    @Import(name="edition")
    private @Nullable Output<String> edition;

    /**
     * @return The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`, `DataWarehouse`, `Business`, `BusinessCritical`, `Free`, `GeneralPurpose`, `Hyperscale`, `Premium`, `PremiumRS`, `Standard`, `Stretch`, `System`, `System2`, or `Web`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
     * 
     */
    public Optional<Output<String>> edition() {
        return Optional.ofNullable(this.edition);
    }

    /**
     * The name of the elastic database pool.
     * 
     */
    @Import(name="elasticPoolName")
    private @Nullable Output<String> elasticPoolName;

    /**
     * @return The name of the elastic database pool.
     * 
     */
    public Optional<Output<String>> elasticPoolName() {
        return Optional.ofNullable(this.elasticPoolName);
    }

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

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

    /**
     * A Database Import block as documented below. `create_mode` must be set to `Default`.
     * 
     */
    @Import(name="import")
    private @Nullable Output<DatabaseImportArgs> import_;

    /**
     * @return A Database Import block as documented below. `create_mode` must be set to `Default`.
     * 
     */
    public Optional<Output<DatabaseImportArgs>> import_() {
        return Optional.ofNullable(this.import_);
    }

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

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

    /**
     * The maximum size that the database can grow to. Applies only if `create_mode` is `Default`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
     * 
     */
    @Import(name="maxSizeBytes")
    private @Nullable Output<String> maxSizeBytes;

    /**
     * @return The maximum size that the database can grow to. Applies only if `create_mode` is `Default`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
     * 
     */
    public Optional<Output<String>> maxSizeBytes() {
        return Optional.ofNullable(this.maxSizeBytes);
    }

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

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

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

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

    /**
     * Read-only connections will be redirected to a high-available replica. Please see [Use read-only replicas to load-balance read-only query workloads](https://docs.microsoft.com/azure/sql-database/sql-database-read-scale-out).
     * 
     */
    @Import(name="readScale")
    private @Nullable Output<Boolean> readScale;

    /**
     * @return Read-only connections will be redirected to a high-available replica. Please see [Use read-only replicas to load-balance read-only query workloads](https://docs.microsoft.com/azure/sql-database/sql-database-read-scale-out).
     * 
     */
    public Optional<Output<Boolean>> readScale() {
        return Optional.ofNullable(this.readScale);
    }

    /**
     * A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level.
     * .
     * 
     */
    @Import(name="requestedServiceObjectiveId")
    private @Nullable Output<String> requestedServiceObjectiveId;

    /**
     * @return A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level.
     * .
     * 
     */
    public Optional<Output<String>> requestedServiceObjectiveId() {
        return Optional.ofNullable(this.requestedServiceObjectiveId);
    }

    /**
     * The service objective name for the database. Valid values depend on edition and location and may include `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`. You can list the available names with the CLI: `shell az sql db list-editions -l westus -o table`. For further information please see [Azure CLI - az sql db](https://docs.microsoft.com/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions).
     * 
     */
    @Import(name="requestedServiceObjectiveName")
    private @Nullable Output<String> requestedServiceObjectiveName;

    /**
     * @return The service objective name for the database. Valid values depend on edition and location and may include `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`. You can list the available names with the CLI: `shell az sql db list-editions -l westus -o table`. For further information please see [Azure CLI - az sql db](https://docs.microsoft.com/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions).
     * 
     */
    public Optional<Output<String>> requestedServiceObjectiveName() {
        return Optional.ofNullable(this.requestedServiceObjectiveName);
    }

    /**
     * The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. 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 database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore`, it should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
     * 
     */
    @Import(name="restorePointInTime")
    private @Nullable Output<String> restorePointInTime;

    /**
     * @return The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore`, it should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
     * 
     */
    public Optional<Output<String>> restorePointInTime() {
        return Optional.ofNullable(this.restorePointInTime);
    }

    /**
     * The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="serverName")
    private @Nullable Output<String> serverName;

    /**
     * @return The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> serverName() {
        return Optional.ofNullable(this.serverName);
    }

    /**
     * The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`.
     * 
     */
    @Import(name="sourceDatabaseDeletionDate")
    private @Nullable Output<String> sourceDatabaseDeletionDate;

    /**
     * @return The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`.
     * 
     */
    public Optional<Output<String>> sourceDatabaseDeletionDate() {
        return Optional.ofNullable(this.sourceDatabaseDeletionDate);
    }

    /**
     * The URI of the source database if `create_mode` value is not `Default`.
     * 
     */
    @Import(name="sourceDatabaseId")
    private @Nullable Output<String> sourceDatabaseId;

    /**
     * @return The URI of the source database if `create_mode` value is not `Default`.
     * 
     */
    public Optional<Output<String>> sourceDatabaseId() {
        return Optional.ofNullable(this.sourceDatabaseId);
    }

    /**
     * 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);
    }

    /**
     * Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below.
     * 
     */
    @Import(name="threatDetectionPolicy")
    private @Nullable Output<DatabaseThreatDetectionPolicyArgs> threatDetectionPolicy;

    /**
     * @return Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below.
     * 
     */
    public Optional<Output<DatabaseThreatDetectionPolicyArgs>> threatDetectionPolicy() {
        return Optional.ofNullable(this.threatDetectionPolicy);
    }

    /**
     * Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
     * 
     */
    @Import(name="zoneRedundant")
    private @Nullable Output<Boolean> zoneRedundant;

    /**
     * @return Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
     * 
     */
    public Optional<Output<Boolean>> zoneRedundant() {
        return Optional.ofNullable(this.zoneRedundant);
    }

    private DatabaseState() {}

    private DatabaseState(DatabaseState $) {
        this.collation = $.collation;
        this.createMode = $.createMode;
        this.creationDate = $.creationDate;
        this.defaultSecondaryLocation = $.defaultSecondaryLocation;
        this.edition = $.edition;
        this.elasticPoolName = $.elasticPoolName;
        this.encryption = $.encryption;
        this.import_ = $.import_;
        this.location = $.location;
        this.maxSizeBytes = $.maxSizeBytes;
        this.maxSizeGb = $.maxSizeGb;
        this.name = $.name;
        this.readScale = $.readScale;
        this.requestedServiceObjectiveId = $.requestedServiceObjectiveId;
        this.requestedServiceObjectiveName = $.requestedServiceObjectiveName;
        this.resourceGroupName = $.resourceGroupName;
        this.restorePointInTime = $.restorePointInTime;
        this.serverName = $.serverName;
        this.sourceDatabaseDeletionDate = $.sourceDatabaseDeletionDate;
        this.sourceDatabaseId = $.sourceDatabaseId;
        this.tags = $.tags;
        this.threatDetectionPolicy = $.threatDetectionPolicy;
        this.zoneRedundant = $.zoneRedundant;
    }

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

    public static final class Builder {
        private DatabaseState $;

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

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

        /**
         * @param collation The name of the collation. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder collation(@Nullable Output<String> collation) {
            $.collation = collation;
            return this;
        }

        /**
         * @param collation The name of the collation. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder collation(String collation) {
            return collation(Output.of(collation));
        }

        /**
         * @param createMode Specifies how to create the database. Valid values are: `Default`, `Copy`, `OnlineSecondary`, `NonReadableSecondary`, `PointInTimeRestore`, `Recovery`, `Restore` or `RestoreLongTermRetentionBackup`. Must be `Default` to create a new database. Defaults to `Default`. Please see [Azure SQL Database REST API](https://docs.microsoft.com/rest/api/sql/databases/createorupdate#createmode)
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output<String> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode Specifies how to create the database. Valid values are: `Default`, `Copy`, `OnlineSecondary`, `NonReadableSecondary`, `PointInTimeRestore`, `Recovery`, `Restore` or `RestoreLongTermRetentionBackup`. Must be `Default` to create a new database. Defaults to `Default`. Please see [Azure SQL Database REST API](https://docs.microsoft.com/rest/api/sql/databases/createorupdate#createmode)
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param creationDate The creation date of the SQL Database.
         * 
         * @return builder
         * 
         */
        public Builder creationDate(@Nullable Output<String> creationDate) {
            $.creationDate = creationDate;
            return this;
        }

        /**
         * @param creationDate The creation date of the SQL Database.
         * 
         * @return builder
         * 
         */
        public Builder creationDate(String creationDate) {
            return creationDate(Output.of(creationDate));
        }

        /**
         * @param defaultSecondaryLocation The default secondary location of the SQL Database.
         * 
         * @return builder
         * 
         */
        public Builder defaultSecondaryLocation(@Nullable Output<String> defaultSecondaryLocation) {
            $.defaultSecondaryLocation = defaultSecondaryLocation;
            return this;
        }

        /**
         * @param defaultSecondaryLocation The default secondary location of the SQL Database.
         * 
         * @return builder
         * 
         */
        public Builder defaultSecondaryLocation(String defaultSecondaryLocation) {
            return defaultSecondaryLocation(Output.of(defaultSecondaryLocation));
        }

        /**
         * @param edition The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`, `DataWarehouse`, `Business`, `BusinessCritical`, `Free`, `GeneralPurpose`, `Hyperscale`, `Premium`, `PremiumRS`, `Standard`, `Stretch`, `System`, `System2`, or `Web`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
         * 
         * @return builder
         * 
         */
        public Builder edition(@Nullable Output<String> edition) {
            $.edition = edition;
            return this;
        }

        /**
         * @param edition The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`, `DataWarehouse`, `Business`, `BusinessCritical`, `Free`, `GeneralPurpose`, `Hyperscale`, `Premium`, `PremiumRS`, `Standard`, `Stretch`, `System`, `System2`, or `Web`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
         * 
         * @return builder
         * 
         */
        public Builder edition(String edition) {
            return edition(Output.of(edition));
        }

        /**
         * @param elasticPoolName The name of the elastic database pool.
         * 
         * @return builder
         * 
         */
        public Builder elasticPoolName(@Nullable Output<String> elasticPoolName) {
            $.elasticPoolName = elasticPoolName;
            return this;
        }

        /**
         * @param elasticPoolName The name of the elastic database pool.
         * 
         * @return builder
         * 
         */
        public Builder elasticPoolName(String elasticPoolName) {
            return elasticPoolName(Output.of(elasticPoolName));
        }

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

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

        /**
         * @param import_ A Database Import block as documented below. `create_mode` must be set to `Default`.
         * 
         * @return builder
         * 
         */
        public Builder import_(@Nullable Output<DatabaseImportArgs> import_) {
            $.import_ = import_;
            return this;
        }

        /**
         * @param import_ A Database Import block as documented below. `create_mode` must be set to `Default`.
         * 
         * @return builder
         * 
         */
        public Builder import_(DatabaseImportArgs import_) {
            return import_(Output.of(import_));
        }

        /**
         * @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 maxSizeBytes The maximum size that the database can grow to. Applies only if `create_mode` is `Default`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
         * 
         * @return builder
         * 
         */
        public Builder maxSizeBytes(@Nullable Output<String> maxSizeBytes) {
            $.maxSizeBytes = maxSizeBytes;
            return this;
        }

        /**
         * @param maxSizeBytes The maximum size that the database can grow to. Applies only if `create_mode` is `Default`. Please see [Azure SQL database models](https://docs.microsoft.com/azure/azure-sql/database/purchasing-models?view=azuresql).
         * 
         * @return builder
         * 
         */
        public Builder maxSizeBytes(String maxSizeBytes) {
            return maxSizeBytes(Output.of(maxSizeBytes));
        }

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

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

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

        /**
         * @param readScale Read-only connections will be redirected to a high-available replica. Please see [Use read-only replicas to load-balance read-only query workloads](https://docs.microsoft.com/azure/sql-database/sql-database-read-scale-out).
         * 
         * @return builder
         * 
         */
        public Builder readScale(@Nullable Output<Boolean> readScale) {
            $.readScale = readScale;
            return this;
        }

        /**
         * @param readScale Read-only connections will be redirected to a high-available replica. Please see [Use read-only replicas to load-balance read-only query workloads](https://docs.microsoft.com/azure/sql-database/sql-database-read-scale-out).
         * 
         * @return builder
         * 
         */
        public Builder readScale(Boolean readScale) {
            return readScale(Output.of(readScale));
        }

        /**
         * @param requestedServiceObjectiveId A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level.
         * .
         * 
         * @return builder
         * 
         */
        public Builder requestedServiceObjectiveId(@Nullable Output<String> requestedServiceObjectiveId) {
            $.requestedServiceObjectiveId = requestedServiceObjectiveId;
            return this;
        }

        /**
         * @param requestedServiceObjectiveId A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level.
         * .
         * 
         * @return builder
         * 
         */
        public Builder requestedServiceObjectiveId(String requestedServiceObjectiveId) {
            return requestedServiceObjectiveId(Output.of(requestedServiceObjectiveId));
        }

        /**
         * @param requestedServiceObjectiveName The service objective name for the database. Valid values depend on edition and location and may include `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`. You can list the available names with the CLI: `shell az sql db list-editions -l westus -o table`. For further information please see [Azure CLI - az sql db](https://docs.microsoft.com/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions).
         * 
         * @return builder
         * 
         */
        public Builder requestedServiceObjectiveName(@Nullable Output<String> requestedServiceObjectiveName) {
            $.requestedServiceObjectiveName = requestedServiceObjectiveName;
            return this;
        }

        /**
         * @param requestedServiceObjectiveName The service objective name for the database. Valid values depend on edition and location and may include `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`. You can list the available names with the CLI: `shell az sql db list-editions -l westus -o table`. For further information please see [Azure CLI - az sql db](https://docs.microsoft.com/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions).
         * 
         * @return builder
         * 
         */
        public Builder requestedServiceObjectiveName(String requestedServiceObjectiveName) {
            return requestedServiceObjectiveName(Output.of(requestedServiceObjectiveName));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. 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 database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param restorePointInTime The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore`, it should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(@Nullable Output<String> restorePointInTime) {
            $.restorePointInTime = restorePointInTime;
            return this;
        }

        /**
         * @param restorePointInTime The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore`, it should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(String restorePointInTime) {
            return restorePointInTime(Output.of(restorePointInTime));
        }

        /**
         * @param serverName The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverName(@Nullable Output<String> serverName) {
            $.serverName = serverName;
            return this;
        }

        /**
         * @param serverName The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverName(String serverName) {
            return serverName(Output.of(serverName));
        }

        /**
         * @param sourceDatabaseDeletionDate The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseDeletionDate(@Nullable Output<String> sourceDatabaseDeletionDate) {
            $.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate;
            return this;
        }

        /**
         * @param sourceDatabaseDeletionDate The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseDeletionDate(String sourceDatabaseDeletionDate) {
            return sourceDatabaseDeletionDate(Output.of(sourceDatabaseDeletionDate));
        }

        /**
         * @param sourceDatabaseId The URI of the source database if `create_mode` value is not `Default`.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseId(@Nullable Output<String> sourceDatabaseId) {
            $.sourceDatabaseId = sourceDatabaseId;
            return this;
        }

        /**
         * @param sourceDatabaseId The URI of the source database if `create_mode` value is not `Default`.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseId(String sourceDatabaseId) {
            return sourceDatabaseId(Output.of(sourceDatabaseId));
        }

        /**
         * @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 threatDetectionPolicy Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder threatDetectionPolicy(@Nullable Output<DatabaseThreatDetectionPolicyArgs> threatDetectionPolicy) {
            $.threatDetectionPolicy = threatDetectionPolicy;
            return this;
        }

        /**
         * @param threatDetectionPolicy Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder threatDetectionPolicy(DatabaseThreatDetectionPolicyArgs threatDetectionPolicy) {
            return threatDetectionPolicy(Output.of(threatDetectionPolicy));
        }

        /**
         * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(@Nullable Output<Boolean> zoneRedundant) {
            $.zoneRedundant = zoneRedundant;
            return this;
        }

        /**
         * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(Boolean zoneRedundant) {
            return zoneRedundant(Output.of(zoneRedundant));
        }

        public DatabaseState build() {
            return $;
        }
    }

}
