# pylint: disable=line-too-long,useless-suppression,too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=useless-super-delegation

import datetime
from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload

from .._utils.model_base import Model as _Model, rest_field

if TYPE_CHECKING:
    from .. import models as _models


class AADAuthenticationSettings(_Model):
    """Enable AAD authentication for SQL VM.

    :ivar client_id: The client Id of the Managed Identity to query Microsoft Graph API. An empty
     string must be used for the system assigned Managed Identity.
    :vartype client_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be
     used for the system assigned Managed Identity."""

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AdditionalFeaturesServerConfigurations(_Model):
    """Additional SQL Server feature settings.

    :ivar is_r_services_enabled: Enable or disable R services (SQL 2016 onwards).
    :vartype is_r_services_enabled: bool
    """

    is_r_services_enabled: Optional[bool] = rest_field(
        name="isRServicesEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable or disable R services (SQL 2016 onwards)."""

    @overload
    def __init__(
        self,
        *,
        is_r_services_enabled: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AgConfiguration(_Model):
    """Availability group configuration.

    :ivar replicas: Replica configurations.
    :vartype replicas: list[~azure.mgmt.sqlvirtualmachine.models.AgReplica]
    """

    replicas: Optional[list["_models.AgReplica"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Replica configurations."""

    @overload
    def __init__(
        self,
        *,
        replicas: Optional[list["_models.AgReplica"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AgReplica(_Model):
    """Availability group replica configuration.

    :ivar sql_virtual_machine_instance_id: Sql VirtualMachine Instance Id.
    :vartype sql_virtual_machine_instance_id: str
    :ivar role: Replica Role in availability group. Known values are: "Primary" and "Secondary".
    :vartype role: str or ~azure.mgmt.sqlvirtualmachine.models.Role
    :ivar commit: Replica commit mode in availability group. Known values are: "Synchronous_Commit"
     and "Asynchronous_Commit".
    :vartype commit: str or ~azure.mgmt.sqlvirtualmachine.models.Commit
    :ivar failover: Replica failover mode in availability group. Known values are: "Automatic" and
     "Manual".
    :vartype failover: str or ~azure.mgmt.sqlvirtualmachine.models.Failover
    :ivar readable_secondary: Replica readable secondary mode in availability group. Known values
     are: "No", "All", and "Read_Only".
    :vartype readable_secondary: str or ~azure.mgmt.sqlvirtualmachine.models.ReadableSecondary
    """

    sql_virtual_machine_instance_id: Optional[str] = rest_field(
        name="sqlVirtualMachineInstanceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sql VirtualMachine Instance Id."""
    role: Optional[Union[str, "_models.Role"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Replica Role in availability group. Known values are: \"Primary\" and \"Secondary\"."""
    commit: Optional[Union[str, "_models.Commit"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Replica commit mode in availability group. Known values are: \"Synchronous_Commit\" and
     \"Asynchronous_Commit\"."""
    failover: Optional[Union[str, "_models.Failover"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Replica failover mode in availability group. Known values are: \"Automatic\" and \"Manual\"."""
    readable_secondary: Optional[Union[str, "_models.ReadableSecondary"]] = rest_field(
        name="readableSecondary", visibility=["read", "create", "update", "delete", "query"]
    )
    """Replica readable secondary mode in availability group. Known values are: \"No\", \"All\", and
     \"Read_Only\"."""

    @overload
    def __init__(
        self,
        *,
        sql_virtual_machine_instance_id: Optional[str] = None,
        role: Optional[Union[str, "_models.Role"]] = None,
        commit: Optional[Union[str, "_models.Commit"]] = None,
        failover: Optional[Union[str, "_models.Failover"]] = None,
        readable_secondary: Optional[Union[str, "_models.ReadableSecondary"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AssessmentSettings(_Model):
    """Configure SQL best practices Assessment for databases in your SQL virtual machine.

    :ivar enable: Enable or disable SQL best practices Assessment feature on SQL virtual machine.
    :vartype enable: bool
    :ivar run_immediately: Run SQL best practices Assessment immediately on SQL virtual machine.
    :vartype run_immediately: bool
    :ivar schedule: Schedule for SQL best practices Assessment.
    :vartype schedule: ~azure.mgmt.sqlvirtualmachine.models.Schedule
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enable or disable SQL best practices Assessment feature on SQL virtual machine."""
    run_immediately: Optional[bool] = rest_field(
        name="runImmediately", visibility=["read", "create", "update", "delete", "query"]
    )
    """Run SQL best practices Assessment immediately on SQL virtual machine."""
    schedule: Optional["_models.Schedule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Schedule for SQL best practices Assessment."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        run_immediately: Optional[bool] = None,
        schedule: Optional["_models.Schedule"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AutoBackupSettings(_Model):
    """Configure backups for databases in your SQL virtual machine.

    :ivar enable: Enable or disable autobackup on SQL virtual machine.
    :vartype enable: bool
    :ivar enable_encryption: Enable or disable encryption for backup on SQL virtual machine.
    :vartype enable_encryption: bool
    :ivar retention_period: Retention period of backup: 1-90 days.
    :vartype retention_period: int
    :ivar storage_account_url: Storage account url where backup will be taken to.
    :vartype storage_account_url: str
    :ivar storage_container_name: Storage container name where backup will be taken to.
    :vartype storage_container_name: str
    :ivar storage_access_key: Storage account key where backup will be taken to.
    :vartype storage_access_key: str
    :ivar password: Password for encryption on backup.
    :vartype password: str
    :ivar backup_system_dbs: Include or exclude system databases from auto backup.
    :vartype backup_system_dbs: bool
    :ivar backup_schedule_type: Backup schedule type. Known values are: "Manual" and "Automated".
    :vartype backup_schedule_type: str or ~azure.mgmt.sqlvirtualmachine.models.BackupScheduleType
    :ivar full_backup_frequency: Frequency of full backups. In both cases, full backups begin
     during the next scheduled time window. Known values are: "Daily" and "Weekly".
    :vartype full_backup_frequency: str or
     ~azure.mgmt.sqlvirtualmachine.models.FullBackupFrequencyType
    :ivar days_of_week: Days of the week for the backups when FullBackupFrequency is set to Weekly.
    :vartype days_of_week: list[str or ~azure.mgmt.sqlvirtualmachine.models.AutoBackupDaysOfWeek]
    :ivar full_backup_start_time: Start time of a given day during which full backups can take
     place. 0-23 hours.
    :vartype full_backup_start_time: int
    :ivar full_backup_window_hours: Duration of the time window of a given day during which full
     backups can take place. 1-23 hours.
    :vartype full_backup_window_hours: int
    :ivar log_backup_frequency: Frequency of log backups. 5-60 minutes.
    :vartype log_backup_frequency: int
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enable or disable autobackup on SQL virtual machine."""
    enable_encryption: Optional[bool] = rest_field(
        name="enableEncryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable or disable encryption for backup on SQL virtual machine."""
    retention_period: Optional[int] = rest_field(
        name="retentionPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Retention period of backup: 1-90 days."""
    storage_account_url: Optional[str] = rest_field(
        name="storageAccountUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account url where backup will be taken to."""
    storage_container_name: Optional[str] = rest_field(
        name="storageContainerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage container name where backup will be taken to."""
    storage_access_key: Optional[str] = rest_field(name="storageAccessKey", visibility=["create", "update"])
    """Storage account key where backup will be taken to."""
    password: Optional[str] = rest_field(visibility=["create", "update"])
    """Password for encryption on backup."""
    backup_system_dbs: Optional[bool] = rest_field(
        name="backupSystemDbs", visibility=["read", "create", "update", "delete", "query"]
    )
    """Include or exclude system databases from auto backup."""
    backup_schedule_type: Optional[Union[str, "_models.BackupScheduleType"]] = rest_field(
        name="backupScheduleType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Backup schedule type. Known values are: \"Manual\" and \"Automated\"."""
    full_backup_frequency: Optional[Union[str, "_models.FullBackupFrequencyType"]] = rest_field(
        name="fullBackupFrequency", visibility=["read", "create", "update", "delete", "query"]
    )
    """Frequency of full backups. In both cases, full backups begin during the next scheduled time
     window. Known values are: \"Daily\" and \"Weekly\"."""
    days_of_week: Optional[list[Union[str, "_models.AutoBackupDaysOfWeek"]]] = rest_field(
        name="daysOfWeek", visibility=["read", "create", "update", "delete", "query"]
    )
    """Days of the week for the backups when FullBackupFrequency is set to Weekly."""
    full_backup_start_time: Optional[int] = rest_field(
        name="fullBackupStartTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """Start time of a given day during which full backups can take place. 0-23 hours."""
    full_backup_window_hours: Optional[int] = rest_field(
        name="fullBackupWindowHours", visibility=["read", "create", "update", "delete", "query"]
    )
    """Duration of the time window of a given day during which full backups can take place. 1-23
     hours."""
    log_backup_frequency: Optional[int] = rest_field(
        name="logBackupFrequency", visibility=["read", "create", "update", "delete", "query"]
    )
    """Frequency of log backups. 5-60 minutes."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        enable_encryption: Optional[bool] = None,
        retention_period: Optional[int] = None,
        storage_account_url: Optional[str] = None,
        storage_container_name: Optional[str] = None,
        storage_access_key: Optional[str] = None,
        password: Optional[str] = None,
        backup_system_dbs: Optional[bool] = None,
        backup_schedule_type: Optional[Union[str, "_models.BackupScheduleType"]] = None,
        full_backup_frequency: Optional[Union[str, "_models.FullBackupFrequencyType"]] = None,
        days_of_week: Optional[list[Union[str, "_models.AutoBackupDaysOfWeek"]]] = None,
        full_backup_start_time: Optional[int] = None,
        full_backup_window_hours: Optional[int] = None,
        log_backup_frequency: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AutoPatchingSettings(_Model):
    """Set a patching window during which Windows and SQL patches will be applied.

    :ivar enable: Enable or disable autopatching on SQL virtual machine.
    :vartype enable: bool
    :ivar day_of_week: Day of week to apply the patch on. Known values are: "Everyday", "Monday",
     "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
    :vartype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.DayOfWeek
    :ivar maintenance_window_starting_hour: Hour of the day when patching is initiated. Local VM
     time.
    :vartype maintenance_window_starting_hour: int
    :ivar maintenance_window_duration: Duration of patching.
    :vartype maintenance_window_duration: int
    :ivar additional_vm_patch: Additional Patch to be enable or enabled on the SQL Virtual Machine.
     Known values are: "NotSet" and "MicrosoftUpdate".
    :vartype additional_vm_patch: str or ~azure.mgmt.sqlvirtualmachine.models.AdditionalVmPatch
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enable or disable autopatching on SQL virtual machine."""
    day_of_week: Optional[Union[str, "_models.DayOfWeek"]] = rest_field(
        name="dayOfWeek", visibility=["read", "create", "update", "delete", "query"]
    )
    """Day of week to apply the patch on. Known values are: \"Everyday\", \"Monday\", \"Tuesday\",
     \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", and \"Sunday\"."""
    maintenance_window_starting_hour: Optional[int] = rest_field(
        name="maintenanceWindowStartingHour", visibility=["read", "create", "update", "delete", "query"]
    )
    """Hour of the day when patching is initiated. Local VM time."""
    maintenance_window_duration: Optional[int] = rest_field(
        name="maintenanceWindowDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Duration of patching."""
    additional_vm_patch: Optional[Union[str, "_models.AdditionalVmPatch"]] = rest_field(
        name="additionalVmPatch", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional Patch to be enable or enabled on the SQL Virtual Machine. Known values are:
     \"NotSet\" and \"MicrosoftUpdate\"."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        day_of_week: Optional[Union[str, "_models.DayOfWeek"]] = None,
        maintenance_window_starting_hour: Optional[int] = None,
        maintenance_window_duration: Optional[int] = None,
        additional_vm_patch: Optional[Union[str, "_models.AdditionalVmPatch"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class Resource(_Model):
    """Resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the resource."""
    type: Optional[str] = rest_field(visibility=["read"])
    """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or
     \"Microsoft.Storage/storageAccounts\"."""
    system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"])
    """Azure Resource Manager metadata containing createdBy and modifiedBy information."""


class ProxyResource(Resource):
    """Proxy Resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    """


class AvailabilityGroupListener(ProxyResource):
    """A SQL Server availability group listener.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListenerProperties
    """

    properties: Optional["_models.AvailabilityGroupListenerProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource properties."""

    __flattened_items = [
        "provisioning_state",
        "availability_group_name",
        "load_balancer_configurations",
        "multi_subnet_ip_configurations",
        "create_default_availability_group_if_not_exist",
        "port",
        "availability_group_configuration",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.AvailabilityGroupListenerProperties"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class AvailabilityGroupListenerProperties(_Model):
    """The properties of an availability group listener.

    :ivar provisioning_state: Provisioning state to track the async operation status.
    :vartype provisioning_state: str
    :ivar availability_group_name: Name of the availability group.
    :vartype availability_group_name: str
    :ivar load_balancer_configurations: List of load balancer configurations for an availability
     group listener.
    :vartype load_balancer_configurations:
     list[~azure.mgmt.sqlvirtualmachine.models.LoadBalancerConfiguration]
    :ivar multi_subnet_ip_configurations: List of multi subnet IP configurations for an AG
     listener.
    :vartype multi_subnet_ip_configurations:
     list[~azure.mgmt.sqlvirtualmachine.models.MultiSubnetIpConfiguration]
    :ivar create_default_availability_group_if_not_exist: Create a default availability group if it
     does not exist.
    :vartype create_default_availability_group_if_not_exist: bool
    :ivar port: Listener port.
    :vartype port: int
    :ivar availability_group_configuration: Availability Group configuration.
    :vartype availability_group_configuration: ~azure.mgmt.sqlvirtualmachine.models.AgConfiguration
    """

    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Provisioning state to track the async operation status."""
    availability_group_name: Optional[str] = rest_field(
        name="availabilityGroupName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the availability group."""
    load_balancer_configurations: Optional[list["_models.LoadBalancerConfiguration"]] = rest_field(
        name="loadBalancerConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of load balancer configurations for an availability group listener."""
    multi_subnet_ip_configurations: Optional[list["_models.MultiSubnetIpConfiguration"]] = rest_field(
        name="multiSubnetIpConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of multi subnet IP configurations for an AG listener."""
    create_default_availability_group_if_not_exist: Optional[bool] = rest_field(
        name="createDefaultAvailabilityGroupIfNotExist", visibility=["read", "create", "update", "delete", "query"]
    )
    """Create a default availability group if it does not exist."""
    port: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Listener port."""
    availability_group_configuration: Optional["_models.AgConfiguration"] = rest_field(
        name="availabilityGroupConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Availability Group configuration."""

    @overload
    def __init__(
        self,
        *,
        availability_group_name: Optional[str] = None,
        load_balancer_configurations: Optional[list["_models.LoadBalancerConfiguration"]] = None,
        multi_subnet_ip_configurations: Optional[list["_models.MultiSubnetIpConfiguration"]] = None,
        create_default_availability_group_if_not_exist: Optional[bool] = None,
        port: Optional[int] = None,
        availability_group_configuration: Optional["_models.AgConfiguration"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class DiskConfigAssessmentRequest(_Model):
    """Configure disk config assessment for databases in your SQL virtual machine.

    :ivar run_disk_config_rules: Boolean to run disk config Assessment. Use false to fetch past
     Assessment.
    :vartype run_disk_config_rules: bool
    """

    run_disk_config_rules: Optional[bool] = rest_field(
        name="runDiskConfigRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boolean to run disk config Assessment. Use false to fetch past Assessment."""

    @overload
    def __init__(
        self,
        *,
        run_disk_config_rules: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ErrorAdditionalInfo(_Model):
    """The resource management error additional info.

    :ivar type: The additional info type.
    :vartype type: str
    :ivar info: The additional info.
    :vartype info: any
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """The additional info type."""
    info: Optional[Any] = rest_field(visibility=["read"])
    """The additional info."""


class ErrorDetail(_Model):
    """The error detail.

    :ivar code: The error code.
    :vartype code: str
    :ivar message: The error message.
    :vartype message: str
    :ivar target: The error target.
    :vartype target: str
    :ivar details: The error details.
    :vartype details: list[~azure.mgmt.sqlvirtualmachine.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.sqlvirtualmachine.models.ErrorAdditionalInfo]
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """The error code."""
    message: Optional[str] = rest_field(visibility=["read"])
    """The error message."""
    target: Optional[str] = rest_field(visibility=["read"])
    """The error target."""
    details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"])
    """The error details."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class ErrorResponse(_Model):
    """Error response.

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.sqlvirtualmachine.models.ErrorDetail
    """

    error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error object."""

    @overload
    def __init__(
        self,
        *,
        error: Optional["_models.ErrorDetail"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class KeyVaultCredentialSettings(_Model):
    """Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.

    :ivar enable: Enable or disable key vault credential setting.
    :vartype enable: bool
    :ivar credential_name: Credential name.
    :vartype credential_name: str
    :ivar azure_key_vault_url: Azure Key Vault url.
    :vartype azure_key_vault_url: str
    :ivar service_principal_name: Service principal name to access key vault.
    :vartype service_principal_name: str
    :ivar service_principal_secret: Service principal name secret to access key vault.
    :vartype service_principal_secret: str
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enable or disable key vault credential setting."""
    credential_name: Optional[str] = rest_field(
        name="credentialName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Credential name."""
    azure_key_vault_url: Optional[str] = rest_field(
        name="azureKeyVaultUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Key Vault url."""
    service_principal_name: Optional[str] = rest_field(
        name="servicePrincipalName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Service principal name to access key vault."""
    service_principal_secret: Optional[str] = rest_field(name="servicePrincipalSecret", visibility=["create", "update"])
    """Service principal name secret to access key vault."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        credential_name: Optional[str] = None,
        azure_key_vault_url: Optional[str] = None,
        service_principal_name: Optional[str] = None,
        service_principal_secret: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class LoadBalancerConfiguration(_Model):
    """A load balancer configuration for an availability group listener.

    :ivar private_ip_address: Private IP address.
    :vartype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
    :ivar public_ip_address_resource_id: Resource id of the public IP.
    :vartype public_ip_address_resource_id: str
    :ivar load_balancer_resource_id: Resource id of the load balancer.
    :vartype load_balancer_resource_id: str
    :ivar probe_port: Probe port.
    :vartype probe_port: int
    :ivar sql_virtual_machine_instances: List of the SQL virtual machine instance resource id's
     that are enrolled into the availability group listener.
    :vartype sql_virtual_machine_instances: list[str]
    """

    private_ip_address: Optional["_models.PrivateIPAddress"] = rest_field(
        name="privateIpAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """Private IP address."""
    public_ip_address_resource_id: Optional[str] = rest_field(
        name="publicIpAddressResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource id of the public IP."""
    load_balancer_resource_id: Optional[str] = rest_field(
        name="loadBalancerResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource id of the load balancer."""
    probe_port: Optional[int] = rest_field(name="probePort", visibility=["read", "create", "update", "delete", "query"])
    """Probe port."""
    sql_virtual_machine_instances: Optional[list[str]] = rest_field(
        name="sqlVirtualMachineInstances", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the SQL virtual machine instance resource id's that are enrolled into the availability
     group listener."""

    @overload
    def __init__(
        self,
        *,
        private_ip_address: Optional["_models.PrivateIPAddress"] = None,
        public_ip_address_resource_id: Optional[str] = None,
        load_balancer_resource_id: Optional[str] = None,
        probe_port: Optional[int] = None,
        sql_virtual_machine_instances: Optional[list[str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MultiSubnetIpConfiguration(_Model):
    """Multi subnet ip configuration for an availability group listener.

    :ivar private_ip_address: Private IP address. Required.
    :vartype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
    :ivar sql_virtual_machine_instance: SQL virtual machine instance resource id that are enrolled
     into the availability group listener. Required.
    :vartype sql_virtual_machine_instance: str
    """

    private_ip_address: "_models.PrivateIPAddress" = rest_field(
        name="privateIpAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """Private IP address. Required."""
    sql_virtual_machine_instance: str = rest_field(
        name="sqlVirtualMachineInstance", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL virtual machine instance resource id that are enrolled into the availability group
     listener. Required."""

    @overload
    def __init__(
        self,
        *,
        private_ip_address: "_models.PrivateIPAddress",
        sql_virtual_machine_instance: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class Operation(_Model):
    """Result of the request to list SQL operations.

    :ivar name: The name of the operation being performed on this particular object.".
    :vartype name: str
    :ivar display: he localized display information for this particular operation / action.
    :vartype display: ~azure.mgmt.sqlvirtualmachine.models.OperationDisplay
    :ivar origin: The intended executor of the operation.". Known values are: "user" and "system".
    :vartype origin: str or ~azure.mgmt.sqlvirtualmachine.models.OperationOrigin
    :ivar properties: Additional descriptions for the operation.
    :vartype properties: dict[str, any]
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the operation being performed on this particular object.\"."""
    display: Optional["_models.OperationDisplay"] = rest_field(visibility=["read"])
    """he localized display information for this particular operation / action."""
    origin: Optional[Union[str, "_models.OperationOrigin"]] = rest_field(visibility=["read"])
    """The intended executor of the operation.\". Known values are: \"user\" and \"system\"."""
    properties: Optional[dict[str, Any]] = rest_field(visibility=["read"])
    """Additional descriptions for the operation."""


class OperationDisplay(_Model):
    """Display metadata associated with the operation.

    :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft
     Monitoring Insights" or "Microsoft Compute".
    :vartype provider: str
    :ivar resource: The localized friendly name of the resource type related to this operation.
     E.g. "Virtual Machines" or "Job Schedule Collections".
    :vartype resource: str
    :ivar operation: The concise, localized friendly name for the operation; suitable for
     dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
    :vartype operation: str
    :ivar description: The short, localized friendly description of the operation; suitable for
     tool tips and detailed views.
    :vartype description: str
    """

    provider: Optional[str] = rest_field(visibility=["read"])
    """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring
     Insights\" or \"Microsoft Compute\"."""
    resource: Optional[str] = rest_field(visibility=["read"])
    """The localized friendly name of the resource type related to this operation. E.g. \"Virtual
     Machines\" or \"Job Schedule Collections\"."""
    operation: Optional[str] = rest_field(visibility=["read"])
    """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create
     or Update Virtual Machine\", \"Restart Virtual Machine\"."""
    description: Optional[str] = rest_field(visibility=["read"])
    """The short, localized friendly description of the operation; suitable for tool tips and detailed
     views."""


class PrivateIPAddress(_Model):
    """A private IP address bound to the availability group listener.

    :ivar ip_address: Private IP address bound to the availability group listener.
    :vartype ip_address: str
    :ivar subnet_resource_id: Subnet used to include private IP.
    :vartype subnet_resource_id: str
    """

    ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"])
    """Private IP address bound to the availability group listener."""
    subnet_resource_id: Optional[str] = rest_field(
        name="subnetResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Subnet used to include private IP."""

    @overload
    def __init__(
        self,
        *,
        ip_address: Optional[str] = None,
        subnet_resource_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResourceIdentity(_Model):
    """Azure Active Directory identity configuration for a resource.

    :ivar principal_id: The Azure Active Directory principal id.
    :vartype principal_id: str
    :ivar type: The identity type. Set this to 'SystemAssigned' in order to automatically create
     and assign an Azure Active Directory principal for the resource. Known values are: "None",
     "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.sqlvirtualmachine.models.IdentityType
    :ivar tenant_id: The Azure Active Directory tenant id.
    :vartype tenant_id: str
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The Azure Active Directory principal id."""
    type: Optional[Union[str, "_models.IdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an
     Azure Active Directory principal for the resource. Known values are: \"None\",
     \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\"."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The Azure Active Directory tenant id."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.IdentityType"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class Schedule(_Model):
    """Set assessment schedule for SQL Server.

    :ivar enable: Enable or disable assessment schedule on SQL virtual machine.
    :vartype enable: bool
    :ivar weekly_interval: Number of weeks to schedule between 2 assessment runs. Takes value from
     1-6.
    :vartype weekly_interval: int
    :ivar monthly_occurrence: Occurrence of the DayOfWeek day within a month to schedule
     assessment. Takes values: 1,2,3,4 and -1. Use -1 for last DayOfWeek day of the month.
    :vartype monthly_occurrence: int
    :ivar day_of_week: Day of the week to run assessment. Known values are: "Monday", "Tuesday",
     "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
    :vartype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.AssessmentDayOfWeek
    :ivar start_time: Time of the day in HH:mm format. Eg. 17:30.
    :vartype start_time: str
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enable or disable assessment schedule on SQL virtual machine."""
    weekly_interval: Optional[int] = rest_field(
        name="weeklyInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Number of weeks to schedule between 2 assessment runs. Takes value from 1-6."""
    monthly_occurrence: Optional[int] = rest_field(
        name="monthlyOccurrence", visibility=["read", "create", "update", "delete", "query"]
    )
    """Occurrence of the DayOfWeek day within a month to schedule assessment. Takes values: 1,2,3,4
     and -1. Use -1 for last DayOfWeek day of the month."""
    day_of_week: Optional[Union[str, "_models.AssessmentDayOfWeek"]] = rest_field(
        name="dayOfWeek", visibility=["read", "create", "update", "delete", "query"]
    )
    """Day of the week to run assessment. Known values are: \"Monday\", \"Tuesday\", \"Wednesday\",
     \"Thursday\", \"Friday\", \"Saturday\", and \"Sunday\"."""
    start_time: Optional[str] = rest_field(name="startTime", visibility=["read", "create", "update", "delete", "query"])
    """Time of the day in HH:mm format. Eg. 17:30."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        weekly_interval: Optional[int] = None,
        monthly_occurrence: Optional[int] = None,
        day_of_week: Optional[Union[str, "_models.AssessmentDayOfWeek"]] = None,
        start_time: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ServerConfigurationsManagementSettings(_Model):
    """Set the connectivity, storage and workload settings.

    :ivar sql_connectivity_update_settings: SQL connectivity type settings.
    :vartype sql_connectivity_update_settings:
     ~azure.mgmt.sqlvirtualmachine.models.SqlConnectivityUpdateSettings
    :ivar sql_workload_type_update_settings: SQL workload type settings.
    :vartype sql_workload_type_update_settings:
     ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings
    :ivar sql_storage_update_settings: SQL storage update settings.
    :vartype sql_storage_update_settings:
     ~azure.mgmt.sqlvirtualmachine.models.SqlStorageUpdateSettings
    :ivar additional_features_server_configurations: Additional SQL feature settings.
    :vartype additional_features_server_configurations:
     ~azure.mgmt.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations
    :ivar sql_instance_settings: SQL Instance settings.
    :vartype sql_instance_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLInstanceSettings
    :ivar azure_ad_authentication_settings: Azure AD authentication Settings.
    :vartype azure_ad_authentication_settings:
     ~azure.mgmt.sqlvirtualmachine.models.AADAuthenticationSettings
    """

    sql_connectivity_update_settings: Optional["_models.SqlConnectivityUpdateSettings"] = rest_field(
        name="sqlConnectivityUpdateSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL connectivity type settings."""
    sql_workload_type_update_settings: Optional["_models.SqlWorkloadTypeUpdateSettings"] = rest_field(
        name="sqlWorkloadTypeUpdateSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL workload type settings."""
    sql_storage_update_settings: Optional["_models.SqlStorageUpdateSettings"] = rest_field(
        name="sqlStorageUpdateSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL storage update settings."""
    additional_features_server_configurations: Optional["_models.AdditionalFeaturesServerConfigurations"] = rest_field(
        name="additionalFeaturesServerConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional SQL feature settings."""
    sql_instance_settings: Optional["_models.SQLInstanceSettings"] = rest_field(
        name="sqlInstanceSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Instance settings."""
    azure_ad_authentication_settings: Optional["_models.AADAuthenticationSettings"] = rest_field(
        name="azureAdAuthenticationSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure AD authentication Settings."""

    @overload
    def __init__(
        self,
        *,
        sql_connectivity_update_settings: Optional["_models.SqlConnectivityUpdateSettings"] = None,
        sql_workload_type_update_settings: Optional["_models.SqlWorkloadTypeUpdateSettings"] = None,
        sql_storage_update_settings: Optional["_models.SqlStorageUpdateSettings"] = None,
        additional_features_server_configurations: Optional["_models.AdditionalFeaturesServerConfigurations"] = None,
        sql_instance_settings: Optional["_models.SQLInstanceSettings"] = None,
        azure_ad_authentication_settings: Optional["_models.AADAuthenticationSettings"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlConnectivityUpdateSettings(_Model):
    """Set the access level and network port settings for SQL Server.

    :ivar connectivity_type: SQL Server connectivity option. Known values are: "LOCAL", "PRIVATE",
     and "PUBLIC".
    :vartype connectivity_type: str or ~azure.mgmt.sqlvirtualmachine.models.ConnectivityType
    :ivar port: SQL Server port.
    :vartype port: int
    :ivar sql_auth_update_user_name: SQL Server sysadmin login to create.
    :vartype sql_auth_update_user_name: str
    :ivar sql_auth_update_password: SQL Server sysadmin login password.
    :vartype sql_auth_update_password: str
    """

    connectivity_type: Optional[Union[str, "_models.ConnectivityType"]] = rest_field(
        name="connectivityType", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server connectivity option. Known values are: \"LOCAL\", \"PRIVATE\", and \"PUBLIC\"."""
    port: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SQL Server port."""
    sql_auth_update_user_name: Optional[str] = rest_field(name="sqlAuthUpdateUserName", visibility=["create"])
    """SQL Server sysadmin login to create."""
    sql_auth_update_password: Optional[str] = rest_field(name="sqlAuthUpdatePassword", visibility=["create"])
    """SQL Server sysadmin login password."""

    @overload
    def __init__(
        self,
        *,
        connectivity_type: Optional[Union[str, "_models.ConnectivityType"]] = None,
        port: Optional[int] = None,
        sql_auth_update_user_name: Optional[str] = None,
        sql_auth_update_password: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SQLInstanceSettings(_Model):
    """Set the server/instance-level settings for SQL Server.

    :ivar collation: SQL Server Collation.
    :vartype collation: str
    :ivar max_dop: SQL Server MAXDOP.
    :vartype max_dop: int
    :ivar is_optimize_for_ad_hoc_workloads_enabled: SQL Server Optimize for Adhoc workloads.
    :vartype is_optimize_for_ad_hoc_workloads_enabled: bool
    :ivar min_server_memory_mb: SQL Server minimum memory.
    :vartype min_server_memory_mb: int
    :ivar max_server_memory_mb: SQL Server maximum memory.
    :vartype max_server_memory_mb: int
    :ivar is_lpim_enabled: SQL Server LPIM.
    :vartype is_lpim_enabled: bool
    :ivar is_ifi_enabled: SQL Server IFI.
    :vartype is_ifi_enabled: bool
    """

    collation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SQL Server Collation."""
    max_dop: Optional[int] = rest_field(name="maxDop", visibility=["read", "create", "update", "delete", "query"])
    """SQL Server MAXDOP."""
    is_optimize_for_ad_hoc_workloads_enabled: Optional[bool] = rest_field(
        name="isOptimizeForAdHocWorkloadsEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server Optimize for Adhoc workloads."""
    min_server_memory_mb: Optional[int] = rest_field(
        name="minServerMemoryMB", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server minimum memory."""
    max_server_memory_mb: Optional[int] = rest_field(
        name="maxServerMemoryMB", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server maximum memory."""
    is_lpim_enabled: Optional[bool] = rest_field(
        name="isLpimEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server LPIM."""
    is_ifi_enabled: Optional[bool] = rest_field(
        name="isIfiEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server IFI."""

    @overload
    def __init__(
        self,
        *,
        collation: Optional[str] = None,
        max_dop: Optional[int] = None,
        is_optimize_for_ad_hoc_workloads_enabled: Optional[bool] = None,
        min_server_memory_mb: Optional[int] = None,
        max_server_memory_mb: Optional[int] = None,
        is_lpim_enabled: Optional[bool] = None,
        is_ifi_enabled: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SQLStorageSettings(_Model):
    """Set disk storage settings for SQL Server.

    :ivar luns: Logical Unit Numbers for the disks.
    :vartype luns: list[int]
    :ivar default_file_path: SQL Server default file path.
    :vartype default_file_path: str
    :ivar use_storage_pool: Use storage pool to build a drive if true or not provided.
    :vartype use_storage_pool: bool
    """

    luns: Optional[list[int]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Logical Unit Numbers for the disks."""
    default_file_path: Optional[str] = rest_field(
        name="defaultFilePath", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server default file path."""
    use_storage_pool: Optional[bool] = rest_field(
        name="useStoragePool", visibility=["read", "create", "update", "delete", "query"]
    )
    """Use storage pool to build a drive if true or not provided."""

    @overload
    def __init__(
        self,
        *,
        luns: Optional[list[int]] = None,
        default_file_path: Optional[str] = None,
        use_storage_pool: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlStorageUpdateSettings(_Model):
    """Set disk storage settings for SQL Server.

    :ivar disk_count: Virtual machine disk count.
    :vartype disk_count: int
    :ivar starting_device_id: Device id of the first disk to be updated.
    :vartype starting_device_id: int
    :ivar disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
     "NEW", "EXTEND", and "ADD".
    :vartype disk_configuration_type: str or
     ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
    """

    disk_count: Optional[int] = rest_field(name="diskCount", visibility=["read", "create", "update", "delete", "query"])
    """Virtual machine disk count."""
    starting_device_id: Optional[int] = rest_field(
        name="startingDeviceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Device id of the first disk to be updated."""
    disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = rest_field(
        name="diskConfigurationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk configuration to apply to SQL Server. Known values are: \"NEW\", \"EXTEND\", and \"ADD\"."""

    @overload
    def __init__(
        self,
        *,
        disk_count: Optional[int] = None,
        starting_device_id: Optional[int] = None,
        disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SQLTempDbSettings(_Model):
    """Set tempDb storage settings for SQL Server.

    :ivar data_file_size: SQL Server tempdb data file size.
    :vartype data_file_size: int
    :ivar data_growth: SQL Server tempdb data file autoGrowth size.
    :vartype data_growth: int
    :ivar log_file_size: SQL Server tempdb log file size.
    :vartype log_file_size: int
    :ivar log_growth: SQL Server tempdb log file autoGrowth size.
    :vartype log_growth: int
    :ivar data_file_count: SQL Server tempdb data file count.
    :vartype data_file_count: int
    :ivar persist_folder: SQL Server tempdb persist folder choice.
    :vartype persist_folder: bool
    :ivar persist_folder_path: SQL Server tempdb persist folder location.
    :vartype persist_folder_path: str
    :ivar luns: Logical Unit Numbers for the disks.
    :vartype luns: list[int]
    :ivar default_file_path: SQL Server default file path.
    :vartype default_file_path: str
    :ivar use_storage_pool: Use storage pool to build a drive if true or not provided.
    :vartype use_storage_pool: bool
    """

    data_file_size: Optional[int] = rest_field(
        name="dataFileSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb data file size."""
    data_growth: Optional[int] = rest_field(
        name="dataGrowth", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb data file autoGrowth size."""
    log_file_size: Optional[int] = rest_field(
        name="logFileSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb log file size."""
    log_growth: Optional[int] = rest_field(name="logGrowth", visibility=["read", "create", "update", "delete", "query"])
    """SQL Server tempdb log file autoGrowth size."""
    data_file_count: Optional[int] = rest_field(
        name="dataFileCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb data file count."""
    persist_folder: Optional[bool] = rest_field(
        name="persistFolder", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb persist folder choice."""
    persist_folder_path: Optional[str] = rest_field(
        name="persistFolderPath", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server tempdb persist folder location."""
    luns: Optional[list[int]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Logical Unit Numbers for the disks."""
    default_file_path: Optional[str] = rest_field(
        name="defaultFilePath", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server default file path."""
    use_storage_pool: Optional[bool] = rest_field(
        name="useStoragePool", visibility=["read", "create", "update", "delete", "query"]
    )
    """Use storage pool to build a drive if true or not provided."""

    @overload
    def __init__(
        self,
        *,
        data_file_size: Optional[int] = None,
        data_growth: Optional[int] = None,
        log_file_size: Optional[int] = None,
        log_growth: Optional[int] = None,
        data_file_count: Optional[int] = None,
        persist_folder: Optional[bool] = None,
        persist_folder_path: Optional[str] = None,
        luns: Optional[list[int]] = None,
        default_file_path: Optional[str] = None,
        use_storage_pool: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TrackedResource(Resource):
    """Tracked Resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: str = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives. Required."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlVirtualMachine(TrackedResource):
    """A SQL virtual machine.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineProperties
    :ivar identity: DO NOT USE. This value will be deprecated. Azure Active Directory identity of
     the server.
    :vartype identity: ~azure.mgmt.sqlvirtualmachine.models.ResourceIdentity
    """

    properties: Optional["_models.SqlVirtualMachineProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource properties."""
    identity: Optional["_models.ResourceIdentity"] = rest_field(visibility=["read", "create"])
    """DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server."""

    __flattened_items = [
        "virtual_machine_resource_id",
        "provisioning_state",
        "sql_image_offer",
        "sql_server_license_type",
        "sql_management",
        "least_privilege_mode",
        "sql_image_sku",
        "sql_virtual_machine_group_resource_id",
        "wsfc_domain_credentials",
        "wsfc_static_ip",
        "auto_patching_settings",
        "auto_backup_settings",
        "key_vault_credential_settings",
        "server_configurations_management_settings",
        "storage_configuration_settings",
        "troubleshooting_status",
        "assessment_settings",
        "enable_automatic_upgrade",
        "additional_vm_patch",
        "virtual_machine_identity_settings",
        "os_type",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.SqlVirtualMachineProperties"] = None,
        identity: Optional["_models.ResourceIdentity"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class SqlVirtualMachineGroup(TrackedResource):
    """A SQL virtual machine group.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroupProperties
    """

    properties: Optional["_models.SqlVirtualMachineGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource properties."""

    __flattened_items = [
        "provisioning_state",
        "sql_image_offer",
        "sql_image_sku",
        "scale_type",
        "cluster_manager_type",
        "cluster_configuration",
        "wsfc_domain_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.SqlVirtualMachineGroupProperties"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class SqlVirtualMachineGroupProperties(_Model):
    """The properties of a SQL virtual machine group.

    :ivar provisioning_state: Provisioning state to track the async operation status.
    :vartype provisioning_state: str
    :ivar sql_image_offer: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
    :vartype sql_image_offer: str
    :ivar sql_image_sku: SQL image sku. Known values are: "Developer" and "Enterprise".
    :vartype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlVmGroupImageSku
    :ivar scale_type: Scale type. "HA"
    :vartype scale_type: str or ~azure.mgmt.sqlvirtualmachine.models.ScaleType
    :ivar cluster_manager_type: Type of cluster manager: Windows Server Failover Cluster (WSFC),
     implied by the scale type of the group and the OS type. "WSFC"
    :vartype cluster_manager_type: str or ~azure.mgmt.sqlvirtualmachine.models.ClusterManagerType
    :ivar cluster_configuration: Cluster type. "Domainful"
    :vartype cluster_configuration: str or
     ~azure.mgmt.sqlvirtualmachine.models.ClusterConfiguration
    :ivar wsfc_domain_profile: Cluster Active Directory domain profile.
    :vartype wsfc_domain_profile: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainProfile
    """

    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Provisioning state to track the async operation status."""
    sql_image_offer: Optional[str] = rest_field(name="sqlImageOffer", visibility=["read", "create"])
    """SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016."""
    sql_image_sku: Optional[Union[str, "_models.SqlVmGroupImageSku"]] = rest_field(
        name="sqlImageSku", visibility=["read", "create"]
    )
    """SQL image sku. Known values are: \"Developer\" and \"Enterprise\"."""
    scale_type: Optional[Union[str, "_models.ScaleType"]] = rest_field(name="scaleType", visibility=["read"])
    """Scale type. \"HA\""""
    cluster_manager_type: Optional[Union[str, "_models.ClusterManagerType"]] = rest_field(
        name="clusterManagerType", visibility=["read"]
    )
    """Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of
     the group and the OS type. \"WSFC\""""
    cluster_configuration: Optional[Union[str, "_models.ClusterConfiguration"]] = rest_field(
        name="clusterConfiguration", visibility=["read"]
    )
    """Cluster type. \"Domainful\""""
    wsfc_domain_profile: Optional["_models.WsfcDomainProfile"] = rest_field(
        name="wsfcDomainProfile", visibility=["read", "create"]
    )
    """Cluster Active Directory domain profile."""

    @overload
    def __init__(
        self,
        *,
        sql_image_offer: Optional[str] = None,
        sql_image_sku: Optional[Union[str, "_models.SqlVmGroupImageSku"]] = None,
        wsfc_domain_profile: Optional["_models.WsfcDomainProfile"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlVirtualMachineGroupUpdate(_Model):
    """An update to a SQL virtual machine group.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlVirtualMachineProperties(_Model):
    """The SQL virtual machine properties.

    :ivar virtual_machine_resource_id: ARM Resource id of underlying virtual machine created from
     SQL marketplace image.
    :vartype virtual_machine_resource_id: str
    :ivar provisioning_state: Provisioning state to track the async operation status.
    :vartype provisioning_state: str
    :ivar sql_image_offer: SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
    :vartype sql_image_offer: str
    :ivar sql_server_license_type: SQL Server license type. Known values are: "PAYG", "AHUB", and
     "DR".
    :vartype sql_server_license_type: str or
     ~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType
    :ivar sql_management: SQL Server Management type. NOTE: This parameter is not used anymore. API
     will automatically detect the Sql Management, refrain from using it. Known values are: "Full",
     "LightWeight", and "NoAgent".
    :vartype sql_management: str or ~azure.mgmt.sqlvirtualmachine.models.SqlManagementMode
    :ivar least_privilege_mode: SQL IaaS Agent least privilege mode. Known values are: "Enabled"
     and "NotSet".
    :vartype least_privilege_mode: str or ~azure.mgmt.sqlvirtualmachine.models.LeastPrivilegeMode
    :ivar sql_image_sku: SQL Server edition type. Known values are: "Developer", "Express",
     "Standard", "Enterprise", and "Web".
    :vartype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlImageSku
    :ivar sql_virtual_machine_group_resource_id: ARM resource id of the SQL virtual machine group
     this SQL virtual machine is or will be part of.
    :vartype sql_virtual_machine_group_resource_id: str
    :ivar wsfc_domain_credentials: Domain credentials for setting up Windows Server Failover
     Cluster for SQL availability group.
    :vartype wsfc_domain_credentials: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainCredentials
    :ivar wsfc_static_ip: Domain credentials for setting up Windows Server Failover Cluster for SQL
     availability group.
    :vartype wsfc_static_ip: str
    :ivar auto_patching_settings: Auto patching settings for applying critical security updates to
     SQL virtual machine.
    :vartype auto_patching_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoPatchingSettings
    :ivar auto_backup_settings: Auto backup settings for SQL Server.
    :vartype auto_backup_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoBackupSettings
    :ivar key_vault_credential_settings: Key vault credential settings.
    :vartype key_vault_credential_settings:
     ~azure.mgmt.sqlvirtualmachine.models.KeyVaultCredentialSettings
    :ivar server_configurations_management_settings: SQL Server configuration management settings.
    :vartype server_configurations_management_settings:
     ~azure.mgmt.sqlvirtualmachine.models.ServerConfigurationsManagementSettings
    :ivar storage_configuration_settings: Storage Configuration Settings.
    :vartype storage_configuration_settings:
     ~azure.mgmt.sqlvirtualmachine.models.StorageConfigurationSettings
    :ivar troubleshooting_status: Troubleshooting status.
    :vartype troubleshooting_status: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingStatus
    :ivar assessment_settings: SQL best practices Assessment Settings.
    :vartype assessment_settings: ~azure.mgmt.sqlvirtualmachine.models.AssessmentSettings
    :ivar enable_automatic_upgrade: Enable automatic upgrade of Sql IaaS extension Agent.
    :vartype enable_automatic_upgrade: bool
    :ivar additional_vm_patch: Additional VM Patching solution enabled on the Virtual Machine.
     Known values are: "WU", "WUMU", and "WSUS".
    :vartype additional_vm_patch: str or ~azure.mgmt.sqlvirtualmachine.models.AdditionalOsPatch
    :ivar virtual_machine_identity_settings: Virtual Machine Identity details used for Sql IaaS
     extension configurations.
    :vartype virtual_machine_identity_settings:
     ~azure.mgmt.sqlvirtualmachine.models.VirtualMachineIdentity
    :ivar os_type: Operating System of the current SQL Virtual Machine. Known values are: "Windows"
     and "Linux".
    :vartype os_type: str or ~azure.mgmt.sqlvirtualmachine.models.OsType
    """

    virtual_machine_resource_id: Optional[str] = rest_field(
        name="virtualMachineResourceId", visibility=["read", "create"]
    )
    """ARM Resource id of underlying virtual machine created from SQL marketplace image."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Provisioning state to track the async operation status."""
    sql_image_offer: Optional[str] = rest_field(name="sqlImageOffer", visibility=["read", "create"])
    """SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016."""
    sql_server_license_type: Optional[Union[str, "_models.SqlServerLicenseType"]] = rest_field(
        name="sqlServerLicenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server license type. Known values are: \"PAYG\", \"AHUB\", and \"DR\"."""
    sql_management: Optional[Union[str, "_models.SqlManagementMode"]] = rest_field(
        name="sqlManagement", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically
     detect the Sql Management, refrain from using it. Known values are: \"Full\", \"LightWeight\",
     and \"NoAgent\"."""
    least_privilege_mode: Optional[Union[str, "_models.LeastPrivilegeMode"]] = rest_field(
        name="leastPrivilegeMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL IaaS Agent least privilege mode. Known values are: \"Enabled\" and \"NotSet\"."""
    sql_image_sku: Optional[Union[str, "_models.SqlImageSku"]] = rest_field(
        name="sqlImageSku", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server edition type. Known values are: \"Developer\", \"Express\", \"Standard\",
     \"Enterprise\", and \"Web\"."""
    sql_virtual_machine_group_resource_id: Optional[str] = rest_field(
        name="sqlVirtualMachineGroupResourceId", visibility=["read", "update"]
    )
    """ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part
     of."""
    wsfc_domain_credentials: Optional["_models.WsfcDomainCredentials"] = rest_field(
        name="wsfcDomainCredentials", visibility=["read", "create", "update", "delete", "query"]
    )
    """Domain credentials for setting up Windows Server Failover Cluster for SQL availability group."""
    wsfc_static_ip: Optional[str] = rest_field(
        name="wsfcStaticIp", visibility=["read", "create", "update", "delete", "query"]
    )
    """Domain credentials for setting up Windows Server Failover Cluster for SQL availability group."""
    auto_patching_settings: Optional["_models.AutoPatchingSettings"] = rest_field(
        name="autoPatchingSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Auto patching settings for applying critical security updates to SQL virtual machine."""
    auto_backup_settings: Optional["_models.AutoBackupSettings"] = rest_field(
        name="autoBackupSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Auto backup settings for SQL Server."""
    key_vault_credential_settings: Optional["_models.KeyVaultCredentialSettings"] = rest_field(
        name="keyVaultCredentialSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Key vault credential settings."""
    server_configurations_management_settings: Optional["_models.ServerConfigurationsManagementSettings"] = rest_field(
        name="serverConfigurationsManagementSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server configuration management settings."""
    storage_configuration_settings: Optional["_models.StorageConfigurationSettings"] = rest_field(
        name="storageConfigurationSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage Configuration Settings."""
    troubleshooting_status: Optional["_models.TroubleshootingStatus"] = rest_field(
        name="troubleshootingStatus", visibility=["read"]
    )
    """Troubleshooting status."""
    assessment_settings: Optional["_models.AssessmentSettings"] = rest_field(
        name="assessmentSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL best practices Assessment Settings."""
    enable_automatic_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable automatic upgrade of Sql IaaS extension Agent."""
    additional_vm_patch: Optional[Union[str, "_models.AdditionalOsPatch"]] = rest_field(
        name="additionalVmPatch", visibility=["read"]
    )
    """Additional VM Patching solution enabled on the Virtual Machine. Known values are: \"WU\",
     \"WUMU\", and \"WSUS\"."""
    virtual_machine_identity_settings: Optional["_models.VirtualMachineIdentity"] = rest_field(
        name="virtualMachineIdentitySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Virtual Machine Identity details used for Sql IaaS extension configurations."""
    os_type: Optional[Union[str, "_models.OsType"]] = rest_field(name="osType", visibility=["read"])
    """Operating System of the current SQL Virtual Machine. Known values are: \"Windows\" and
     \"Linux\"."""

    @overload
    def __init__(
        self,
        *,
        virtual_machine_resource_id: Optional[str] = None,
        sql_image_offer: Optional[str] = None,
        sql_server_license_type: Optional[Union[str, "_models.SqlServerLicenseType"]] = None,
        sql_management: Optional[Union[str, "_models.SqlManagementMode"]] = None,
        least_privilege_mode: Optional[Union[str, "_models.LeastPrivilegeMode"]] = None,
        sql_image_sku: Optional[Union[str, "_models.SqlImageSku"]] = None,
        sql_virtual_machine_group_resource_id: Optional[str] = None,
        wsfc_domain_credentials: Optional["_models.WsfcDomainCredentials"] = None,
        wsfc_static_ip: Optional[str] = None,
        auto_patching_settings: Optional["_models.AutoPatchingSettings"] = None,
        auto_backup_settings: Optional["_models.AutoBackupSettings"] = None,
        key_vault_credential_settings: Optional["_models.KeyVaultCredentialSettings"] = None,
        server_configurations_management_settings: Optional["_models.ServerConfigurationsManagementSettings"] = None,
        storage_configuration_settings: Optional["_models.StorageConfigurationSettings"] = None,
        assessment_settings: Optional["_models.AssessmentSettings"] = None,
        enable_automatic_upgrade: Optional[bool] = None,
        virtual_machine_identity_settings: Optional["_models.VirtualMachineIdentity"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlVirtualMachineUpdate(_Model):
    """An update to a SQL virtual machine.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlVmTroubleshooting(_Model):
    """Details required for SQL VM troubleshooting.

    :ivar start_time_utc: Start time in UTC timezone.
    :vartype start_time_utc: ~datetime.datetime
    :ivar end_time_utc: End time in UTC timezone.
    :vartype end_time_utc: ~datetime.datetime
    :ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
    :vartype troubleshooting_scenario: str or
     ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingScenario
    :ivar properties: Troubleshooting properties.
    :vartype properties: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingAdditionalProperties
    :ivar virtual_machine_resource_id: Virtual machine resource id for response.
    :vartype virtual_machine_resource_id: str
    """

    start_time_utc: Optional[datetime.datetime] = rest_field(
        name="startTimeUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Start time in UTC timezone."""
    end_time_utc: Optional[datetime.datetime] = rest_field(
        name="endTimeUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """End time in UTC timezone."""
    troubleshooting_scenario: Optional[Union[str, "_models.TroubleshootingScenario"]] = rest_field(
        name="troubleshootingScenario", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL VM troubleshooting scenario. \"UnhealthyReplica\""""
    properties: Optional["_models.TroubleshootingAdditionalProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Troubleshooting properties."""
    virtual_machine_resource_id: Optional[str] = rest_field(name="virtualMachineResourceId", visibility=["read"])
    """Virtual machine resource id for response."""

    @overload
    def __init__(
        self,
        *,
        start_time_utc: Optional[datetime.datetime] = None,
        end_time_utc: Optional[datetime.datetime] = None,
        troubleshooting_scenario: Optional[Union[str, "_models.TroubleshootingScenario"]] = None,
        properties: Optional["_models.TroubleshootingAdditionalProperties"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SqlWorkloadTypeUpdateSettings(_Model):
    """Set workload type to optimize storage for SQL Server.

    :ivar sql_workload_type: SQL Server workload type. Known values are: "GENERAL", "OLTP", and
     "DW".
    :vartype sql_workload_type: str or ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadType
    """

    sql_workload_type: Optional[Union[str, "_models.SqlWorkloadType"]] = rest_field(
        name="sqlWorkloadType", visibility=["read", "create"]
    )
    """SQL Server workload type. Known values are: \"GENERAL\", \"OLTP\", and \"DW\"."""

    @overload
    def __init__(
        self,
        *,
        sql_workload_type: Optional[Union[str, "_models.SqlWorkloadType"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class StorageConfigurationSettings(_Model):
    """Storage Configurations for SQL Data, Log and TempDb.

    :ivar sql_data_settings: SQL Server Data Storage Settings.
    :vartype sql_data_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
    :ivar sql_log_settings: SQL Server Log Storage Settings.
    :vartype sql_log_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
    :ivar sql_temp_db_settings: SQL Server TempDb Storage Settings.
    :vartype sql_temp_db_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLTempDbSettings
    :ivar sql_system_db_on_data_disk: SQL Server SystemDb Storage on DataPool if true.
    :vartype sql_system_db_on_data_disk: bool
    :ivar disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
     "NEW", "EXTEND", and "ADD".
    :vartype disk_configuration_type: str or
     ~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
    :ivar storage_workload_type: Storage workload type. Known values are: "GENERAL", "OLTP", and
     "DW".
    :vartype storage_workload_type: str or ~azure.mgmt.sqlvirtualmachine.models.StorageWorkloadType
    :ivar enable_storage_config_blade: Enable SQL IaaS Agent storage configuration blade in Azure
     Portal.
    :vartype enable_storage_config_blade: bool
    """

    sql_data_settings: Optional["_models.SQLStorageSettings"] = rest_field(
        name="sqlDataSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server Data Storage Settings."""
    sql_log_settings: Optional["_models.SQLStorageSettings"] = rest_field(
        name="sqlLogSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server Log Storage Settings."""
    sql_temp_db_settings: Optional["_models.SQLTempDbSettings"] = rest_field(
        name="sqlTempDbSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server TempDb Storage Settings."""
    sql_system_db_on_data_disk: Optional[bool] = rest_field(
        name="sqlSystemDbOnDataDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Server SystemDb Storage on DataPool if true."""
    disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = rest_field(
        name="diskConfigurationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk configuration to apply to SQL Server. Known values are: \"NEW\", \"EXTEND\", and \"ADD\"."""
    storage_workload_type: Optional[Union[str, "_models.StorageWorkloadType"]] = rest_field(
        name="storageWorkloadType", visibility=["read", "create"]
    )
    """Storage workload type. Known values are: \"GENERAL\", \"OLTP\", and \"DW\"."""
    enable_storage_config_blade: Optional[bool] = rest_field(
        name="enableStorageConfigBlade", visibility=["create", "update"]
    )
    """Enable SQL IaaS Agent storage configuration blade in Azure Portal."""

    @overload
    def __init__(
        self,
        *,
        sql_data_settings: Optional["_models.SQLStorageSettings"] = None,
        sql_log_settings: Optional["_models.SQLStorageSettings"] = None,
        sql_temp_db_settings: Optional["_models.SQLTempDbSettings"] = None,
        sql_system_db_on_data_disk: Optional[bool] = None,
        disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = None,
        storage_workload_type: Optional[Union[str, "_models.StorageWorkloadType"]] = None,
        enable_storage_config_blade: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SystemData(_Model):
    """Metadata pertaining to creation and last modification of the resource.

    :ivar created_by: The identity that created the resource.
    :vartype created_by: str
    :ivar created_by_type: The type of identity that created the resource. Known values are:
     "User", "Application", "ManagedIdentity", and "Key".
    :vartype created_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
    :ivar created_at: The timestamp of resource creation (UTC).
    :vartype created_at: ~datetime.datetime
    :ivar last_modified_by: The identity that last modified the resource.
    :vartype last_modified_by: str
    :ivar last_modified_by_type: The type of identity that last modified the resource. Known values
     are: "User", "Application", "ManagedIdentity", and "Key".
    :vartype last_modified_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
    :ivar last_modified_at: The timestamp of resource last modification (UTC).
    :vartype last_modified_at: ~datetime.datetime
    """

    created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"])
    """The identity that created the resource."""
    created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
        name="createdByType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of identity that created the resource. Known values are: \"User\", \"Application\",
     \"ManagedIdentity\", and \"Key\"."""
    created_at: Optional[datetime.datetime] = rest_field(
        name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The timestamp of resource creation (UTC)."""
    last_modified_by: Optional[str] = rest_field(
        name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity that last modified the resource."""
    last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
        name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of identity that last modified the resource. Known values are: \"User\",
     \"Application\", \"ManagedIdentity\", and \"Key\"."""
    last_modified_at: Optional[datetime.datetime] = rest_field(
        name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The timestamp of resource last modification (UTC)."""

    @overload
    def __init__(
        self,
        *,
        created_by: Optional[str] = None,
        created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
        created_at: Optional[datetime.datetime] = None,
        last_modified_by: Optional[str] = None,
        last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
        last_modified_at: Optional[datetime.datetime] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TroubleshootingAdditionalProperties(_Model):
    """SQL VM Troubleshooting additional properties.

    :ivar unhealthy_replica_info: The unhealthy replica information.
    :vartype unhealthy_replica_info: ~azure.mgmt.sqlvirtualmachine.models.UnhealthyReplicaInfo
    """

    unhealthy_replica_info: Optional["_models.UnhealthyReplicaInfo"] = rest_field(
        name="unhealthyReplicaInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unhealthy replica information."""

    @overload
    def __init__(
        self,
        *,
        unhealthy_replica_info: Optional["_models.UnhealthyReplicaInfo"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TroubleshootingStatus(_Model):
    """Status of last troubleshooting operation on this SQL VM.

    :ivar root_cause: Root cause of the issue.
    :vartype root_cause: str
    :ivar last_trigger_time_utc: Last troubleshooting trigger time in UTC timezone.
    :vartype last_trigger_time_utc: ~datetime.datetime
    :ivar start_time_utc: Start time in UTC timezone.
    :vartype start_time_utc: ~datetime.datetime
    :ivar end_time_utc: End time in UTC timezone.
    :vartype end_time_utc: ~datetime.datetime
    :ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
    :vartype troubleshooting_scenario: str or
     ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingScenario
    :ivar properties: Troubleshooting properties.
    :vartype properties: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingAdditionalProperties
    """

    root_cause: Optional[str] = rest_field(name="rootCause", visibility=["read"])
    """Root cause of the issue."""
    last_trigger_time_utc: Optional[datetime.datetime] = rest_field(
        name="lastTriggerTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Last troubleshooting trigger time in UTC timezone."""
    start_time_utc: Optional[datetime.datetime] = rest_field(name="startTimeUtc", visibility=["read"], format="rfc3339")
    """Start time in UTC timezone."""
    end_time_utc: Optional[datetime.datetime] = rest_field(name="endTimeUtc", visibility=["read"], format="rfc3339")
    """End time in UTC timezone."""
    troubleshooting_scenario: Optional[Union[str, "_models.TroubleshootingScenario"]] = rest_field(
        name="troubleshootingScenario", visibility=["read"]
    )
    """SQL VM troubleshooting scenario. \"UnhealthyReplica\""""
    properties: Optional["_models.TroubleshootingAdditionalProperties"] = rest_field(visibility=["read"])
    """Troubleshooting properties."""


class UnhealthyReplicaInfo(_Model):
    """SQL VM Troubleshoot UnhealthyReplica scenario information.

    :ivar availability_group_name: The name of the availability group.
    :vartype availability_group_name: str
    """

    availability_group_name: Optional[str] = rest_field(
        name="availabilityGroupName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the availability group."""

    @overload
    def __init__(
        self,
        *,
        availability_group_name: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class VirtualMachineIdentity(_Model):
    """Virtual Machine Identity details used for Sql IaaS extension configurations.

    :ivar type: Identity type of the virtual machine. Specify None to opt-out of Managed
     Identities. Known values are: "None", "SystemAssigned", and "UserAssigned".
    :vartype type: str or ~azure.mgmt.sqlvirtualmachine.models.VmIdentityType
    :ivar resource_id: ARM Resource Id of the identity. Only required when UserAssigned identity is
     selected.
    :vartype resource_id: str
    """

    type: Optional[Union[str, "_models.VmIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Identity type of the virtual machine. Specify None to opt-out of Managed Identities. Known
     values are: \"None\", \"SystemAssigned\", and \"UserAssigned\"."""
    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM Resource Id of the identity. Only required when UserAssigned identity is selected."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.VmIdentityType"]] = None,
        resource_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class WsfcDomainCredentials(_Model):
    """Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.

    :ivar cluster_bootstrap_account_password: Cluster bootstrap account password.
    :vartype cluster_bootstrap_account_password: str
    :ivar cluster_operator_account_password: Cluster operator account password.
    :vartype cluster_operator_account_password: str
    :ivar sql_service_account_password: SQL service account password.
    :vartype sql_service_account_password: str
    """

    cluster_bootstrap_account_password: Optional[str] = rest_field(
        name="clusterBootstrapAccountPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Cluster bootstrap account password."""
    cluster_operator_account_password: Optional[str] = rest_field(
        name="clusterOperatorAccountPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Cluster operator account password."""
    sql_service_account_password: Optional[str] = rest_field(
        name="sqlServiceAccountPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL service account password."""

    @overload
    def __init__(
        self,
        *,
        cluster_bootstrap_account_password: Optional[str] = None,
        cluster_operator_account_password: Optional[str] = None,
        sql_service_account_password: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class WsfcDomainProfile(_Model):
    """Active Directory account details to operate Windows Server Failover Cluster.

    :ivar domain_fqdn: Fully qualified name of the domain.
    :vartype domain_fqdn: str
    :ivar ou_path: Organizational Unit path in which the nodes and cluster will be present.
    :vartype ou_path: str
    :ivar cluster_bootstrap_account: Account name used for creating cluster (at minimum needs
     permissions to 'Create Computer Objects' in domain).
    :vartype cluster_bootstrap_account: str
    :ivar cluster_operator_account: Account name used for operating cluster i.e. will be part of
     administrators group on all the participating virtual machines in the cluster.
    :vartype cluster_operator_account: str
    :ivar sql_service_account: Account name under which SQL service will run on all participating
     SQL virtual machines in the cluster.
    :vartype sql_service_account: str
    :ivar is_sql_service_account_gmsa: The flag to check if SQL service account is GMSA.
    :vartype is_sql_service_account_gmsa: bool
    :ivar file_share_witness_path: Optional path for fileshare witness.
    :vartype file_share_witness_path: str
    :ivar storage_account_url: Fully qualified ARM resource id of the witness storage account.
    :vartype storage_account_url: str
    :ivar storage_account_primary_key: Primary key of the witness storage account.
    :vartype storage_account_primary_key: str
    :ivar cluster_subnet_type: Cluster subnet type. Known values are: "SingleSubnet" and
     "MultiSubnet".
    :vartype cluster_subnet_type: str or ~azure.mgmt.sqlvirtualmachine.models.ClusterSubnetType
    """

    domain_fqdn: Optional[str] = rest_field(name="domainFqdn", visibility=["read", "create"])
    """Fully qualified name of the domain."""
    ou_path: Optional[str] = rest_field(name="ouPath", visibility=["read", "create"])
    """Organizational Unit path in which the nodes and cluster will be present."""
    cluster_bootstrap_account: Optional[str] = rest_field(name="clusterBootstrapAccount", visibility=["read", "create"])
    """Account name used for creating cluster (at minimum needs permissions to 'Create Computer
     Objects' in domain)."""
    cluster_operator_account: Optional[str] = rest_field(name="clusterOperatorAccount", visibility=["read", "update"])
    """Account name used for operating cluster i.e. will be part of administrators group on all the
     participating virtual machines in the cluster."""
    sql_service_account: Optional[str] = rest_field(name="sqlServiceAccount", visibility=["read", "update"])
    """Account name under which SQL service will run on all participating SQL virtual machines in the
     cluster."""
    is_sql_service_account_gmsa: Optional[bool] = rest_field(
        name="isSqlServiceAccountGmsa", visibility=["read", "update"]
    )
    """The flag to check if SQL service account is GMSA."""
    file_share_witness_path: Optional[str] = rest_field(name="fileShareWitnessPath", visibility=["read", "create"])
    """Optional path for fileshare witness."""
    storage_account_url: Optional[str] = rest_field(name="storageAccountUrl", visibility=["read", "create"])
    """Fully qualified ARM resource id of the witness storage account."""
    storage_account_primary_key: Optional[str] = rest_field(name="storageAccountPrimaryKey", visibility=["create"])
    """Primary key of the witness storage account."""
    cluster_subnet_type: Optional[Union[str, "_models.ClusterSubnetType"]] = rest_field(
        name="clusterSubnetType", visibility=["read", "create"]
    )
    """Cluster subnet type. Known values are: \"SingleSubnet\" and \"MultiSubnet\"."""

    @overload
    def __init__(
        self,
        *,
        domain_fqdn: Optional[str] = None,
        ou_path: Optional[str] = None,
        cluster_bootstrap_account: Optional[str] = None,
        cluster_operator_account: Optional[str] = None,
        sql_service_account: Optional[str] = None,
        is_sql_service_account_gmsa: Optional[bool] = None,
        file_share_witness_path: Optional[str] = None,
        storage_account_url: Optional[str] = None,
        storage_account_primary_key: Optional[str] = None,
        cluster_subnet_type: Optional[Union[str, "_models.ClusterSubnetType"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
