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

import com.pulumi.azure.mysql.inputs.FlexibleServerCustomerManagedKeyArgs;
import com.pulumi.azure.mysql.inputs.FlexibleServerHighAvailabilityArgs;
import com.pulumi.azure.mysql.inputs.FlexibleServerIdentityArgs;
import com.pulumi.azure.mysql.inputs.FlexibleServerMaintenanceWindowArgs;
import com.pulumi.azure.mysql.inputs.FlexibleServerStorageArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FlexibleServerState Empty = new FlexibleServerState();

    /**
     * The Administrator login for the MySQL Flexible Server. Required when `create_mode` is `Default`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="administratorLogin")
    private @Nullable Output<String> administratorLogin;

    /**
     * @return The Administrator login for the MySQL Flexible Server. Required when `create_mode` is `Default`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> administratorLogin() {
        return Optional.ofNullable(this.administratorLogin);
    }

    /**
     * The Password associated with the `administrator_login` for the MySQL Flexible Server. Required when `create_mode` is `Default`.
     * 
     */
    @Import(name="administratorPassword")
    private @Nullable Output<String> administratorPassword;

    /**
     * @return The Password associated with the `administrator_login` for the MySQL Flexible Server. Required when `create_mode` is `Default`.
     * 
     */
    public Optional<Output<String>> administratorPassword() {
        return Optional.ofNullable(this.administratorPassword);
    }

    /**
     * The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`.
     * 
     */
    @Import(name="backupRetentionDays")
    private @Nullable Output<Integer> backupRetentionDays;

    /**
     * @return The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`.
     * 
     */
    public Optional<Output<Integer>> backupRetentionDays() {
        return Optional.ofNullable(this.backupRetentionDays);
    }

    /**
     * The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     * &gt; **NOTE:** Creating a `GeoRestore` server requires the source server with `geo_redundant_backup_enabled` enabled.
     * 
     * &gt; **NOTE:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output<String> createMode;

    /**
     * @return The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     * &gt; **NOTE:** Creating a `GeoRestore` server requires the source server with `geo_redundant_backup_enabled` enabled.
     * 
     * &gt; **NOTE:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information.
     * 
     */
    public Optional<Output<String>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * A `customer_managed_key` block as defined below.
     * 
     * &gt; **NOTE:** `identity` is required when `customer_managed_key` is specified.
     * 
     */
    @Import(name="customerManagedKey")
    private @Nullable Output<FlexibleServerCustomerManagedKeyArgs> customerManagedKey;

    /**
     * @return A `customer_managed_key` block as defined below.
     * 
     * &gt; **NOTE:** `identity` is required when `customer_managed_key` is specified.
     * 
     */
    public Optional<Output<FlexibleServerCustomerManagedKeyArgs>> customerManagedKey() {
        return Optional.ofNullable(this.customerManagedKey);
    }

    /**
     * The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="delegatedSubnetId")
    private @Nullable Output<String> delegatedSubnetId;

    /**
     * @return The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> delegatedSubnetId() {
        return Optional.ofNullable(this.delegatedSubnetId);
    }

    /**
     * The fully qualified domain name of the MySQL Flexible Server.
     * 
     */
    @Import(name="fqdn")
    private @Nullable Output<String> fqdn;

    /**
     * @return The fully qualified domain name of the MySQL Flexible Server.
     * 
     */
    public Optional<Output<String>> fqdn() {
        return Optional.ofNullable(this.fqdn);
    }

    /**
     * Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="geoRedundantBackupEnabled")
    private @Nullable Output<Boolean> geoRedundantBackupEnabled;

    /**
     * @return Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<Boolean>> geoRedundantBackupEnabled() {
        return Optional.ofNullable(this.geoRedundantBackupEnabled);
    }

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

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

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

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

    /**
     * The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

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

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

    /**
     * The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The point in time to restore from `creation_source_server_id` when `create_mode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="pointInTimeRestoreTimeInUtc")
    private @Nullable Output<String> pointInTimeRestoreTimeInUtc;

    /**
     * @return The point in time to restore from `creation_source_server_id` when `create_mode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> pointInTimeRestoreTimeInUtc() {
        return Optional.ofNullable(this.pointInTimeRestoreTimeInUtc);
    }

    /**
     * The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     * &gt; **NOTE:** The `private_dns_zone_id` is required when setting a `delegated_subnet_id`. The `azure.privatedns.Zone` should end with suffix `.mysql.database.azure.com`.
     * 
     */
    @Import(name="privateDnsZoneId")
    private @Nullable Output<String> privateDnsZoneId;

    /**
     * @return The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
     * 
     * &gt; **NOTE:** The `private_dns_zone_id` is required when setting a `delegated_subnet_id`. The `azure.privatedns.Zone` should end with suffix `.mysql.database.azure.com`.
     * 
     */
    public Optional<Output<String>> privateDnsZoneId() {
        return Optional.ofNullable(this.privateDnsZoneId);
    }

    /**
     * Is the public network access enabled?
     * 
     */
    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output<Boolean> publicNetworkAccessEnabled;

    /**
     * @return Is the public network access enabled?
     * 
     */
    public Optional<Output<Boolean>> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * The maximum number of replicas that a primary MySQL Flexible Server can have.
     * 
     */
    @Import(name="replicaCapacity")
    private @Nullable Output<Integer> replicaCapacity;

    /**
     * @return The maximum number of replicas that a primary MySQL Flexible Server can have.
     * 
     */
    public Optional<Output<Integer>> replicaCapacity() {
        return Optional.ofNullable(this.replicaCapacity);
    }

    /**
     * The replication role. Possible value is `None`.
     * 
     * &gt; **NOTE:** The `replication_role` cannot be set while creating and only can be updated from `Replica` to `None`.
     * 
     */
    @Import(name="replicationRole")
    private @Nullable Output<String> replicationRole;

    /**
     * @return The replication role. Possible value is `None`.
     * 
     * &gt; **NOTE:** The `replication_role` cannot be set while creating and only can be updated from `Replica` to `None`.
     * 
     */
    public Optional<Output<String>> replicationRole() {
        return Optional.ofNullable(this.replicationRole);
    }

    /**
     * The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The SKU Name for the MySQL Flexible Server.
     * 
     * &gt; **NOTE:** `sku_name` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1s`.
     * 
     */
    @Import(name="skuName")
    private @Nullable Output<String> skuName;

    /**
     * @return The SKU Name for the MySQL Flexible Server.
     * 
     * &gt; **NOTE:** `sku_name` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1s`.
     * 
     */
    public Optional<Output<String>> skuName() {
        return Optional.ofNullable(this.skuName);
    }

    /**
     * The resource ID of the source MySQL Flexible Server to be restored. Required when `create_mode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="sourceServerId")
    private @Nullable Output<String> sourceServerId;

    /**
     * @return The resource ID of the source MySQL Flexible Server to be restored. Required when `create_mode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> sourceServerId() {
        return Optional.ofNullable(this.sourceServerId);
    }

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

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

    /**
     * A mapping of tags which should be assigned to the MySQL Flexible Server.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags which should be assigned to the MySQL Flexible Server.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    @Import(name="version")
    private @Nullable Output<String> version;

    /**
     * @return The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created.
     * 
     */
    public Optional<Output<String>> version() {
        return Optional.ofNullable(this.version);
    }

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

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

    private FlexibleServerState() {}

    private FlexibleServerState(FlexibleServerState $) {
        this.administratorLogin = $.administratorLogin;
        this.administratorPassword = $.administratorPassword;
        this.backupRetentionDays = $.backupRetentionDays;
        this.createMode = $.createMode;
        this.customerManagedKey = $.customerManagedKey;
        this.delegatedSubnetId = $.delegatedSubnetId;
        this.fqdn = $.fqdn;
        this.geoRedundantBackupEnabled = $.geoRedundantBackupEnabled;
        this.highAvailability = $.highAvailability;
        this.identity = $.identity;
        this.location = $.location;
        this.maintenanceWindow = $.maintenanceWindow;
        this.name = $.name;
        this.pointInTimeRestoreTimeInUtc = $.pointInTimeRestoreTimeInUtc;
        this.privateDnsZoneId = $.privateDnsZoneId;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.replicaCapacity = $.replicaCapacity;
        this.replicationRole = $.replicationRole;
        this.resourceGroupName = $.resourceGroupName;
        this.skuName = $.skuName;
        this.sourceServerId = $.sourceServerId;
        this.storage = $.storage;
        this.tags = $.tags;
        this.version = $.version;
        this.zone = $.zone;
    }

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

    public static final class Builder {
        private FlexibleServerState $;

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

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

        /**
         * @param administratorLogin The Administrator login for the MySQL Flexible Server. Required when `create_mode` is `Default`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(@Nullable Output<String> administratorLogin) {
            $.administratorLogin = administratorLogin;
            return this;
        }

        /**
         * @param administratorLogin The Administrator login for the MySQL Flexible Server. Required when `create_mode` is `Default`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(String administratorLogin) {
            return administratorLogin(Output.of(administratorLogin));
        }

        /**
         * @param administratorPassword The Password associated with the `administrator_login` for the MySQL Flexible Server. Required when `create_mode` is `Default`.
         * 
         * @return builder
         * 
         */
        public Builder administratorPassword(@Nullable Output<String> administratorPassword) {
            $.administratorPassword = administratorPassword;
            return this;
        }

        /**
         * @param administratorPassword The Password associated with the `administrator_login` for the MySQL Flexible Server. Required when `create_mode` is `Default`.
         * 
         * @return builder
         * 
         */
        public Builder administratorPassword(String administratorPassword) {
            return administratorPassword(Output.of(administratorPassword));
        }

        /**
         * @param backupRetentionDays The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(@Nullable Output<Integer> backupRetentionDays) {
            $.backupRetentionDays = backupRetentionDays;
            return this;
        }

        /**
         * @param backupRetentionDays The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`.
         * 
         * @return builder
         * 
         */
        public Builder backupRetentionDays(Integer backupRetentionDays) {
            return backupRetentionDays(Output.of(backupRetentionDays));
        }

        /**
         * @param createMode The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * &gt; **NOTE:** Creating a `GeoRestore` server requires the source server with `geo_redundant_backup_enabled` enabled.
         * 
         * &gt; **NOTE:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output<String> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * &gt; **NOTE:** Creating a `GeoRestore` server requires the source server with `geo_redundant_backup_enabled` enabled.
         * 
         * &gt; **NOTE:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param customerManagedKey A `customer_managed_key` block as defined below.
         * 
         * &gt; **NOTE:** `identity` is required when `customer_managed_key` is specified.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(@Nullable Output<FlexibleServerCustomerManagedKeyArgs> customerManagedKey) {
            $.customerManagedKey = customerManagedKey;
            return this;
        }

        /**
         * @param customerManagedKey A `customer_managed_key` block as defined below.
         * 
         * &gt; **NOTE:** `identity` is required when `customer_managed_key` is specified.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(FlexibleServerCustomerManagedKeyArgs customerManagedKey) {
            return customerManagedKey(Output.of(customerManagedKey));
        }

        /**
         * @param delegatedSubnetId The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder delegatedSubnetId(@Nullable Output<String> delegatedSubnetId) {
            $.delegatedSubnetId = delegatedSubnetId;
            return this;
        }

        /**
         * @param delegatedSubnetId The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder delegatedSubnetId(String delegatedSubnetId) {
            return delegatedSubnetId(Output.of(delegatedSubnetId));
        }

        /**
         * @param fqdn The fully qualified domain name of the MySQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(@Nullable Output<String> fqdn) {
            $.fqdn = fqdn;
            return this;
        }

        /**
         * @param fqdn The fully qualified domain name of the MySQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(String fqdn) {
            return fqdn(Output.of(fqdn));
        }

        /**
         * @param geoRedundantBackupEnabled Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(@Nullable Output<Boolean> geoRedundantBackupEnabled) {
            $.geoRedundantBackupEnabled = geoRedundantBackupEnabled;
            return this;
        }

        /**
         * @param geoRedundantBackupEnabled Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder geoRedundantBackupEnabled(Boolean geoRedundantBackupEnabled) {
            return geoRedundantBackupEnabled(Output.of(geoRedundantBackupEnabled));
        }

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

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

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

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

        /**
         * @param location The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

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

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

        /**
         * @param name The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param pointInTimeRestoreTimeInUtc The point in time to restore from `creation_source_server_id` when `create_mode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeRestoreTimeInUtc(@Nullable Output<String> pointInTimeRestoreTimeInUtc) {
            $.pointInTimeRestoreTimeInUtc = pointInTimeRestoreTimeInUtc;
            return this;
        }

        /**
         * @param pointInTimeRestoreTimeInUtc The point in time to restore from `creation_source_server_id` when `create_mode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder pointInTimeRestoreTimeInUtc(String pointInTimeRestoreTimeInUtc) {
            return pointInTimeRestoreTimeInUtc(Output.of(pointInTimeRestoreTimeInUtc));
        }

        /**
         * @param privateDnsZoneId The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * &gt; **NOTE:** The `private_dns_zone_id` is required when setting a `delegated_subnet_id`. The `azure.privatedns.Zone` should end with suffix `.mysql.database.azure.com`.
         * 
         * @return builder
         * 
         */
        public Builder privateDnsZoneId(@Nullable Output<String> privateDnsZoneId) {
            $.privateDnsZoneId = privateDnsZoneId;
            return this;
        }

        /**
         * @param privateDnsZoneId The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * &gt; **NOTE:** The `private_dns_zone_id` is required when setting a `delegated_subnet_id`. The `azure.privatedns.Zone` should end with suffix `.mysql.database.azure.com`.
         * 
         * @return builder
         * 
         */
        public Builder privateDnsZoneId(String privateDnsZoneId) {
            return privateDnsZoneId(Output.of(privateDnsZoneId));
        }

        /**
         * @param publicNetworkAccessEnabled Is the public network access enabled?
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(@Nullable Output<Boolean> publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        /**
         * @param publicNetworkAccessEnabled Is the public network access enabled?
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param replicaCapacity The maximum number of replicas that a primary MySQL Flexible Server can have.
         * 
         * @return builder
         * 
         */
        public Builder replicaCapacity(@Nullable Output<Integer> replicaCapacity) {
            $.replicaCapacity = replicaCapacity;
            return this;
        }

        /**
         * @param replicaCapacity The maximum number of replicas that a primary MySQL Flexible Server can have.
         * 
         * @return builder
         * 
         */
        public Builder replicaCapacity(Integer replicaCapacity) {
            return replicaCapacity(Output.of(replicaCapacity));
        }

        /**
         * @param replicationRole The replication role. Possible value is `None`.
         * 
         * &gt; **NOTE:** The `replication_role` cannot be set while creating and only can be updated from `Replica` to `None`.
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(@Nullable Output<String> replicationRole) {
            $.replicationRole = replicationRole;
            return this;
        }

        /**
         * @param replicationRole The replication role. Possible value is `None`.
         * 
         * &gt; **NOTE:** The `replication_role` cannot be set while creating and only can be updated from `Replica` to `None`.
         * 
         * @return builder
         * 
         */
        public Builder replicationRole(String replicationRole) {
            return replicationRole(Output.of(replicationRole));
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param skuName The SKU Name for the MySQL Flexible Server.
         * 
         * &gt; **NOTE:** `sku_name` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1s`.
         * 
         * @return builder
         * 
         */
        public Builder skuName(@Nullable Output<String> skuName) {
            $.skuName = skuName;
            return this;
        }

        /**
         * @param skuName The SKU Name for the MySQL Flexible Server.
         * 
         * &gt; **NOTE:** `sku_name` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1s`.
         * 
         * @return builder
         * 
         */
        public Builder skuName(String skuName) {
            return skuName(Output.of(skuName));
        }

        /**
         * @param sourceServerId The resource ID of the source MySQL Flexible Server to be restored. Required when `create_mode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceServerId(@Nullable Output<String> sourceServerId) {
            $.sourceServerId = sourceServerId;
            return this;
        }

        /**
         * @param sourceServerId The resource ID of the source MySQL Flexible Server to be restored. Required when `create_mode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceServerId(String sourceServerId) {
            return sourceServerId(Output.of(sourceServerId));
        }

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

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

        /**
         * @param tags A mapping of tags which should be assigned to the MySQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags which should be assigned to the MySQL Flexible Server.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param version The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output<String> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

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

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

        public FlexibleServerState build() {
            return $;
        }
    }

}
