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

import com.pulumi.azure.mssql.inputs.VirtualMachineAssessmentArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineAutoBackupArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineAutoPatchingArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineKeyVaultCredentialArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineSqlInstanceArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineStorageConfigurationArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineWsfcDomainCredentialArgs;
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 VirtualMachineArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualMachineArgs Empty = new VirtualMachineArgs();

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

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

    /**
     * An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
     * 
     */
    @Import(name="autoBackup")
    private @Nullable Output<VirtualMachineAutoBackupArgs> autoBackup;

    /**
     * @return An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
     * 
     */
    public Optional<Output<VirtualMachineAutoBackupArgs>> autoBackup() {
        return Optional.ofNullable(this.autoBackup);
    }

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

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

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

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

    /**
     * Should R Services be enabled?
     * 
     */
    @Import(name="rServicesEnabled")
    private @Nullable Output<Boolean> rServicesEnabled;

    /**
     * @return Should R Services be enabled?
     * 
     */
    public Optional<Output<Boolean>> rServicesEnabled() {
        return Optional.ofNullable(this.rServicesEnabled);
    }

    /**
     * The SQL Server port. Defaults to `1433`.
     * 
     */
    @Import(name="sqlConnectivityPort")
    private @Nullable Output<Integer> sqlConnectivityPort;

    /**
     * @return The SQL Server port. Defaults to `1433`.
     * 
     */
    public Optional<Output<Integer>> sqlConnectivityPort() {
        return Optional.ofNullable(this.sqlConnectivityPort);
    }

    /**
     * The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
     * 
     */
    @Import(name="sqlConnectivityType")
    private @Nullable Output<String> sqlConnectivityType;

    /**
     * @return The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
     * 
     */
    public Optional<Output<String>> sqlConnectivityType() {
        return Optional.ofNullable(this.sqlConnectivityType);
    }

    /**
     * The SQL Server sysadmin login password.
     * 
     */
    @Import(name="sqlConnectivityUpdatePassword")
    private @Nullable Output<String> sqlConnectivityUpdatePassword;

    /**
     * @return The SQL Server sysadmin login password.
     * 
     */
    public Optional<Output<String>> sqlConnectivityUpdatePassword() {
        return Optional.ofNullable(this.sqlConnectivityUpdatePassword);
    }

    /**
     * The SQL Server sysadmin login to create.
     * 
     */
    @Import(name="sqlConnectivityUpdateUsername")
    private @Nullable Output<String> sqlConnectivityUpdateUsername;

    /**
     * @return The SQL Server sysadmin login to create.
     * 
     */
    public Optional<Output<String>> sqlConnectivityUpdateUsername() {
        return Optional.ofNullable(this.sqlConnectivityUpdateUsername);
    }

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

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

    /**
     * The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
     * 
     */
    @Import(name="sqlLicenseType")
    private @Nullable Output<String> sqlLicenseType;

    /**
     * @return The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> sqlLicenseType() {
        return Optional.ofNullable(this.sqlLicenseType);
    }

    /**
     * The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
     * 
     */
    @Import(name="sqlVirtualMachineGroupId")
    private @Nullable Output<String> sqlVirtualMachineGroupId;

    /**
     * @return The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
     * 
     */
    public Optional<Output<String>> sqlVirtualMachineGroupId() {
        return Optional.ofNullable(this.sqlVirtualMachineGroupId);
    }

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

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

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

    /**
     * The ID of the Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="virtualMachineId", required=true)
    private Output<String> virtualMachineId;

    /**
     * @return The ID of the Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> virtualMachineId() {
        return this.virtualMachineId;
    }

    /**
     * A `wsfc_domain_credential` block as defined below
     * 
     */
    @Import(name="wsfcDomainCredential")
    private @Nullable Output<VirtualMachineWsfcDomainCredentialArgs> wsfcDomainCredential;

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

    private VirtualMachineArgs() {}

    private VirtualMachineArgs(VirtualMachineArgs $) {
        this.assessment = $.assessment;
        this.autoBackup = $.autoBackup;
        this.autoPatching = $.autoPatching;
        this.keyVaultCredential = $.keyVaultCredential;
        this.rServicesEnabled = $.rServicesEnabled;
        this.sqlConnectivityPort = $.sqlConnectivityPort;
        this.sqlConnectivityType = $.sqlConnectivityType;
        this.sqlConnectivityUpdatePassword = $.sqlConnectivityUpdatePassword;
        this.sqlConnectivityUpdateUsername = $.sqlConnectivityUpdateUsername;
        this.sqlInstance = $.sqlInstance;
        this.sqlLicenseType = $.sqlLicenseType;
        this.sqlVirtualMachineGroupId = $.sqlVirtualMachineGroupId;
        this.storageConfiguration = $.storageConfiguration;
        this.tags = $.tags;
        this.virtualMachineId = $.virtualMachineId;
        this.wsfcDomainCredential = $.wsfcDomainCredential;
    }

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

    public static final class Builder {
        private VirtualMachineArgs $;

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

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

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

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

        /**
         * @param autoBackup An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder autoBackup(@Nullable Output<VirtualMachineAutoBackupArgs> autoBackup) {
            $.autoBackup = autoBackup;
            return this;
        }

        /**
         * @param autoBackup An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder autoBackup(VirtualMachineAutoBackupArgs autoBackup) {
            return autoBackup(Output.of(autoBackup));
        }

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

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

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

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

        /**
         * @param rServicesEnabled Should R Services be enabled?
         * 
         * @return builder
         * 
         */
        public Builder rServicesEnabled(@Nullable Output<Boolean> rServicesEnabled) {
            $.rServicesEnabled = rServicesEnabled;
            return this;
        }

        /**
         * @param rServicesEnabled Should R Services be enabled?
         * 
         * @return builder
         * 
         */
        public Builder rServicesEnabled(Boolean rServicesEnabled) {
            return rServicesEnabled(Output.of(rServicesEnabled));
        }

        /**
         * @param sqlConnectivityPort The SQL Server port. Defaults to `1433`.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityPort(@Nullable Output<Integer> sqlConnectivityPort) {
            $.sqlConnectivityPort = sqlConnectivityPort;
            return this;
        }

        /**
         * @param sqlConnectivityPort The SQL Server port. Defaults to `1433`.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityPort(Integer sqlConnectivityPort) {
            return sqlConnectivityPort(Output.of(sqlConnectivityPort));
        }

        /**
         * @param sqlConnectivityType The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityType(@Nullable Output<String> sqlConnectivityType) {
            $.sqlConnectivityType = sqlConnectivityType;
            return this;
        }

        /**
         * @param sqlConnectivityType The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityType(String sqlConnectivityType) {
            return sqlConnectivityType(Output.of(sqlConnectivityType));
        }

        /**
         * @param sqlConnectivityUpdatePassword The SQL Server sysadmin login password.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityUpdatePassword(@Nullable Output<String> sqlConnectivityUpdatePassword) {
            $.sqlConnectivityUpdatePassword = sqlConnectivityUpdatePassword;
            return this;
        }

        /**
         * @param sqlConnectivityUpdatePassword The SQL Server sysadmin login password.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityUpdatePassword(String sqlConnectivityUpdatePassword) {
            return sqlConnectivityUpdatePassword(Output.of(sqlConnectivityUpdatePassword));
        }

        /**
         * @param sqlConnectivityUpdateUsername The SQL Server sysadmin login to create.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityUpdateUsername(@Nullable Output<String> sqlConnectivityUpdateUsername) {
            $.sqlConnectivityUpdateUsername = sqlConnectivityUpdateUsername;
            return this;
        }

        /**
         * @param sqlConnectivityUpdateUsername The SQL Server sysadmin login to create.
         * 
         * @return builder
         * 
         */
        public Builder sqlConnectivityUpdateUsername(String sqlConnectivityUpdateUsername) {
            return sqlConnectivityUpdateUsername(Output.of(sqlConnectivityUpdateUsername));
        }

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

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

        /**
         * @param sqlLicenseType The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sqlLicenseType(@Nullable Output<String> sqlLicenseType) {
            $.sqlLicenseType = sqlLicenseType;
            return this;
        }

        /**
         * @param sqlLicenseType The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sqlLicenseType(String sqlLicenseType) {
            return sqlLicenseType(Output.of(sqlLicenseType));
        }

        /**
         * @param sqlVirtualMachineGroupId The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
         * 
         * @return builder
         * 
         */
        public Builder sqlVirtualMachineGroupId(@Nullable Output<String> sqlVirtualMachineGroupId) {
            $.sqlVirtualMachineGroupId = sqlVirtualMachineGroupId;
            return this;
        }

        /**
         * @param sqlVirtualMachineGroupId The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
         * 
         * @return builder
         * 
         */
        public Builder sqlVirtualMachineGroupId(String sqlVirtualMachineGroupId) {
            return sqlVirtualMachineGroupId(Output.of(sqlVirtualMachineGroupId));
        }

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

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

        /**
         * @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 virtualMachineId The ID of the Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineId(Output<String> virtualMachineId) {
            $.virtualMachineId = virtualMachineId;
            return this;
        }

        /**
         * @param virtualMachineId The ID of the Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineId(String virtualMachineId) {
            return virtualMachineId(Output.of(virtualMachineId));
        }

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

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

        public VirtualMachineArgs build() {
            $.virtualMachineId = Objects.requireNonNull($.virtualMachineId, "expected parameter 'virtualMachineId' to be non-null");
            return $;
        }
    }

}
