# 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.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING, Union
from typing_extensions import Required, TypedDict

if TYPE_CHECKING:
    from .models import (
        AdditionalOsPatch,
        AdditionalVmPatch,
        AssessmentDayOfWeek,
        AutoBackupDaysOfWeek,
        BackupScheduleType,
        ClusterConfiguration,
        ClusterManagerType,
        ClusterSubnetType,
        Commit,
        ConnectivityType,
        CreatedByType,
        DayOfWeek,
        DiskConfigurationType,
        Failover,
        FullBackupFrequencyType,
        IdentityType,
        LeastPrivilegeMode,
        OperationOrigin,
        OsType,
        ReadableSecondary,
        Role,
        ScaleType,
        SqlImageSku,
        SqlManagementMode,
        SqlServerLicenseType,
        SqlVmGroupImageSku,
        SqlWorkloadType,
        StorageWorkloadType,
        TroubleshootingScenario,
        VmIdentityType,
    )


class AADAuthenticationSettings(TypedDict, total=False):
    """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
    """

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


class AdditionalFeaturesServerConfigurations(TypedDict, total=False):
    """Additional SQL Server feature settings.

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

    isRServicesEnabled: bool
    """Enable or disable R services (SQL 2016 onwards)."""


class AgConfiguration(TypedDict, total=False):
    """Availability group configuration.

    :ivar replicas: Replica configurations.
    :vartype replicas: list["AgReplica"]
    """

    replicas: list["AgReplica"]
    """Replica configurations."""


class AgReplica(TypedDict, total=False):
    """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: Union[str, "Role"]
    :ivar commit: Replica commit mode in availability group. Known values are: "Synchronous_Commit"
     and "Asynchronous_Commit".
    :vartype commit: Union[str, "Commit"]
    :ivar failover: Replica failover mode in availability group. Known values are: "Automatic" and
     "Manual".
    :vartype failover: Union[str, "Failover"]
    :ivar readable_secondary: Replica readable secondary mode in availability group. Known values
     are: "No", "All", and "Read_Only".
    :vartype readable_secondary: Union[str, "ReadableSecondary"]
    """

    sqlVirtualMachineInstanceId: str
    """Sql VirtualMachine Instance Id."""
    role: Union[str, "Role"]
    """Replica Role in availability group. Known values are: \"Primary\" and \"Secondary\"."""
    commit: Union[str, "Commit"]
    """Replica commit mode in availability group. Known values are: \"Synchronous_Commit\" and
     \"Asynchronous_Commit\"."""
    failover: Union[str, "Failover"]
    """Replica failover mode in availability group. Known values are: \"Automatic\" and \"Manual\"."""
    readableSecondary: Union[str, "ReadableSecondary"]
    """Replica readable secondary mode in availability group. Known values are: \"No\", \"All\", and
     \"Read_Only\"."""


class AssessmentSettings(TypedDict, total=False):
    """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: "Schedule"
    """

    enable: bool
    """Enable or disable SQL best practices Assessment feature on SQL virtual machine."""
    runImmediately: bool
    """Run SQL best practices Assessment immediately on SQL virtual machine."""
    schedule: "Schedule"
    """Schedule for SQL best practices Assessment."""


class AutoBackupSettings(TypedDict, total=False):
    """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: Union[str, "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: Union[str, "FullBackupFrequencyType"]
    :ivar days_of_week: Days of the week for the backups when FullBackupFrequency is set to Weekly.
    :vartype days_of_week: list[Union[str, "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: bool
    """Enable or disable autobackup on SQL virtual machine."""
    enableEncryption: bool
    """Enable or disable encryption for backup on SQL virtual machine."""
    retentionPeriod: int
    """Retention period of backup: 1-90 days."""
    storageAccountUrl: str
    """Storage account url where backup will be taken to."""
    storageContainerName: str
    """Storage container name where backup will be taken to."""
    storageAccessKey: str
    """Storage account key where backup will be taken to."""
    password: str
    """Password for encryption on backup."""
    backupSystemDbs: bool
    """Include or exclude system databases from auto backup."""
    backupScheduleType: Union[str, "BackupScheduleType"]
    """Backup schedule type. Known values are: \"Manual\" and \"Automated\"."""
    fullBackupFrequency: Union[str, "FullBackupFrequencyType"]
    """Frequency of full backups. In both cases, full backups begin during the next scheduled time
     window. Known values are: \"Daily\" and \"Weekly\"."""
    daysOfWeek: list[Union[str, "AutoBackupDaysOfWeek"]]
    """Days of the week for the backups when FullBackupFrequency is set to Weekly."""
    fullBackupStartTime: int
    """Start time of a given day during which full backups can take place. 0-23 hours."""
    fullBackupWindowHours: int
    """Duration of the time window of a given day during which full backups can take place. 1-23
     hours."""
    logBackupFrequency: int
    """Frequency of log backups. 5-60 minutes."""


class AutoPatchingSettings(TypedDict, total=False):
    """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: Union[str, "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: Union[str, "AdditionalVmPatch"]
    """

    enable: bool
    """Enable or disable autopatching on SQL virtual machine."""
    dayOfWeek: Union[str, "DayOfWeek"]
    """Day of week to apply the patch on. Known values are: \"Everyday\", \"Monday\", \"Tuesday\",
     \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", and \"Sunday\"."""
    maintenanceWindowStartingHour: int
    """Hour of the day when patching is initiated. Local VM time."""
    maintenanceWindowDuration: int
    """Duration of patching."""
    additionalVmPatch: Union[str, "AdditionalVmPatch"]
    """Additional Patch to be enable or enabled on the SQL Virtual Machine. Known values are:
     \"NotSet\" and \"MicrosoftUpdate\"."""


class Resource(TypedDict, total=False):
    """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: "SystemData"
    """

    id: str
    """Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}."""
    name: str
    """The name of the resource."""
    type: str
    """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or
     \"Microsoft.Storage/storageAccounts\"."""
    systemData: "SystemData"
    """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: "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: "SystemData"
    :ivar properties: Resource properties.
    :vartype properties: "AvailabilityGroupListenerProperties"
    """

    properties: "AvailabilityGroupListenerProperties"
    """Resource properties."""


class AvailabilityGroupListenerProperties(TypedDict, total=False):
    """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["LoadBalancerConfiguration"]
    :ivar multi_subnet_ip_configurations: List of multi subnet IP configurations for an AG
     listener.
    :vartype multi_subnet_ip_configurations: list["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: "AgConfiguration"
    """

    provisioningState: str
    """Provisioning state to track the async operation status."""
    availabilityGroupName: str
    """Name of the availability group."""
    loadBalancerConfigurations: list["LoadBalancerConfiguration"]
    """List of load balancer configurations for an availability group listener."""
    multiSubnetIpConfigurations: list["MultiSubnetIpConfiguration"]
    """List of multi subnet IP configurations for an AG listener."""
    createDefaultAvailabilityGroupIfNotExist: bool
    """Create a default availability group if it does not exist."""
    port: int
    """Listener port."""
    availabilityGroupConfiguration: "AgConfiguration"
    """Availability Group configuration."""


class DiskConfigAssessmentRequest(TypedDict, total=False):
    """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
    """

    runDiskConfigRules: bool
    """Boolean to run disk config Assessment. Use false to fetch past Assessment."""


class ErrorAdditionalInfo(TypedDict, total=False):
    """The resource management error additional info.

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

    type: str
    """The additional info type."""
    info: Any
    """The additional info."""


class ErrorDetail(TypedDict, total=False):
    """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["ErrorDetail"]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list["ErrorAdditionalInfo"]
    """

    code: str
    """The error code."""
    message: str
    """The error message."""
    target: str
    """The error target."""
    details: list["ErrorDetail"]
    """The error details."""
    additionalInfo: list["ErrorAdditionalInfo"]
    """The error additional info."""


class ErrorResponse(TypedDict, total=False):
    """Error response.

    :ivar error: The error object.
    :vartype error: "ErrorDetail"
    """

    error: "ErrorDetail"
    """The error object."""


class KeyVaultCredentialSettings(TypedDict, total=False):
    """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: bool
    """Enable or disable key vault credential setting."""
    credentialName: str
    """Credential name."""
    azureKeyVaultUrl: str
    """Azure Key Vault url."""
    servicePrincipalName: str
    """Service principal name to access key vault."""
    servicePrincipalSecret: str
    """Service principal name secret to access key vault."""


class LoadBalancerConfiguration(TypedDict, total=False):
    """A load balancer configuration for an availability group listener.

    :ivar private_ip_address: Private IP address.
    :vartype private_ip_address: "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]
    """

    privateIpAddress: "PrivateIPAddress"
    """Private IP address."""
    publicIpAddressResourceId: str
    """Resource id of the public IP."""
    loadBalancerResourceId: str
    """Resource id of the load balancer."""
    probePort: int
    """Probe port."""
    sqlVirtualMachineInstances: list[str]
    """List of the SQL virtual machine instance resource id's that are enrolled into the availability
     group listener."""


class MultiSubnetIpConfiguration(TypedDict, total=False):
    """Multi subnet ip configuration for an availability group listener.

    :ivar private_ip_address: Private IP address. Required.
    :vartype private_ip_address: "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
    """

    privateIpAddress: Required["PrivateIPAddress"]
    """Private IP address. Required."""
    sqlVirtualMachineInstance: Required[str]
    """SQL virtual machine instance resource id that are enrolled into the availability group
     listener. Required."""


class Operation(TypedDict, total=False):
    """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: "OperationDisplay"
    :ivar origin: The intended executor of the operation.". Known values are: "user" and "system".
    :vartype origin: Union[str, "OperationOrigin"]
    :ivar properties: Additional descriptions for the operation.
    :vartype properties: dict[str, Any]
    """

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


class OperationDisplay(TypedDict, total=False):
    """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: str
    """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring
     Insights\" or \"Microsoft Compute\"."""
    resource: str
    """The localized friendly name of the resource type related to this operation. E.g. \"Virtual
     Machines\" or \"Job Schedule Collections\"."""
    operation: str
    """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create
     or Update Virtual Machine\", \"Restart Virtual Machine\"."""
    description: str
    """The short, localized friendly description of the operation; suitable for tool tips and detailed
     views."""


class PrivateIPAddress(TypedDict, total=False):
    """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
    """

    ipAddress: str
    """Private IP address bound to the availability group listener."""
    subnetResourceId: str
    """Subnet used to include private IP."""


class ResourceIdentity(TypedDict, total=False):
    """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: Union[str, "IdentityType"]
    :ivar tenant_id: The Azure Active Directory tenant id.
    :vartype tenant_id: str
    """

    principalId: str
    """The Azure Active Directory principal id."""
    type: Union[str, "IdentityType"]
    """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\"."""
    tenantId: str
    """The Azure Active Directory tenant id."""


class Schedule(TypedDict, total=False):
    """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: Union[str, "AssessmentDayOfWeek"]
    :ivar start_time: Time of the day in HH:mm format. Eg. 17:30.
    :vartype start_time: str
    """

    enable: bool
    """Enable or disable assessment schedule on SQL virtual machine."""
    weeklyInterval: int
    """Number of weeks to schedule between 2 assessment runs. Takes value from 1-6."""
    monthlyOccurrence: int
    """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."""
    dayOfWeek: Union[str, "AssessmentDayOfWeek"]
    """Day of the week to run assessment. Known values are: \"Monday\", \"Tuesday\", \"Wednesday\",
     \"Thursday\", \"Friday\", \"Saturday\", and \"Sunday\"."""
    startTime: str
    """Time of the day in HH:mm format. Eg. 17:30."""


class ServerConfigurationsManagementSettings(TypedDict, total=False):
    """Set the connectivity, storage and workload settings.

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

    sqlConnectivityUpdateSettings: "SqlConnectivityUpdateSettings"
    """SQL connectivity type settings."""
    sqlWorkloadTypeUpdateSettings: "SqlWorkloadTypeUpdateSettings"
    """SQL workload type settings."""
    sqlStorageUpdateSettings: "SqlStorageUpdateSettings"
    """SQL storage update settings."""
    additionalFeaturesServerConfigurations: "AdditionalFeaturesServerConfigurations"
    """Additional SQL feature settings."""
    sqlInstanceSettings: "SQLInstanceSettings"
    """SQL Instance settings."""
    azureAdAuthenticationSettings: "AADAuthenticationSettings"
    """Azure AD authentication Settings."""


class SqlConnectivityUpdateSettings(TypedDict, total=False):
    """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: Union[str, "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
    """

    connectivityType: Union[str, "ConnectivityType"]
    """SQL Server connectivity option. Known values are: \"LOCAL\", \"PRIVATE\", and \"PUBLIC\"."""
    port: int
    """SQL Server port."""
    sqlAuthUpdateUserName: str
    """SQL Server sysadmin login to create."""
    sqlAuthUpdatePassword: str
    """SQL Server sysadmin login password."""


class SQLInstanceSettings(TypedDict, total=False):
    """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: str
    """SQL Server Collation."""
    maxDop: int
    """SQL Server MAXDOP."""
    isOptimizeForAdHocWorkloadsEnabled: bool
    """SQL Server Optimize for Adhoc workloads."""
    minServerMemoryMB: int
    """SQL Server minimum memory."""
    maxServerMemoryMB: int
    """SQL Server maximum memory."""
    isLpimEnabled: bool
    """SQL Server LPIM."""
    isIfiEnabled: bool
    """SQL Server IFI."""


class SQLStorageSettings(TypedDict, total=False):
    """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: list[int]
    """Logical Unit Numbers for the disks."""
    defaultFilePath: str
    """SQL Server default file path."""
    useStoragePool: bool
    """Use storage pool to build a drive if true or not provided."""


class SqlStorageUpdateSettings(TypedDict, total=False):
    """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: Union[str, "DiskConfigurationType"]
    """

    diskCount: int
    """Virtual machine disk count."""
    startingDeviceId: int
    """Device id of the first disk to be updated."""
    diskConfigurationType: Union[str, "DiskConfigurationType"]
    """Disk configuration to apply to SQL Server. Known values are: \"NEW\", \"EXTEND\", and \"ADD\"."""


class SQLTempDbSettings(TypedDict, total=False):
    """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
    """

    dataFileSize: int
    """SQL Server tempdb data file size."""
    dataGrowth: int
    """SQL Server tempdb data file autoGrowth size."""
    logFileSize: int
    """SQL Server tempdb log file size."""
    logGrowth: int
    """SQL Server tempdb log file autoGrowth size."""
    dataFileCount: int
    """SQL Server tempdb data file count."""
    persistFolder: bool
    """SQL Server tempdb persist folder choice."""
    persistFolderPath: str
    """SQL Server tempdb persist folder location."""
    luns: list[int]
    """Logical Unit Numbers for the disks."""
    defaultFilePath: str
    """SQL Server default file path."""
    useStoragePool: bool
    """Use storage pool to build a drive if true or not provided."""


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: "SystemData"
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    """

    tags: dict[str, str]
    """Resource tags."""
    location: Required[str]
    """The geo-location where the resource lives. Required."""


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: "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: "SqlVirtualMachineProperties"
    :ivar identity: DO NOT USE. This value will be deprecated. Azure Active Directory identity of
     the server.
    :vartype identity: "ResourceIdentity"
    """

    properties: "SqlVirtualMachineProperties"
    """Resource properties."""
    identity: "ResourceIdentity"
    """DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server."""


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: "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: "SqlVirtualMachineGroupProperties"
    """

    properties: "SqlVirtualMachineGroupProperties"
    """Resource properties."""


class SqlVirtualMachineGroupProperties(TypedDict, total=False):
    """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: Union[str, "SqlVmGroupImageSku"]
    :ivar scale_type: Scale type. "HA"
    :vartype scale_type: Union[str, "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: Union[str, "ClusterManagerType"]
    :ivar cluster_configuration: Cluster type. "Domainful"
    :vartype cluster_configuration: Union[str, "ClusterConfiguration"]
    :ivar wsfc_domain_profile: Cluster Active Directory domain profile.
    :vartype wsfc_domain_profile: "WsfcDomainProfile"
    """

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


class SqlVirtualMachineGroupUpdate(TypedDict, total=False):
    """An update to a SQL virtual machine group.

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

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


class SqlVirtualMachineProperties(TypedDict, total=False):
    """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: Union[str, "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: Union[str, "SqlManagementMode"]
    :ivar least_privilege_mode: SQL IaaS Agent least privilege mode. Known values are: "Enabled"
     and "NotSet".
    :vartype least_privilege_mode: Union[str, "LeastPrivilegeMode"]
    :ivar sql_image_sku: SQL Server edition type. Known values are: "Developer", "Express",
     "Standard", "Enterprise", and "Web".
    :vartype sql_image_sku: Union[str, "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: "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: "AutoPatchingSettings"
    :ivar auto_backup_settings: Auto backup settings for SQL Server.
    :vartype auto_backup_settings: "AutoBackupSettings"
    :ivar key_vault_credential_settings: Key vault credential settings.
    :vartype key_vault_credential_settings: "KeyVaultCredentialSettings"
    :ivar server_configurations_management_settings: SQL Server configuration management settings.
    :vartype server_configurations_management_settings: "ServerConfigurationsManagementSettings"
    :ivar storage_configuration_settings: Storage Configuration Settings.
    :vartype storage_configuration_settings: "StorageConfigurationSettings"
    :ivar troubleshooting_status: Troubleshooting status.
    :vartype troubleshooting_status: "TroubleshootingStatus"
    :ivar assessment_settings: SQL best practices Assessment Settings.
    :vartype assessment_settings: "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: Union[str, "AdditionalOsPatch"]
    :ivar virtual_machine_identity_settings: Virtual Machine Identity details used for Sql IaaS
     extension configurations.
    :vartype virtual_machine_identity_settings: "VirtualMachineIdentity"
    :ivar os_type: Operating System of the current SQL Virtual Machine. Known values are: "Windows"
     and "Linux".
    :vartype os_type: Union[str, "OsType"]
    """

    virtualMachineResourceId: str
    """ARM Resource id of underlying virtual machine created from SQL marketplace image."""
    provisioningState: str
    """Provisioning state to track the async operation status."""
    sqlImageOffer: str
    """SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016."""
    sqlServerLicenseType: Union[str, "SqlServerLicenseType"]
    """SQL Server license type. Known values are: \"PAYG\", \"AHUB\", and \"DR\"."""
    sqlManagement: Union[str, "SqlManagementMode"]
    """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\"."""
    leastPrivilegeMode: Union[str, "LeastPrivilegeMode"]
    """SQL IaaS Agent least privilege mode. Known values are: \"Enabled\" and \"NotSet\"."""
    sqlImageSku: Union[str, "SqlImageSku"]
    """SQL Server edition type. Known values are: \"Developer\", \"Express\", \"Standard\",
     \"Enterprise\", and \"Web\"."""
    sqlVirtualMachineGroupResourceId: str
    """ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part
     of."""
    wsfcDomainCredentials: "WsfcDomainCredentials"
    """Domain credentials for setting up Windows Server Failover Cluster for SQL availability group."""
    wsfcStaticIp: str
    """Domain credentials for setting up Windows Server Failover Cluster for SQL availability group."""
    autoPatchingSettings: "AutoPatchingSettings"
    """Auto patching settings for applying critical security updates to SQL virtual machine."""
    autoBackupSettings: "AutoBackupSettings"
    """Auto backup settings for SQL Server."""
    keyVaultCredentialSettings: "KeyVaultCredentialSettings"
    """Key vault credential settings."""
    serverConfigurationsManagementSettings: "ServerConfigurationsManagementSettings"
    """SQL Server configuration management settings."""
    storageConfigurationSettings: "StorageConfigurationSettings"
    """Storage Configuration Settings."""
    troubleshootingStatus: "TroubleshootingStatus"
    """Troubleshooting status."""
    assessmentSettings: "AssessmentSettings"
    """SQL best practices Assessment Settings."""
    enableAutomaticUpgrade: bool
    """Enable automatic upgrade of Sql IaaS extension Agent."""
    additionalVmPatch: Union[str, "AdditionalOsPatch"]
    """Additional VM Patching solution enabled on the Virtual Machine. Known values are: \"WU\",
     \"WUMU\", and \"WSUS\"."""
    virtualMachineIdentitySettings: "VirtualMachineIdentity"
    """Virtual Machine Identity details used for Sql IaaS extension configurations."""
    osType: Union[str, "OsType"]
    """Operating System of the current SQL Virtual Machine. Known values are: \"Windows\" and
     \"Linux\"."""


class SqlVirtualMachineUpdate(TypedDict, total=False):
    """An update to a SQL virtual machine.

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

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


class SqlVmTroubleshooting(TypedDict, total=False):
    """Details required for SQL VM troubleshooting.

    :ivar start_time_utc: Start time in UTC timezone.
    :vartype start_time_utc: str
    :ivar end_time_utc: End time in UTC timezone.
    :vartype end_time_utc: str
    :ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
    :vartype troubleshooting_scenario: Union[str, "TroubleshootingScenario"]
    :ivar properties: Troubleshooting properties.
    :vartype properties: "TroubleshootingAdditionalProperties"
    :ivar virtual_machine_resource_id: Virtual machine resource id for response.
    :vartype virtual_machine_resource_id: str
    """

    startTimeUtc: str
    """Start time in UTC timezone."""
    endTimeUtc: str
    """End time in UTC timezone."""
    troubleshootingScenario: Union[str, "TroubleshootingScenario"]
    """SQL VM troubleshooting scenario. \"UnhealthyReplica\""""
    properties: "TroubleshootingAdditionalProperties"
    """Troubleshooting properties."""
    virtualMachineResourceId: str
    """Virtual machine resource id for response."""


class SqlWorkloadTypeUpdateSettings(TypedDict, total=False):
    """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: Union[str, "SqlWorkloadType"]
    """

    sqlWorkloadType: Union[str, "SqlWorkloadType"]
    """SQL Server workload type. Known values are: \"GENERAL\", \"OLTP\", and \"DW\"."""


class StorageConfigurationSettings(TypedDict, total=False):
    """Storage Configurations for SQL Data, Log and TempDb.

    :ivar sql_data_settings: SQL Server Data Storage Settings.
    :vartype sql_data_settings: "SQLStorageSettings"
    :ivar sql_log_settings: SQL Server Log Storage Settings.
    :vartype sql_log_settings: "SQLStorageSettings"
    :ivar sql_temp_db_settings: SQL Server TempDb Storage Settings.
    :vartype sql_temp_db_settings: "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: Union[str, "DiskConfigurationType"]
    :ivar storage_workload_type: Storage workload type. Known values are: "GENERAL", "OLTP", and
     "DW".
    :vartype storage_workload_type: Union[str, "StorageWorkloadType"]
    :ivar enable_storage_config_blade: Enable SQL IaaS Agent storage configuration blade in Azure
     Portal.
    :vartype enable_storage_config_blade: bool
    """

    sqlDataSettings: "SQLStorageSettings"
    """SQL Server Data Storage Settings."""
    sqlLogSettings: "SQLStorageSettings"
    """SQL Server Log Storage Settings."""
    sqlTempDbSettings: "SQLTempDbSettings"
    """SQL Server TempDb Storage Settings."""
    sqlSystemDbOnDataDisk: bool
    """SQL Server SystemDb Storage on DataPool if true."""
    diskConfigurationType: Union[str, "DiskConfigurationType"]
    """Disk configuration to apply to SQL Server. Known values are: \"NEW\", \"EXTEND\", and \"ADD\"."""
    storageWorkloadType: Union[str, "StorageWorkloadType"]
    """Storage workload type. Known values are: \"GENERAL\", \"OLTP\", and \"DW\"."""
    enableStorageConfigBlade: bool
    """Enable SQL IaaS Agent storage configuration blade in Azure Portal."""


class SystemData(TypedDict, total=False):
    """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: Union[str, "CreatedByType"]
    :ivar created_at: The timestamp of resource creation (UTC).
    :vartype created_at: str
    :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: Union[str, "CreatedByType"]
    :ivar last_modified_at: The timestamp of resource last modification (UTC).
    :vartype last_modified_at: str
    """

    createdBy: str
    """The identity that created the resource."""
    createdByType: Union[str, "CreatedByType"]
    """The type of identity that created the resource. Known values are: \"User\", \"Application\",
     \"ManagedIdentity\", and \"Key\"."""
    createdAt: str
    """The timestamp of resource creation (UTC)."""
    lastModifiedBy: str
    """The identity that last modified the resource."""
    lastModifiedByType: Union[str, "CreatedByType"]
    """The type of identity that last modified the resource. Known values are: \"User\",
     \"Application\", \"ManagedIdentity\", and \"Key\"."""
    lastModifiedAt: str
    """The timestamp of resource last modification (UTC)."""


class TroubleshootingAdditionalProperties(TypedDict, total=False):
    """SQL VM Troubleshooting additional properties.

    :ivar unhealthy_replica_info: The unhealthy replica information.
    :vartype unhealthy_replica_info: "UnhealthyReplicaInfo"
    """

    unhealthyReplicaInfo: "UnhealthyReplicaInfo"
    """The unhealthy replica information."""


class TroubleshootingStatus(TypedDict, total=False):
    """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: str
    :ivar start_time_utc: Start time in UTC timezone.
    :vartype start_time_utc: str
    :ivar end_time_utc: End time in UTC timezone.
    :vartype end_time_utc: str
    :ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
    :vartype troubleshooting_scenario: Union[str, "TroubleshootingScenario"]
    :ivar properties: Troubleshooting properties.
    :vartype properties: "TroubleshootingAdditionalProperties"
    """

    rootCause: str
    """Root cause of the issue."""
    lastTriggerTimeUtc: str
    """Last troubleshooting trigger time in UTC timezone."""
    startTimeUtc: str
    """Start time in UTC timezone."""
    endTimeUtc: str
    """End time in UTC timezone."""
    troubleshootingScenario: Union[str, "TroubleshootingScenario"]
    """SQL VM troubleshooting scenario. \"UnhealthyReplica\""""
    properties: "TroubleshootingAdditionalProperties"
    """Troubleshooting properties."""


class UnhealthyReplicaInfo(TypedDict, total=False):
    """SQL VM Troubleshoot UnhealthyReplica scenario information.

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

    availabilityGroupName: str
    """The name of the availability group."""


class VirtualMachineIdentity(TypedDict, total=False):
    """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: Union[str, "VmIdentityType"]
    :ivar resource_id: ARM Resource Id of the identity. Only required when UserAssigned identity is
     selected.
    :vartype resource_id: str
    """

    type: Union[str, "VmIdentityType"]
    """Identity type of the virtual machine. Specify None to opt-out of Managed Identities. Known
     values are: \"None\", \"SystemAssigned\", and \"UserAssigned\"."""
    resourceId: str
    """ARM Resource Id of the identity. Only required when UserAssigned identity is selected."""


class WsfcDomainCredentials(TypedDict, total=False):
    """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
    """

    clusterBootstrapAccountPassword: str
    """Cluster bootstrap account password."""
    clusterOperatorAccountPassword: str
    """Cluster operator account password."""
    sqlServiceAccountPassword: str
    """SQL service account password."""


class WsfcDomainProfile(TypedDict, total=False):
    """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: Union[str, "ClusterSubnetType"]
    """

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