# 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, Literal, 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 AccessControlRules(_Model):
    """This is the Access Control Rules specification for an inVMAccessControlProfile version.

    :ivar privileges: A list of privileges.
    :vartype privileges: list[~azure.mgmt.compute.models.AccessControlRulesPrivilege]
    :ivar roles: A list of roles.
    :vartype roles: list[~azure.mgmt.compute.models.AccessControlRulesRole]
    :ivar identities: A list of identities.
    :vartype identities: list[~azure.mgmt.compute.models.AccessControlRulesIdentity]
    :ivar role_assignments: A list of role assignments.
    :vartype role_assignments: list[~azure.mgmt.compute.models.AccessControlRulesRoleAssignment]
    """

    privileges: Optional[list["_models.AccessControlRulesPrivilege"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of privileges."""
    roles: Optional[list["_models.AccessControlRulesRole"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of roles."""
    identities: Optional[list["_models.AccessControlRulesIdentity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of identities."""
    role_assignments: Optional[list["_models.AccessControlRulesRoleAssignment"]] = rest_field(
        name="roleAssignments", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of role assignments."""

    @overload
    def __init__(
        self,
        *,
        privileges: Optional[list["_models.AccessControlRulesPrivilege"]] = None,
        roles: Optional[list["_models.AccessControlRulesRole"]] = None,
        identities: Optional[list["_models.AccessControlRulesIdentity"]] = None,
        role_assignments: Optional[list["_models.AccessControlRulesRoleAssignment"]] = 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 AccessControlRulesIdentity(_Model):
    """The properties of an Access Control Rule Identity.

    :ivar name: The name of the identity. Required.
    :vartype name: str
    :ivar user_name: The username corresponding to this identity.
    :vartype user_name: str
    :ivar group_name: The groupName corresponding to this identity.
    :vartype group_name: str
    :ivar exe_path: The path to the executable.
    :vartype exe_path: str
    :ivar process_name: The process name of the executable.
    :vartype process_name: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the identity. Required."""
    user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"])
    """The username corresponding to this identity."""
    group_name: Optional[str] = rest_field(name="groupName", visibility=["read", "create", "update", "delete", "query"])
    """The groupName corresponding to this identity."""
    exe_path: Optional[str] = rest_field(name="exePath", visibility=["read", "create", "update", "delete", "query"])
    """The path to the executable."""
    process_name: Optional[str] = rest_field(
        name="processName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The process name of the executable."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        user_name: Optional[str] = None,
        group_name: Optional[str] = None,
        exe_path: Optional[str] = None,
        process_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 AccessControlRulesPrivilege(_Model):
    """The properties of an Access Control Rule Privilege.

    :ivar name: The name of the privilege. Required.
    :vartype name: str
    :ivar path: The HTTP path corresponding to the privilege. Required.
    :vartype path: str
    :ivar query_parameters: The query parameters to match in the path.
    :vartype query_parameters: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the privilege. Required."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The HTTP path corresponding to the privilege. Required."""
    query_parameters: Optional[dict[str, str]] = rest_field(
        name="queryParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """The query parameters to match in the path."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        path: str,
        query_parameters: 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 AccessControlRulesRole(_Model):
    """The properties of an Access Control Rule Role.

    :ivar name: The name of the role. Required.
    :vartype name: str
    :ivar privileges: A list of privileges needed by this role. Required.
    :vartype privileges: list[str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the role. Required."""
    privileges: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of privileges needed by this role. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        privileges: list[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 AccessControlRulesRoleAssignment(_Model):
    """The properties of an Access Control Rule RoleAssignment.

    :ivar role: The name of the role. Required.
    :vartype role: str
    :ivar identities: A list of identities that can access the privileges defined by the role.
     Required.
    :vartype identities: list[str]
    """

    role: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the role. Required."""
    identities: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of identities that can access the privileges defined by the role. Required."""

    @overload
    def __init__(
        self,
        *,
        role: str,
        identities: list[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 AccessUri(_Model):
    """A disk access SAS uri.

    :ivar access_sas: A SAS uri for accessing a disk.
    :vartype access_sas: str
    :ivar security_data_access_sas: A SAS uri for accessing a VM guest state.
    :vartype security_data_access_sas: str
    :ivar security_metadata_access_sas: A SAS uri for accessing a VM metadata.
    :vartype security_metadata_access_sas: str
    """

    access_sas: Optional[str] = rest_field(name="accessSAS", visibility=["read"])
    """A SAS uri for accessing a disk."""
    security_data_access_sas: Optional[str] = rest_field(name="securityDataAccessSAS", visibility=["read"])
    """A SAS uri for accessing a VM guest state."""
    security_metadata_access_sas: Optional[str] = rest_field(name="securityMetadataAccessSAS", visibility=["read"])
    """A SAS uri for accessing a VM metadata."""


class AdditionalCapabilities(_Model):
    """Enables or disables a capability on the virtual machine or virtual machine scale set.

    :ivar ultra_ssd_enabled: The flag that enables or disables a capability to have one or more
     managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with
     storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale
     set only if this property is enabled.
    :vartype ultra_ssd_enabled: bool
    :ivar hibernation_enabled: The flag that enables or disables hibernation capability on the VM.
    :vartype hibernation_enabled: bool
    :ivar enable_fips1403_encryption: The flag enables the usage of FIPS 140-3 compliant
     cryptography on the protectedSettings of an extension. Learn more at:
     `https://aka.ms/linuxagentfipssupport <https://aka.ms/linuxagentfipssupport>`_.
    :vartype enable_fips1403_encryption: bool
    """

    ultra_ssd_enabled: Optional[bool] = rest_field(
        name="ultraSSDEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that enables or disables a capability to have one or more managed data disks with
     UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type
     UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this
     property is enabled."""
    hibernation_enabled: Optional[bool] = rest_field(
        name="hibernationEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that enables or disables hibernation capability on the VM."""
    enable_fips1403_encryption: Optional[bool] = rest_field(
        name="enableFips1403Encryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag enables the usage of FIPS 140-3 compliant cryptography on the protectedSettings of an
     extension. Learn more at: `https://aka.ms/linuxagentfipssupport
     <https://aka.ms/linuxagentfipssupport>`_."""

    @overload
    def __init__(
        self,
        *,
        ultra_ssd_enabled: Optional[bool] = None,
        hibernation_enabled: Optional[bool] = None,
        enable_fips1403_encryption: 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 AdditionalReplicaSet(_Model):
    """Describes the additional replica set information.

    :ivar storage_account_type: Specifies the storage account type to be used to create the direct
     drive replicas. Known values are: "Standard_LRS", "Standard_ZRS", "Premium_LRS", and
     "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar regional_replica_count: The number of direct drive replicas of the Image Version to be
     created.This Property is updatable.
    :vartype regional_replica_count: int
    """

    storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type to be used to create the direct drive replicas. Known values
     are: \"Standard_LRS\", \"Standard_ZRS\", \"Premium_LRS\", and \"PremiumV2_LRS\"."""
    regional_replica_count: Optional[int] = rest_field(
        name="regionalReplicaCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of direct drive replicas of the Image Version to be created.This Property is
     updatable."""

    @overload
    def __init__(
        self,
        *,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        regional_replica_count: 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 AdditionalUnattendContent(_Model):
    """Specifies additional XML formatted information that can be included in the Unattend.xml file,
    which is used by Windows Setup. Contents are defined by setting name, component name, and the
    pass in which the content is applied.

    :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. "OobeSystem"
    :vartype pass_name: str or ~azure.mgmt.compute.models.PassNames
    :ivar component_name: The component name. Currently, the only allowable value is
     Microsoft-Windows-Shell-Setup. "Microsoft-Windows-Shell-Setup"
    :vartype component_name: str or ~azure.mgmt.compute.models.ComponentNames
    :ivar setting_name: Specifies the name of the setting to which the content applies. Possible
     values are: FirstLogonCommands and AutoLogon. Known values are: "AutoLogon" and
     "FirstLogonCommands".
    :vartype setting_name: str or ~azure.mgmt.compute.models.SettingNames
    :ivar content: Specifies the XML formatted content that is added to the unattend.xml file for
     the specified path and component. The XML must be less than 4KB and must include the root
     element for the setting or feature that is being inserted.
    :vartype content: str
    """

    pass_name: Optional[Union[str, "_models.PassNames"]] = rest_field(
        name="passName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The pass name. Currently, the only allowable value is OobeSystem. \"OobeSystem\""""
    component_name: Optional[Union[str, "_models.ComponentNames"]] = rest_field(
        name="componentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
     \"Microsoft-Windows-Shell-Setup\""""
    setting_name: Optional[Union[str, "_models.SettingNames"]] = rest_field(
        name="settingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the name of the setting to which the content applies. Possible values are:
     FirstLogonCommands and AutoLogon. Known values are: \"AutoLogon\" and \"FirstLogonCommands\"."""
    content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the XML formatted content that is added to the unattend.xml file for the specified
     path and component. The XML must be less than 4KB and must include the root element for the
     setting or feature that is being inserted."""

    @overload
    def __init__(
        self,
        *,
        pass_name: Optional[Union[str, "_models.PassNames"]] = None,
        component_name: Optional[Union[str, "_models.ComponentNames"]] = None,
        setting_name: Optional[Union[str, "_models.SettingNames"]] = None,
        content: 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 AllInstancesDown(_Model):
    """Specifies if Scheduled Events should be auto-approved when all instances are down.

    :ivar automatically_approve: Specifies if Scheduled Events should be auto-approved when all
     instances are down. its default value is true.
    :vartype automatically_approve: bool
    """

    automatically_approve: Optional[bool] = rest_field(
        name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies if Scheduled Events should be auto-approved when all instances are down. its default
     value is true."""

    @overload
    def __init__(
        self,
        *,
        automatically_approve: 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 AlternativeOption(_Model):
    """Describes the alternative option specified by the Publisher for this image when this image is
    deprecated.

    :ivar type: Describes the type of the alternative option. Known values are: "None", "Offer",
     and "Plan".
    :vartype type: str or ~azure.mgmt.compute.models.AlternativeType
    :ivar value: Indicates the alternative option value specified by the Publisher. This is the
     Offer name when the type is Offer or the Plan name when the type is Plan.
    :vartype value: str
    """

    type: Optional[Union[str, "_models.AlternativeType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the type of the alternative option. Known values are: \"None\", \"Offer\", and
     \"Plan\"."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates the alternative option value specified by the Publisher. This is the Offer name when
     the type is Offer or the Plan name when the type is Plan."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.AlternativeType"]] = None,
        value: 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 ApiEntityReference(_Model):
    """The API entity reference.

    :ivar id: The ARM resource id in the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ARM resource id in the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/..."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 ApiError(_Model):
    """Api error.

    :ivar details: The Api error details.
    :vartype details: list[~azure.mgmt.compute.models.ApiErrorBase]
    :ivar innererror: The Api inner error.
    :vartype innererror: ~azure.mgmt.compute.models.InnerError
    :ivar code: The error code.
    :vartype code: str
    :ivar target: The target of the particular error.
    :vartype target: str
    :ivar message: The error message.
    :vartype message: str
    """

    details: Optional[list["_models.ApiErrorBase"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Api error details."""
    innererror: Optional["_models.InnerError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Api inner error."""
    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error code."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error message."""

    @overload
    def __init__(
        self,
        *,
        details: Optional[list["_models.ApiErrorBase"]] = None,
        innererror: Optional["_models.InnerError"] = None,
        code: Optional[str] = None,
        target: Optional[str] = None,
        message: 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 ApiErrorBase(_Model):
    """Api error base.

    :ivar code: The error code.
    :vartype code: str
    :ivar target: The target of the particular error.
    :vartype target: str
    :ivar message: The error message.
    :vartype message: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error code."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error message."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        target: Optional[str] = None,
        message: 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 ApplicationProfile(_Model):
    """Contains the list of gallery applications that should be made available to the VM/VMSS.

    :ivar gallery_applications: Specifies the gallery applications that should be made available to
     the VM/VMSS.
    :vartype gallery_applications: list[~azure.mgmt.compute.models.VMGalleryApplication]
    """

    gallery_applications: Optional[list["_models.VMGalleryApplication"]] = rest_field(
        name="galleryApplications", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the gallery applications that should be made available to the VM/VMSS."""

    @overload
    def __init__(
        self,
        *,
        gallery_applications: Optional[list["_models.VMGalleryApplication"]] = 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 AttachDetachDataDisksRequest(_Model):
    """Specifies the input for attaching and detaching a list of managed data disks.

    :ivar data_disks_to_attach: The list of managed data disks to be attached.
    :vartype data_disks_to_attach: list[~azure.mgmt.compute.models.DataDisksToAttach]
    :ivar data_disks_to_detach: The list of managed data disks to be detached.
    :vartype data_disks_to_detach: list[~azure.mgmt.compute.models.DataDisksToDetach]
    """

    data_disks_to_attach: Optional[list["_models.DataDisksToAttach"]] = rest_field(
        name="dataDisksToAttach", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of managed data disks to be attached."""
    data_disks_to_detach: Optional[list["_models.DataDisksToDetach"]] = rest_field(
        name="dataDisksToDetach", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of managed data disks to be detached."""

    @overload
    def __init__(
        self,
        *,
        data_disks_to_attach: Optional[list["_models.DataDisksToAttach"]] = None,
        data_disks_to_detach: Optional[list["_models.DataDisksToDetach"]] = 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 AutomaticOSUpgradePolicy(_Model):
    """The configuration parameters used for performing automatic OS upgrade.

    :ivar enable_automatic_os_upgrade: Indicates whether OS upgrades should automatically be
     applied to scale set instances in a rolling fashion when a newer version of the OS image
     becomes available. Default value is false. If this is set to true for Windows based scale sets,
     `enableAutomaticUpdates
     <https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet>`_
     is automatically set to false and cannot be set to true.
    :vartype enable_automatic_os_upgrade: bool
    :ivar disable_automatic_rollback: Whether OS image rollback feature should be disabled. Default
     value is false.
    :vartype disable_automatic_rollback: bool
    :ivar use_rolling_upgrade_policy: Indicates whether rolling upgrade policy should be used
     during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default
     policy if no policy is defined on the VMSS.
    :vartype use_rolling_upgrade_policy: bool
    :ivar os_rolling_upgrade_deferral: Indicates whether Auto OS Upgrade should undergo deferral.
     Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from
     rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then
     defers until the upgrade is approved via an ApproveRollingUpgrade call.
    :vartype os_rolling_upgrade_deferral: bool
    """

    enable_automatic_os_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticOSUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether OS upgrades should automatically be applied to scale set instances in a
     rolling fashion when a newer version of the OS image becomes available. Default value is false.
     If this is set to true for Windows based scale sets, `enableAutomaticUpdates
     <https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet>`_
     is automatically set to false and cannot be set to true."""
    disable_automatic_rollback: Optional[bool] = rest_field(
        name="disableAutomaticRollback", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether OS image rollback feature should be disabled. Default value is false."""
    use_rolling_upgrade_policy: Optional[bool] = rest_field(
        name="useRollingUpgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value
     is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the
     VMSS."""
    os_rolling_upgrade_deferral: Optional[bool] = rest_field(
        name="osRollingUpgradeDeferral", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send
     advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming,
     via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is
     approved via an ApproveRollingUpgrade call."""

    @overload
    def __init__(
        self,
        *,
        enable_automatic_os_upgrade: Optional[bool] = None,
        disable_automatic_rollback: Optional[bool] = None,
        use_rolling_upgrade_policy: Optional[bool] = None,
        os_rolling_upgrade_deferral: 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 AutomaticOSUpgradeProperties(_Model):
    """Describes automatic OS upgrade properties on the image.

    :ivar automatic_os_upgrade_supported: Specifies whether automatic OS upgrade is supported on
     the image. Required.
    :vartype automatic_os_upgrade_supported: bool
    """

    automatic_os_upgrade_supported: bool = rest_field(
        name="automaticOSUpgradeSupported", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether automatic OS upgrade is supported on the image. Required."""

    @overload
    def __init__(
        self,
        *,
        automatic_os_upgrade_supported: bool,
    ) -> 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 AutomaticRepairsPolicy(_Model):
    """Specifies the configuration parameters for automatic repairs on the virtual machine scale set.

    :ivar enabled: Specifies whether automatic repairs should be enabled on the virtual machine
     scale set. The default value is false.
    :vartype enabled: bool
    :ivar grace_period: The amount of time for which automatic repairs are suspended due to a state
     change on VM. The grace time starts after the state change has completed. This helps avoid
     premature or accidental repairs. The time duration should be specified in ISO 8601 format. The
     minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The
     maximum allowed grace period is 90 minutes (PT90M).
    :vartype grace_period: str
    :ivar repair_action: Type of repair action (replace, restart, reimage) that will be used for
     repairing unhealthy virtual machines in the scale set. Default value is replace. Known values
     are: "Replace", "Restart", and "Reimage".
    :vartype repair_action: str or ~azure.mgmt.compute.models.RepairAction
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether automatic repairs should be enabled on the virtual machine scale set. The
     default value is false."""
    grace_period: Optional[str] = rest_field(
        name="gracePeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """The amount of time for which automatic repairs are suspended due to a state change on VM. The
     grace time starts after the state change has completed. This helps avoid premature or
     accidental repairs. The time duration should be specified in ISO 8601 format. The minimum
     allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum
     allowed grace period is 90 minutes (PT90M)."""
    repair_action: Optional[Union[str, "_models.RepairAction"]] = rest_field(
        name="repairAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy
     virtual machines in the scale set. Default value is replace. Known values are: \"Replace\",
     \"Restart\", and \"Reimage\"."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        grace_period: Optional[str] = None,
        repair_action: Optional[Union[str, "_models.RepairAction"]] = 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 AutomaticSkuMigrationPolicy(_Model):
    """Specifies the configuration parameters used to control automatic SKU migration for the virtual
    machine scale set. When enabled, the platform may migrate instances to a different VM size from
    the SKU profile depending on platform demands.

    :ivar enabled: Specifies whether automatic SKU migration should be enabled on the virtual
     machine scale set. The default value is false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether automatic SKU migration should be enabled on the virtual machine scale set.
     The default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 AutomaticZoneRebalancingPolicy(_Model):
    """The configuration parameters used while performing automatic AZ balancing.

    :ivar enabled: Specifies whether Automatic AZ Balancing should be enabled on the virtual
     machine scale set. The default value is false.
    :vartype enabled: bool
    :ivar rebalance_strategy: Type of rebalance strategy that will be used for rebalancing virtual
     machines in the scale set across availability zones. Default and only supported value for now
     is Recreate. "Recreate"
    :vartype rebalance_strategy: str or ~azure.mgmt.compute.models.RebalanceStrategy
    :ivar rebalance_behavior: Type of rebalance behavior that will be used for recreating virtual
     machines in the scale set across availability zones. Default and only supported value for now
     is CreateBeforeDelete. "CreateBeforeDelete"
    :vartype rebalance_behavior: str or ~azure.mgmt.compute.models.RebalanceBehavior
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set.
     The default value is false."""
    rebalance_strategy: Optional[Union[str, "_models.RebalanceStrategy"]] = rest_field(
        name="rebalanceStrategy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set
     across availability zones. Default and only supported value for now is Recreate. \"Recreate\""""
    rebalance_behavior: Optional[Union[str, "_models.RebalanceBehavior"]] = rest_field(
        name="rebalanceBehavior", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of rebalance behavior that will be used for recreating virtual machines in the scale set
     across availability zones. Default and only supported value for now is CreateBeforeDelete.
     \"CreateBeforeDelete\""""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        rebalance_strategy: Optional[Union[str, "_models.RebalanceStrategy"]] = None,
        rebalance_behavior: Optional[Union[str, "_models.RebalanceBehavior"]] = 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 AvailabilityPolicy(_Model):
    """In the case of an availability or connectivity issue with the data disk, specify the behavior
    of your VM.

    :ivar action_on_disk_delay: Determines on how to handle disks with slow I/O. Known values are:
     "None" and "AutomaticReattach".
    :vartype action_on_disk_delay: str or ~azure.mgmt.compute.models.AvailabilityPolicyDiskDelay
    """

    action_on_disk_delay: Optional[Union[str, "_models.AvailabilityPolicyDiskDelay"]] = rest_field(
        name="actionOnDiskDelay", visibility=["read", "create", "update", "delete", "query"]
    )
    """Determines on how to handle disks with slow I/O. Known values are: \"None\" and
     \"AutomaticReattach\"."""

    @overload
    def __init__(
        self,
        *,
        action_on_disk_delay: Optional[Union[str, "_models.AvailabilityPolicyDiskDelay"]] = 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.compute.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 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.compute.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 AvailabilitySet(TrackedResource):
    """Specifies information about the availability set that the virtual machine should be assigned
    to. Virtual machines specified in the same availability set are allocated to different nodes to
    maximize availability. For more information about availability sets, see `Availability sets
    overview <https://docs.microsoft.com/azure/virtual-machines/availability-set-overview>`_. For
    more information on Azure planned maintenance, see `Maintenance and updates for Virtual
    Machines in Azure
    <https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates>`_. Currently, a VM
    can only be added to an availability set at creation time. An existing VM cannot be added to an
    availability set.

    :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.compute.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: The instance view of a resource.
    :vartype properties: ~azure.mgmt.compute.models.AvailabilitySetProperties
    :ivar sku: Sku of the availability set, only name is required to be set. See
     AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with
     managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is
     'Classic'.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    properties: Optional["_models.AvailabilitySetProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The instance view of a resource."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for
     possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for
     virtual machines with unmanaged disks. Default value is 'Classic'."""

    __flattened_items = [
        "platform_update_domain_count",
        "platform_fault_domain_count",
        "virtual_machines",
        "proximity_placement_group",
        "statuses",
        "scheduled_events_policy",
        "virtual_machine_scale_set_migration_info",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.AvailabilitySetProperties"] = None,
        sku: Optional["_models.Sku"] = 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 AvailabilitySetProperties(_Model):
    """The instance view of a resource.

    :ivar platform_update_domain_count: Update Domain count.
    :vartype platform_update_domain_count: int
    :ivar platform_fault_domain_count: Fault Domain count.
    :vartype platform_fault_domain_count: int
    :ivar virtual_machines: A list of references to all virtual machines in the availability set.
    :vartype virtual_machines: list[~azure.mgmt.compute.models.SubResource]
    :ivar proximity_placement_group: Specifies information about the proximity placement group that
     the availability set should be assigned to. Minimum api-version: 2018-04-01.
    :vartype proximity_placement_group: ~azure.mgmt.compute.models.SubResource
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar scheduled_events_policy: Specifies Redeploy, Reboot and
     ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the
     availability set.
    :vartype scheduled_events_policy: ~azure.mgmt.compute.models.ScheduledEventsPolicy
    :ivar virtual_machine_scale_set_migration_info: Describes the migration properties on the
     Availability Set.
    :vartype virtual_machine_scale_set_migration_info:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetMigrationInfo
    """

    platform_update_domain_count: Optional[int] = rest_field(
        name="platformUpdateDomainCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Update Domain count."""
    platform_fault_domain_count: Optional[int] = rest_field(
        name="platformFaultDomainCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Fault Domain count."""
    virtual_machines: Optional[list["_models.SubResource"]] = rest_field(
        name="virtualMachines", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of references to all virtual machines in the availability set."""
    proximity_placement_group: Optional["_models.SubResource"] = rest_field(
        name="proximityPlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the proximity placement group that the availability set should be
     assigned to. Minimum api-version: 2018-04-01."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(visibility=["read"])
    """The resource status information."""
    scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = rest_field(
        name="scheduledEventsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event
     related configurations for the availability set."""
    virtual_machine_scale_set_migration_info: Optional["_models.VirtualMachineScaleSetMigrationInfo"] = rest_field(
        name="virtualMachineScaleSetMigrationInfo", visibility=["read"]
    )
    """Describes the migration properties on the Availability Set."""

    @overload
    def __init__(
        self,
        *,
        platform_update_domain_count: Optional[int] = None,
        platform_fault_domain_count: Optional[int] = None,
        virtual_machines: Optional[list["_models.SubResource"]] = None,
        proximity_placement_group: Optional["_models.SubResource"] = None,
        scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = 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 UpdateResource(_Model):
    """The Update Resource model definition.

    :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 AvailabilitySetUpdate(UpdateResource):
    """Specifies information about the availability set that the virtual machine should be assigned
    to. Only tags may be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The instance view of a resource.
    :vartype properties: ~azure.mgmt.compute.models.AvailabilitySetProperties
    :ivar sku: Sku of the availability set.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    properties: Optional["_models.AvailabilitySetProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The instance view of a resource."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Sku of the availability set."""

    __flattened_items = [
        "platform_update_domain_count",
        "platform_fault_domain_count",
        "virtual_machines",
        "proximity_placement_group",
        "statuses",
        "scheduled_events_policy",
        "virtual_machine_scale_set_migration_info",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.AvailabilitySetProperties"] = None,
        sku: Optional["_models.Sku"] = 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 AvailablePatchSummary(_Model):
    """Describes the properties of an virtual machine instance view for available patch summary.

    :ivar status: The overall success or failure status of the operation. It remains "InProgress"
     until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded",
     or "CompletedWithWarnings.". Known values are: "Unknown", "InProgress", "Failed", "Succeeded",
     and "CompletedWithWarnings".
    :vartype status: str or ~azure.mgmt.compute.models.PatchOperationStatus
    :ivar assessment_activity_id: The activity ID of the operation that produced this result. It is
     used to correlate across CRP and extension logs.
    :vartype assessment_activity_id: str
    :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially
     installed patches require a reboot to complete installation but the reboot has not yet
     occurred.
    :vartype reboot_pending: bool
    :ivar critical_and_security_patch_count: The number of critical or security patches that have
     been detected as available and not yet installed.
    :vartype critical_and_security_patch_count: int
    :ivar other_patch_count: The number of all available patches excluding critical and security.
    :vartype other_patch_count: int
    :ivar start_time: The UTC timestamp when the operation began.
    :vartype start_time: ~datetime.datetime
    :ivar last_modified_time: The UTC timestamp when the operation began.
    :vartype last_modified_time: ~datetime.datetime
    :ivar error: The errors that were encountered during execution of the operation. The details
     array contains the list of them.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    status: Optional[Union[str, "_models.PatchOperationStatus"]] = rest_field(visibility=["read"])
    """The overall success or failure status of the operation. It remains \"InProgress\" until the
     operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or
     \"CompletedWithWarnings.\". Known values are: \"Unknown\", \"InProgress\", \"Failed\",
     \"Succeeded\", and \"CompletedWithWarnings\"."""
    assessment_activity_id: Optional[str] = rest_field(name="assessmentActivityId", visibility=["read"])
    """The activity ID of the operation that produced this result. It is used to correlate across CRP
     and extension logs."""
    reboot_pending: Optional[bool] = rest_field(name="rebootPending", visibility=["read"])
    """The overall reboot status of the VM. It will be true when partially installed patches require a
     reboot to complete installation but the reboot has not yet occurred."""
    critical_and_security_patch_count: Optional[int] = rest_field(
        name="criticalAndSecurityPatchCount", visibility=["read"]
    )
    """The number of critical or security patches that have been detected as available and not yet
     installed."""
    other_patch_count: Optional[int] = rest_field(name="otherPatchCount", visibility=["read"])
    """The number of all available patches excluding critical and security."""
    start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
    """The UTC timestamp when the operation began."""
    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp when the operation began."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """The errors that were encountered during execution of the operation. The details array contains
     the list of them."""


class BillingProfile(_Model):
    """Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version:
    2019-03-01.

    :ivar max_price: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS.
     This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot
     price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot
     VM/VMSS and the operation will only succeed if  the maxPrice is greater than the current Azure
     Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the
     current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible
     values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 –
     indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to
     indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default
     max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.
    :vartype max_price: float
    """

    max_price: Optional[float] = rest_field(name="maxPrice", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in
     US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM
     size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the
     operation will only succeed if  the maxPrice is greater than the current Azure Spot price.
     <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure
     Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are:
     <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates
     default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that
     the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is
     -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01."""

    @overload
    def __init__(
        self,
        *,
        max_price: Optional[float] = 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 BootDiagnostics(_Model):
    """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
    to diagnose VM status. You can easily view the output of your console log. Azure also enables
    you to see a screenshot of the VM from the hypervisor.

    :ivar enabled: Whether boot diagnostics should be enabled on the Virtual Machine.
    :vartype enabled: bool
    :ivar storage_uri: Uri of the storage account to use for placing the console output and
     screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage
     will be used.
    :vartype storage_uri: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether boot diagnostics should be enabled on the Virtual Machine."""
    storage_uri: Optional[str] = rest_field(
        name="storageUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Uri of the storage account to use for placing the console output and screenshot. If storageUri
     is not specified while enabling boot diagnostics, managed storage will be used."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        storage_uri: 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 BootDiagnosticsInstanceView(_Model):
    """The instance view of a virtual machine boot diagnostics.

    :ivar console_screenshot_blob_uri: The console screenshot blob URI. **Note:** This will **not**
     be set if boot diagnostics is currently enabled with managed storage.
    :vartype console_screenshot_blob_uri: str
    :ivar serial_console_log_blob_uri: The serial console log blob Uri. **Note:** This will **not**
     be set if boot diagnostics is currently enabled with managed storage.
    :vartype serial_console_log_blob_uri: str
    :ivar status: The boot diagnostics status information for the VM. **Note:** It will be set only
     if there are errors encountered in enabling boot diagnostics.
    :vartype status: ~azure.mgmt.compute.models.InstanceViewStatus
    """

    console_screenshot_blob_uri: Optional[str] = rest_field(name="consoleScreenshotBlobUri", visibility=["read"])
    """The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is
     currently enabled with managed storage."""
    serial_console_log_blob_uri: Optional[str] = rest_field(name="serialConsoleLogBlobUri", visibility=["read"])
    """The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is
     currently enabled with managed storage."""
    status: Optional["_models.InstanceViewStatus"] = rest_field(visibility=["read"])
    """The boot diagnostics status information for the VM. **Note:** It will be set only if there are
     errors encountered in enabling boot diagnostics."""


class CapacityReservation(TrackedResource):
    """Specifies information about the capacity reservation.

    :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.compute.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: Properties of the Capacity reservation.
    :vartype properties: ~azure.mgmt.compute.models.CapacityReservationProperties
    :ivar sku: SKU of the resource for which capacity needs be reserved. The SKU name and capacity
     is required to be set.  For Block capacity reservations, sku.capacity can only accept values 1,
     2, 4, 8, 16, 32, 64. Currently VM Skus with the capability called
     'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported'
     is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists
     the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to
     List Microsoft.Compute SKUs in a region
     (`https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_) for supported values.
     Required.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    """

    properties: Optional["_models.CapacityReservationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the Capacity reservation."""
    sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required
     to be set.  For Block capacity reservations, sku.capacity can only accept values 1, 2, 4, 8,
     16, 32, 64. Currently VM Skus with the capability called 'CapacityReservationSupported' set to
     true are supported. When 'CapacityReservationSupported' is true, the SKU capability also
     specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity
     reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute
     SKUs in a region (`https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_) for supported values.
     Required."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""

    __flattened_items = [
        "reservation_id",
        "platform_fault_domain_count",
        "virtual_machines_associated",
        "provisioning_time",
        "provisioning_state",
        "instance_view",
        "time_created",
        "schedule_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        sku: "_models.Sku",
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.CapacityReservationProperties"] = None,
        zones: 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:
        _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 CapacityReservationGroup(TrackedResource):
    """Specifies information about the capacity reservation group that the capacity reservations
    should be assigned to. Currently, a capacity reservation can only be added to a capacity
    reservation group at creation time. An existing capacity reservation cannot be added or moved
    to another capacity reservation 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.compute.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: capacity reservation group Properties.
    :vartype properties: ~azure.mgmt.compute.models.CapacityReservationGroupProperties
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    """

    properties: Optional["_models.CapacityReservationGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """capacity reservation group Properties."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""

    __flattened_items = [
        "capacity_reservations",
        "virtual_machines_associated",
        "instance_view",
        "sharing_profile",
        "reservation_type",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.CapacityReservationGroupProperties"] = None,
        zones: 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:
        _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 CapacityReservationGroupInstanceView(_Model):
    """CapacityReservationGroupInstanceView.

    :ivar capacity_reservations: List of instance view of the capacity reservations under the
     capacity reservation group.
    :vartype capacity_reservations:
     list[~azure.mgmt.compute.models.CapacityReservationInstanceViewWithName]
    :ivar shared_subscription_ids: List of the subscriptions that the capacity reservation group is
     shared with. **Note:** Minimum api-version: 2023-09-01. Please refer to
     `https://aka.ms/computereservationsharing <https://aka.ms/computereservationsharing>`_ for more
     details.
    :vartype shared_subscription_ids: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    """

    capacity_reservations: Optional[list["_models.CapacityReservationInstanceViewWithName"]] = rest_field(
        name="capacityReservations", visibility=["read"]
    )
    """List of instance view of the capacity reservations under the capacity reservation group."""
    shared_subscription_ids: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="sharedSubscriptionIds", visibility=["read"]
    )
    """List of the subscriptions that the capacity reservation group is shared with. **Note:** Minimum
     api-version: 2023-09-01. Please refer to `https://aka.ms/computereservationsharing
     <https://aka.ms/computereservationsharing>`_ for more details."""


class CapacityReservationGroupProperties(_Model):
    """capacity reservation group Properties.

    :ivar capacity_reservations: A list of all capacity reservation resource ids that belong to
     capacity reservation group.
    :vartype capacity_reservations: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar virtual_machines_associated: A list of references to all virtual machines associated to
     the capacity reservation group.
    :vartype virtual_machines_associated: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar instance_view: The capacity reservation group instance view which has the list of
     instance views for all the capacity reservations that belong to the capacity reservation group.
    :vartype instance_view: ~azure.mgmt.compute.models.CapacityReservationGroupInstanceView
    :ivar sharing_profile: Specifies the settings to enable sharing across subscriptions for the
     capacity reservation group resource. The capacity reservation group resource can generally be
     shared across subscriptions belonging to a single Azure AAD tenant or across AAD tenants if
     there is a trust relationship established between the tenants.  Block capacity reservation does
     not support sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please
     refer to `https://aka.ms/computereservationsharing <https://aka.ms/computereservationsharing>`_
     for more details.
    :vartype sharing_profile: ~azure.mgmt.compute.models.ResourceSharingProfile
    :ivar reservation_type: Indicates the type of capacity reservation. Allowed values are 'Block'
     for block capacity reservations and 'Targeted' for reservations that enable a VM to consume a
     specific capacity reservation when a capacity reservation group is provided. The reservation
     type is immutable and cannot be changed after it is assigned. Known values are: "Targeted" and
     "Block".
    :vartype reservation_type: str or ~azure.mgmt.compute.models.ReservationType
    """

    capacity_reservations: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="capacityReservations", visibility=["read"]
    )
    """A list of all capacity reservation resource ids that belong to capacity reservation group."""
    virtual_machines_associated: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="virtualMachinesAssociated", visibility=["read"]
    )
    """A list of references to all virtual machines associated to the capacity reservation group."""
    instance_view: Optional["_models.CapacityReservationGroupInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The capacity reservation group instance view which has the list of instance views for all the
     capacity reservations that belong to the capacity reservation group."""
    sharing_profile: Optional["_models.ResourceSharingProfile"] = rest_field(
        name="sharingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the settings to enable sharing across subscriptions for the capacity reservation
     group resource. The capacity reservation group resource can generally be shared across
     subscriptions belonging to a single Azure AAD tenant or across AAD tenants if there is a trust
     relationship established between the tenants.  Block capacity reservation does not support
     sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to
     `https://aka.ms/computereservationsharing <https://aka.ms/computereservationsharing>`_ for more
     details."""
    reservation_type: Optional[Union[str, "_models.ReservationType"]] = rest_field(
        name="reservationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity
     reservations and 'Targeted' for reservations that enable a VM to consume a specific capacity
     reservation when a capacity reservation group is provided. The reservation type is immutable
     and cannot be changed after it is assigned. Known values are: \"Targeted\" and \"Block\"."""

    @overload
    def __init__(
        self,
        *,
        sharing_profile: Optional["_models.ResourceSharingProfile"] = None,
        reservation_type: Optional[Union[str, "_models.ReservationType"]] = 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 CapacityReservationGroupUpdate(UpdateResource):
    """Specifies information about the capacity reservation group. Only tags can be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: capacity reservation group Properties.
    :vartype properties: ~azure.mgmt.compute.models.CapacityReservationGroupProperties
    """

    properties: Optional["_models.CapacityReservationGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """capacity reservation group Properties."""

    __flattened_items = [
        "capacity_reservations",
        "virtual_machines_associated",
        "instance_view",
        "sharing_profile",
        "reservation_type",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.CapacityReservationGroupProperties"] = 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 CapacityReservationInstanceView(_Model):
    """The instance view of a capacity reservation that provides as snapshot of the runtime properties
    of the capacity reservation that is managed by the platform and can change outside of control
    plane operations.

    :ivar utilization_info: Unutilized capacity of the capacity reservation.
    :vartype utilization_info: ~azure.mgmt.compute.models.CapacityReservationUtilization
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    utilization_info: Optional["_models.CapacityReservationUtilization"] = rest_field(
        name="utilizationInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """Unutilized capacity of the capacity reservation."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        utilization_info: Optional["_models.CapacityReservationUtilization"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 CapacityReservationInstanceViewWithName(CapacityReservationInstanceView):
    """The instance view of a capacity reservation that includes the name of the capacity reservation.
    It is used for the response to the instance view of a capacity reservation group.

    :ivar utilization_info: Unutilized capacity of the capacity reservation.
    :vartype utilization_info: ~azure.mgmt.compute.models.CapacityReservationUtilization
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar name: The name of the capacity reservation.
    :vartype name: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the capacity reservation."""

    @overload
    def __init__(
        self,
        *,
        utilization_info: Optional["_models.CapacityReservationUtilization"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 CapacityReservationProfile(_Model):
    """The parameters of a capacity reservation Profile.

    :ivar capacity_reservation_group: Specifies the capacity reservation group resource id that
     should be used for allocating the virtual machine or scaleset vm instances provided enough
     capacity has been reserved. Please refer to `https://aka.ms/CapacityReservation
     <https://aka.ms/CapacityReservation>`_ for more details.
    :vartype capacity_reservation_group: ~azure.mgmt.compute.models.SubResource
    """

    capacity_reservation_group: Optional["_models.SubResource"] = rest_field(
        name="capacityReservationGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the capacity reservation group resource id that should be used for allocating the
     virtual machine or scaleset vm instances provided enough capacity has been reserved. Please
     refer to `https://aka.ms/CapacityReservation <https://aka.ms/CapacityReservation>`_ for more
     details."""

    @overload
    def __init__(
        self,
        *,
        capacity_reservation_group: Optional["_models.SubResource"] = 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 CapacityReservationProperties(_Model):
    """Properties of the Capacity reservation.

    :ivar reservation_id: A unique id generated and assigned to the capacity reservation by the
     platform which does not change throughout the lifetime of the resource.
    :vartype reservation_id: str
    :ivar platform_fault_domain_count: Specifies the value of fault domain count that Capacity
     Reservation supports for requested VM size. **Note:** The fault domain count specified for a
     resource (like virtual machines scale set) must be less than or equal to this value if it
     deploys using capacity reservation. Minimum api-version: 2022-08-01.
    :vartype platform_fault_domain_count: int
    :ivar virtual_machines_associated: A list of all virtual machine resource ids that are
     associated with the capacity reservation.
    :vartype virtual_machines_associated: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar provisioning_time: The date time when the capacity reservation was last updated.
    :vartype provisioning_time: ~datetime.datetime
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar instance_view: The Capacity reservation instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.CapacityReservationInstanceView
    :ivar time_created: Specifies the time at which the Capacity Reservation resource was created.
     Minimum api-version: 2021-11-01.
    :vartype time_created: ~datetime.datetime
    :ivar schedule_profile: Defines the schedule for Block-type capacity reservations. Specifies
     the schedule during which capacity reservation is active and VM or VMSS resource can be
     allocated using reservation. This property is required and only supported when the capacity
     reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable
     after creation. Minimum API version: 2025-04-01. Please refer to
     `https://aka.ms/blockcapacityreservation <https://aka.ms/blockcapacityreservation>`_ for more
     details.
    :vartype schedule_profile: ~azure.mgmt.compute.models.ScheduleProfile
    """

    reservation_id: Optional[str] = rest_field(name="reservationId", visibility=["read"])
    """A unique id generated and assigned to the capacity reservation by the platform which does not
     change throughout the lifetime of the resource."""
    platform_fault_domain_count: Optional[int] = rest_field(name="platformFaultDomainCount", visibility=["read"])
    """Specifies the value of fault domain count that Capacity Reservation supports for requested VM
     size. **Note:** The fault domain count specified for a resource (like virtual machines scale
     set) must be less than or equal to this value if it deploys using capacity reservation. Minimum
     api-version: 2022-08-01."""
    virtual_machines_associated: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="virtualMachinesAssociated", visibility=["read"]
    )
    """A list of all virtual machine resource ids that are associated with the capacity reservation."""
    provisioning_time: Optional[datetime.datetime] = rest_field(
        name="provisioningTime", visibility=["read"], format="rfc3339"
    )
    """The date time when the capacity reservation was last updated."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    instance_view: Optional["_models.CapacityReservationInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The Capacity reservation instance view."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Capacity Reservation resource was created. Minimum api-version:
     2021-11-01."""
    schedule_profile: Optional["_models.ScheduleProfile"] = rest_field(
        name="scheduleProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the schedule for Block-type capacity reservations. Specifies the schedule during which
     capacity reservation is active and VM or VMSS resource can be allocated using reservation. This
     property is required and only supported when the capacity reservation group type is 'Block'.
     The scheduleProfile, start, and end fields are immutable after creation. Minimum API version:
     2025-04-01. Please refer to `https://aka.ms/blockcapacityreservation
     <https://aka.ms/blockcapacityreservation>`_ for more details."""

    @overload
    def __init__(
        self,
        *,
        schedule_profile: Optional["_models.ScheduleProfile"] = 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 CapacityReservationUpdate(UpdateResource):
    """Specifies information about the capacity reservation. sku.capacity cannot be updated for Block
    Capacity Reservation. Tags can be update for all Capacity Reservation Types.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Properties of the Capacity reservation.
    :vartype properties: ~azure.mgmt.compute.models.CapacityReservationProperties
    :ivar sku: SKU of the resource for which capacity needs be reserved. The SKU name and capacity
     is required to be set. Currently VM Skus with the capability called
     'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported'
     is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists
     the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to
     List Microsoft.Compute SKUs in a region
     (`https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_) for supported values.
     **Note:** The SKU name and capacity cannot be updated for Block capacity reservations.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    properties: Optional["_models.CapacityReservationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the Capacity reservation."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required
     to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to
     true are supported. When 'CapacityReservationSupported' is true, the SKU capability also
     specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity
     reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute
     SKUs in a region (`https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_) for supported values.
     **Note:** The SKU name and capacity cannot be updated for Block capacity reservations."""

    __flattened_items = [
        "reservation_id",
        "platform_fault_domain_count",
        "virtual_machines_associated",
        "provisioning_time",
        "provisioning_state",
        "instance_view",
        "time_created",
        "schedule_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.CapacityReservationProperties"] = None,
        sku: Optional["_models.Sku"] = 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 CapacityReservationUtilization(_Model):
    """Represents the capacity reservation utilization in terms of resources allocated.

    :ivar current_capacity: The value provides the current capacity of the VM size which was
     reserved successfully and for which the customer is getting billed. Minimum api-version:
     2022-08-01.
    :vartype current_capacity: int
    :ivar virtual_machines_allocated: A list of all virtual machines resource ids allocated against
     the capacity reservation.
    :vartype virtual_machines_allocated: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    """

    current_capacity: Optional[int] = rest_field(name="currentCapacity", visibility=["read"])
    """The value provides the current capacity of the VM size which was reserved successfully and for
     which the customer is getting billed. Minimum api-version: 2022-08-01."""
    virtual_machines_allocated: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="virtualMachinesAllocated", visibility=["read"]
    )
    """A list of all virtual machines resource ids allocated against the capacity reservation."""


class CloudError(_Model):
    """An error response from the Compute service.

    :ivar error: Api error.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    error: Optional["_models.ApiError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Api error."""

    @overload
    def __init__(
        self,
        *,
        error: Optional["_models.ApiError"] = 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 PirCommunityGalleryResource(_Model):
    """Base information about the community gallery resource in azure compute gallery.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar identifier: The identifier information of community gallery.
    :vartype identifier: ~azure.mgmt.compute.models.CommunityGalleryIdentifier
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Resource name."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Resource location."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    identifier: Optional["_models.CommunityGalleryIdentifier"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identifier information of community gallery."""

    __flattened_items = ["unique_id"]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.CommunityGalleryIdentifier"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class CommunityGallery(PirCommunityGalleryResource):
    """Specifies information about the Community Gallery that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar identifier: The identifier information of community gallery.
    :vartype identifier: ~azure.mgmt.compute.models.CommunityGalleryIdentifier
    :ivar properties: Describes the properties of a community gallery.
    :vartype properties: ~azure.mgmt.compute.models.CommunityGalleryProperties
    """

    properties: Optional["_models.CommunityGalleryProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a community gallery."""

    __flattened_items = ["unique_id", "disclaimer", "artifact_tags", "community_metadata"]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.CommunityGalleryIdentifier"] = None,
        properties: Optional["_models.CommunityGalleryProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class CommunityGalleryIdentifier(_Model):
    """The identifier information of community gallery.

    :ivar unique_id: The unique id of this community gallery.
    :vartype unique_id: str
    """

    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read", "create", "update", "delete", "query"])
    """The unique id of this community gallery."""

    @overload
    def __init__(
        self,
        *,
        unique_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 CommunityGalleryImage(PirCommunityGalleryResource):
    """Specifies information about the gallery image definition that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar identifier: The identifier information of community gallery.
    :vartype identifier: ~azure.mgmt.compute.models.CommunityGalleryIdentifier
    :ivar properties: Describes the properties of a gallery image definition.
    :vartype properties: ~azure.mgmt.compute.models.CommunityGalleryImageProperties
    """

    properties: Optional["_models.CommunityGalleryImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image definition."""

    __flattened_items = [
        "unique_id",
        "os_type",
        "os_state",
        "end_of_life_date",
        "identifier",
        "recommended",
        "disallowed",
        "hyper_v_generation",
        "features",
        "purchase_plan",
        "architecture",
        "privacy_statement_uri",
        "eula",
        "disclaimer",
        "artifact_tags",
    ]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.CommunityGalleryIdentifier"] = None,
        properties: Optional["_models.CommunityGalleryImageProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class CommunityGalleryImageIdentifier(_Model):
    """This is the community gallery image definition identifier.

    :ivar publisher: The name of the gallery image definition publisher.
    :vartype publisher: str
    :ivar offer: The name of the gallery image definition offer.
    :vartype offer: str
    :ivar sku: The name of the gallery image definition SKU.
    :vartype sku: str
    """

    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition publisher."""
    offer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition offer."""
    sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition SKU."""

    @overload
    def __init__(
        self,
        *,
        publisher: Optional[str] = None,
        offer: Optional[str] = None,
        sku: 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 CommunityGalleryImageProperties(_Model):
    """Describes the properties of a gallery image definition.

    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux.**.
     Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar os_state: This property allows the user to specify whether the virtual machines created
     under this image are 'Generalized' or 'Specialized'. Required. Known values are: "Generalized"
     and "Specialized".
    :vartype os_state: str or ~azure.mgmt.compute.models.OperatingSystemStateTypes
    :ivar end_of_life_date: The end of life date of the gallery image definition. This property can
     be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar identifier: This is the community gallery image definition identifier. Required.
    :vartype identifier: ~azure.mgmt.compute.models.CommunityGalleryImageIdentifier
    :ivar recommended: The properties describe the recommended machine configuration for this Image
     Definition. These properties are updatable.
    :vartype recommended: ~azure.mgmt.compute.models.RecommendedMachineConfiguration
    :ivar disallowed: Describes the disallowed disk types.
    :vartype disallowed: ~azure.mgmt.compute.models.Disallowed
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar features: A list of gallery image features.
    :vartype features: list[~azure.mgmt.compute.models.GalleryImageFeature]
    :ivar purchase_plan: Describes the gallery image definition purchase plan. This is used by
     marketplace images.
    :vartype purchase_plan: ~azure.mgmt.compute.models.ImagePurchasePlan
    :ivar architecture: The architecture of the image. Applicable to OS disks only. Known values
     are: "x64" and "Arm64".
    :vartype architecture: str or ~azure.mgmt.compute.models.Architecture
    :ivar privacy_statement_uri: Privacy statement URI for the current community gallery image.
    :vartype privacy_statement_uri: str
    :ivar eula: The end-user license agreement for the current community gallery image.
    :vartype eula: str
    :ivar disclaimer: The disclaimer for a community gallery resource.
    :vartype disclaimer: str
    :ivar artifact_tags: The artifact tags of a community gallery resource.
    :vartype artifact_tags: dict[str, str]
    """

    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk when
     creating a VM from a managed image. Possible values are: **Windows,** **Linux.**. Required.
     Known values are: \"Windows\" and \"Linux\"."""
    os_state: Union[str, "_models.OperatingSystemStateTypes"] = rest_field(
        name="osState", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows the user to specify whether the virtual machines created under this image
     are 'Generalized' or 'Specialized'. Required. Known values are: \"Generalized\" and
     \"Specialized\"."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    identifier: "_models.CommunityGalleryImageIdentifier" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the community gallery image definition identifier. Required."""
    recommended: Optional["_models.RecommendedMachineConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties describe the recommended machine configuration for this Image Definition. These
     properties are updatable."""
    disallowed: Optional["_models.Disallowed"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the disallowed disk types."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    features: Optional[list["_models.GalleryImageFeature"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of gallery image features."""
    purchase_plan: Optional["_models.ImagePurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the gallery image definition purchase plan. This is used by marketplace images."""
    architecture: Optional[Union[str, "_models.Architecture"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The architecture of the image. Applicable to OS disks only. Known values are: \"x64\" and
     \"Arm64\"."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Privacy statement URI for the current community gallery image."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The end-user license agreement for the current community gallery image."""
    disclaimer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disclaimer for a community gallery resource."""
    artifact_tags: Optional[dict[str, str]] = rest_field(
        name="artifactTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact tags of a community gallery resource."""

    @overload
    def __init__(
        self,
        *,
        os_type: Union[str, "_models.OperatingSystemTypes"],
        os_state: Union[str, "_models.OperatingSystemStateTypes"],
        identifier: "_models.CommunityGalleryImageIdentifier",
        end_of_life_date: Optional[datetime.datetime] = None,
        recommended: Optional["_models.RecommendedMachineConfiguration"] = None,
        disallowed: Optional["_models.Disallowed"] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        features: Optional[list["_models.GalleryImageFeature"]] = None,
        purchase_plan: Optional["_models.ImagePurchasePlan"] = None,
        architecture: Optional[Union[str, "_models.Architecture"]] = None,
        privacy_statement_uri: Optional[str] = None,
        eula: Optional[str] = None,
        disclaimer: Optional[str] = None,
        artifact_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 CommunityGalleryImageVersion(PirCommunityGalleryResource):
    """Specifies information about the gallery image version that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar identifier: The identifier information of community gallery.
    :vartype identifier: ~azure.mgmt.compute.models.CommunityGalleryIdentifier
    :ivar properties: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.CommunityGalleryImageVersionProperties
    """

    properties: Optional["_models.CommunityGalleryImageVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = [
        "unique_id",
        "published_date",
        "end_of_life_date",
        "exclude_from_latest",
        "storage_profile",
        "disclaimer",
        "artifact_tags",
    ]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.CommunityGalleryIdentifier"] = None,
        properties: Optional["_models.CommunityGalleryImageVersionProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class CommunityGalleryImageVersionProperties(_Model):
    """Describes the properties of a gallery image version.

    :ivar published_date: The published date of the gallery image version Definition. This property
     can be used for decommissioning purposes. This property is updatable.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version Definition. This
     property can be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar storage_profile: Describes the storage profile of the image version.
    :vartype storage_profile: ~azure.mgmt.compute.models.SharedGalleryImageVersionStorageProfile
    :ivar disclaimer: The disclaimer for a community gallery resource.
    :vartype disclaimer: str
    :ivar artifact_tags: The artifact tags of a community gallery resource.
    :vartype artifact_tags: dict[str, str]
    """

    published_date: Optional[datetime.datetime] = rest_field(
        name="publishedDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The published date of the gallery image version Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image version Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    exclude_from_latest: Optional[bool] = rest_field(
        name="excludeFromLatest", visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to true, Virtual Machines deployed from the latest version of the Image Definition won't
     use this Image Version."""
    storage_profile: Optional["_models.SharedGalleryImageVersionStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the storage profile of the image version."""
    disclaimer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disclaimer for a community gallery resource."""
    artifact_tags: Optional[dict[str, str]] = rest_field(
        name="artifactTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact tags of a community gallery resource."""

    @overload
    def __init__(
        self,
        *,
        published_date: Optional[datetime.datetime] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        exclude_from_latest: Optional[bool] = None,
        storage_profile: Optional["_models.SharedGalleryImageVersionStorageProfile"] = None,
        disclaimer: Optional[str] = None,
        artifact_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 CommunityGalleryInfo(_Model):
    """Information of community gallery if current gallery is shared to community.

    :ivar publisher_uri: The link to the publisher website. Visible to all users.
    :vartype publisher_uri: str
    :ivar publisher_contact: Community gallery publisher support email. The email address of the
     publisher. Visible to all users.
    :vartype publisher_contact: str
    :ivar eula: End-user license agreement for community gallery image.
    :vartype eula: str
    :ivar public_name_prefix: The prefix of the gallery name that will be displayed publicly.
     Visible to all users.
    :vartype public_name_prefix: str
    :ivar community_gallery_enabled: Contains info about whether community gallery sharing is
     enabled.
    :vartype community_gallery_enabled: bool
    :ivar public_names: Community gallery public name list.
    :vartype public_names: list[str]
    """

    publisher_uri: Optional[str] = rest_field(
        name="publisherUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The link to the publisher website. Visible to all users."""
    publisher_contact: Optional[str] = rest_field(
        name="publisherContact", visibility=["read", "create", "update", "delete", "query"]
    )
    """Community gallery publisher support email. The email address of the publisher. Visible to all
     users."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """End-user license agreement for community gallery image."""
    public_name_prefix: Optional[str] = rest_field(
        name="publicNamePrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """The prefix of the gallery name that will be displayed publicly. Visible to all users."""
    community_gallery_enabled: Optional[bool] = rest_field(name="communityGalleryEnabled", visibility=["read"])
    """Contains info about whether community gallery sharing is enabled."""
    public_names: Optional[list[str]] = rest_field(name="publicNames", visibility=["read"])
    """Community gallery public name list."""

    @overload
    def __init__(
        self,
        *,
        publisher_uri: Optional[str] = None,
        publisher_contact: Optional[str] = None,
        eula: Optional[str] = None,
        public_name_prefix: 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 CommunityGalleryMetadata(_Model):
    """The metadata of community gallery.

    :ivar publisher_uri: The publisher URI of this community gallery.
    :vartype publisher_uri: str
    :ivar publisher_contact: The publisher email id of this community gallery. Required.
    :vartype publisher_contact: str
    :ivar eula: The end-user license agreement for this community gallery.
    :vartype eula: str
    :ivar public_names: A list of public names the gallery has. Required.
    :vartype public_names: list[str]
    :ivar privacy_statement_uri: The link for the privacy statement of this community gallery from
     the gallery publisher.
    :vartype privacy_statement_uri: str
    """

    publisher_uri: Optional[str] = rest_field(
        name="publisherUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publisher URI of this community gallery."""
    publisher_contact: str = rest_field(
        name="publisherContact", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publisher email id of this community gallery. Required."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The end-user license agreement for this community gallery."""
    public_names: list[str] = rest_field(name="publicNames", visibility=["read", "create", "update", "delete", "query"])
    """A list of public names the gallery has. Required."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The link for the privacy statement of this community gallery from the gallery publisher."""

    @overload
    def __init__(
        self,
        *,
        publisher_contact: str,
        public_names: list[str],
        publisher_uri: Optional[str] = None,
        eula: Optional[str] = None,
        privacy_statement_uri: 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 CommunityGalleryProperties(_Model):
    """Describes the properties of a community gallery.

    :ivar disclaimer: The disclaimer for a community gallery resource.
    :vartype disclaimer: str
    :ivar artifact_tags: The artifact tags of a community gallery resource.
    :vartype artifact_tags: dict[str, str]
    :ivar community_metadata: The metadata of community gallery.
    :vartype community_metadata: ~azure.mgmt.compute.models.CommunityGalleryMetadata
    """

    disclaimer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disclaimer for a community gallery resource."""
    artifact_tags: Optional[dict[str, str]] = rest_field(
        name="artifactTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact tags of a community gallery resource."""
    community_metadata: Optional["_models.CommunityGalleryMetadata"] = rest_field(
        name="communityMetadata", visibility=["read", "create", "update", "delete", "query"]
    )
    """The metadata of community gallery."""

    @overload
    def __init__(
        self,
        *,
        disclaimer: Optional[str] = None,
        artifact_tags: Optional[dict[str, str]] = None,
        community_metadata: Optional["_models.CommunityGalleryMetadata"] = 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 ConvertToVirtualMachineScaleSetInput(_Model):
    """Describes the Virtual Machine Scale Set to convert from Availability Set.

    :ivar virtual_machine_scale_set_name: Specifies information about the Virtual Machine Scale Set
     that the Availability Set should be converted to.
    :vartype virtual_machine_scale_set_name: str
    """

    virtual_machine_scale_set_name: Optional[str] = rest_field(
        name="virtualMachineScaleSetName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the Virtual Machine Scale Set that the Availability Set should be
     converted to."""

    @overload
    def __init__(
        self,
        *,
        virtual_machine_scale_set_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 CopyCompletionError(_Model):
    """Indicates the error details if the background copy of a resource created via the CopyStart
    operation fails.

    :ivar error_code: Indicates the error code if the background copy of a resource created via the
     CopyStart operation fails. Required. "CopySourceNotFound"
    :vartype error_code: str or ~azure.mgmt.compute.models.CopyCompletionErrorReason
    :ivar error_message: Indicates the error message if the background copy of a resource created
     via the CopyStart operation fails. Required.
    :vartype error_message: str
    """

    error_code: Union[str, "_models.CopyCompletionErrorReason"] = rest_field(
        name="errorCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the error code if the background copy of a resource created via the CopyStart
     operation fails. Required. \"CopySourceNotFound\""""
    error_message: str = rest_field(name="errorMessage", visibility=["read", "create", "update", "delete", "query"])
    """Indicates the error message if the background copy of a resource created via the CopyStart
     operation fails. Required."""

    @overload
    def __init__(
        self,
        *,
        error_code: Union[str, "_models.CopyCompletionErrorReason"],
        error_message: 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 CreationData(_Model):
    """Data used when creating a disk.

    :ivar create_option: This enumerates the possible sources of a disk's creation. Required. Known
     values are: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload", "CopyStart",
     "ImportSecure", "UploadPreparedSecure", and "CopyFromSanSnapshot".
    :vartype create_option: str or ~azure.mgmt.compute.models.DiskCreateOption
    :ivar storage_account_id: Required if createOption is Import. The Azure Resource Manager
     identifier of the storage account containing the blob to import as a disk.
    :vartype storage_account_id: str
    :ivar image_reference: Disk source information for PIR or user images.
    :vartype image_reference: ~azure.mgmt.compute.models.ImageDiskReference
    :ivar gallery_image_reference: Required if creating from a Gallery Image. The
     id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of
     the shared galley image version from which to create a disk.
    :vartype gallery_image_reference: ~azure.mgmt.compute.models.ImageDiskReference
    :ivar source_uri: If createOption is Import, this is the URI of a blob to be imported into a
     managed disk.
    :vartype source_uri: str
    :ivar source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot or
     disk.
    :vartype source_resource_id: str
    :ivar source_unique_id: If this field is set, this is the unique id identifying the source of
     this resource.
    :vartype source_unique_id: str
    :ivar upload_size_bytes: If createOption is Upload, this is the size of the contents of the
     upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for
     the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
    :vartype upload_size_bytes: int
    :ivar logical_sector_size: Logical sector size in bytes for Ultra disks. Supported values are
     512 ad 4096. 4096 is the default.
    :vartype logical_sector_size: int
    :ivar security_data_uri: If createOption is ImportSecure, this is the URI of a blob to be
     imported into VM guest state.
    :vartype security_data_uri: str
    :ivar security_metadata_uri: If createOption is ImportSecure, this is the URI of a blob to be
     imported into VM metadata for Confidential VM.
    :vartype security_metadata_uri: str
    :ivar performance_plus: Set this flag to true to get a boost on the performance target of the
     disk deployed, see here on the respective performance target. This flag can only be set on disk
     creation time and cannot be disabled after enabled.
    :vartype performance_plus: bool
    :ivar elastic_san_resource_id: Required if createOption is CopyFromSanSnapshot. This is the ARM
     id of the source elastic san volume snapshot.
    :vartype elastic_san_resource_id: str
    :ivar provisioned_bandwidth_copy_speed: If this field is set on a snapshot and createOption is
     CopyStart, the snapshot will be copied at a quicker speed. Known values are: "None" and
     "Enhanced".
    :vartype provisioned_bandwidth_copy_speed: str or
     ~azure.mgmt.compute.models.ProvisionedBandwidthCopyOption
    :ivar instant_access_duration_minutes: For snapshots created from Premium SSD v2 or Ultra disk,
     this property determines the time in minutes the snapshot is retained for instant access to
     enable faster restore.
    :vartype instant_access_duration_minutes: int
    """

    create_option: Union[str, "_models.DiskCreateOption"] = rest_field(
        name="createOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """This enumerates the possible sources of a disk's creation. Required. Known values are:
     \"Empty\", \"Attach\", \"FromImage\", \"Import\", \"Copy\", \"Restore\", \"Upload\",
     \"CopyStart\", \"ImportSecure\", \"UploadPreparedSecure\", and \"CopyFromSanSnapshot\"."""
    storage_account_id: Optional[str] = rest_field(
        name="storageAccountId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if createOption is Import. The Azure Resource Manager identifier of the storage
     account containing the blob to import as a disk."""
    image_reference: Optional["_models.ImageDiskReference"] = rest_field(
        name="imageReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk source information for PIR or user images."""
    gallery_image_reference: Optional["_models.ImageDiskReference"] = rest_field(
        name="galleryImageReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId
     of the ImageDiskReference will be the ARM id of the shared galley image version from which to
     create a disk."""
    source_uri: Optional[str] = rest_field(name="sourceUri", visibility=["read", "create", "update", "delete", "query"])
    """If createOption is Import, this is the URI of a blob to be imported into a managed disk."""
    source_resource_id: Optional[str] = rest_field(
        name="sourceResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """If createOption is Copy, this is the ARM id of the source snapshot or disk."""
    source_unique_id: Optional[str] = rest_field(name="sourceUniqueId", visibility=["read"])
    """If this field is set, this is the unique id identifying the source of this resource."""
    upload_size_bytes: Optional[int] = rest_field(
        name="uploadSizeBytes", visibility=["read", "create", "update", "delete", "query"]
    )
    """If createOption is Upload, this is the size of the contents of the upload including the VHD
     footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and
     35183298347520 bytes (32 TiB + 512 bytes for the VHD footer)."""
    logical_sector_size: Optional[int] = rest_field(
        name="logicalSectorSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the
     default."""
    security_data_uri: Optional[str] = rest_field(
        name="securityDataUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state."""
    security_metadata_uri: Optional[str] = rest_field(
        name="securityMetadataUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """If createOption is ImportSecure, this is the URI of a blob to be imported into VM metadata for
     Confidential VM."""
    performance_plus: Optional[bool] = rest_field(
        name="performancePlus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set this flag to true to get a boost on the performance target of the disk deployed, see here
     on the respective performance target. This flag can only be set on disk creation time and
     cannot be disabled after enabled."""
    elastic_san_resource_id: Optional[str] = rest_field(
        name="elasticSanResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san
     volume snapshot."""
    provisioned_bandwidth_copy_speed: Optional[Union[str, "_models.ProvisionedBandwidthCopyOption"]] = rest_field(
        name="provisionedBandwidthCopySpeed", visibility=["read", "create", "update", "delete", "query"]
    )
    """If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied
     at a quicker speed. Known values are: \"None\" and \"Enhanced\"."""
    instant_access_duration_minutes: Optional[int] = rest_field(
        name="instantAccessDurationMinutes", visibility=["read", "create", "update", "delete", "query"]
    )
    """For snapshots created from Premium SSD v2 or Ultra disk, this property determines the time in
     minutes the snapshot is retained for instant access to enable faster restore."""

    @overload
    def __init__(
        self,
        *,
        create_option: Union[str, "_models.DiskCreateOption"],
        storage_account_id: Optional[str] = None,
        image_reference: Optional["_models.ImageDiskReference"] = None,
        gallery_image_reference: Optional["_models.ImageDiskReference"] = None,
        source_uri: Optional[str] = None,
        source_resource_id: Optional[str] = None,
        upload_size_bytes: Optional[int] = None,
        logical_sector_size: Optional[int] = None,
        security_data_uri: Optional[str] = None,
        security_metadata_uri: Optional[str] = None,
        performance_plus: Optional[bool] = None,
        elastic_san_resource_id: Optional[str] = None,
        provisioned_bandwidth_copy_speed: Optional[Union[str, "_models.ProvisionedBandwidthCopyOption"]] = None,
        instant_access_duration_minutes: 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 DataDisk(_Model):
    """Describes a data disk.

    :ivar lun: Specifies the logical unit number of the data disk. This value is used to identify
     data disks within the VM and therefore must be unique for each data disk attached to a VM.
     Required.
    :vartype lun: int
    :ivar name: The disk name.
    :vartype name: str
    :ivar vhd: The virtual hard disk.
    :vartype vhd: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar image: The source user image virtual hard disk. The virtual hard disk will be copied
     before being attached to the virtual machine. If SourceImage is provided, the destination
     virtual hard drive must not exist.
    :vartype image: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    :ivar create_option: Specifies how the virtual machine disk should be created. Possible values
     are **Attach:** This value is used when you are using a specialized disk to create the virtual
     machine. **FromImage:** This value is used when you are using an image to create the virtual
     machine data disk. If you are using a platform image, you should also use the imageReference
     element described above. If you are using a marketplace image, you should also use the plan
     element previously described. **Empty:** This value is used when creating an empty data disk.
     **Copy:** This value is used to create a data disk from a snapshot or another disk.
     **Restore:** This value is used to create a data disk from a disk restore point. Required.
     Known values are: "FromImage", "Empty", "Attach", "Copy", and "Restore".
    :vartype create_option: str or ~azure.mgmt.compute.models.DiskCreateOptionTypes
    :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be
     used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is
     the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
    :vartype disk_size_gb: int
    :ivar storage_fault_domain_alignment: Specifies the storage fault domain alignment type for the
     disk. Known values are: "Aligned" and "BestEffortAligned".
    :vartype storage_fault_domain_alignment: str or
     ~azure.mgmt.compute.models.StorageFaultDomainAlignmentType
    :ivar managed_disk: The managed disk parameters.
    :vartype managed_disk: ~azure.mgmt.compute.models.ManagedDiskParameters
    :ivar source_resource: The source resource identifier. It can be a snapshot, or disk restore
     point from which to create a disk.
    :vartype source_resource: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar to_be_detached: Specifies whether the data disk is in process of detachment from the
     VirtualMachine/VirtualMachineScaleset.
    :vartype to_be_detached: bool
    :ivar disk_iops_read_write: Specifies the Read-Write IOPS for the managed disk when
     StorageAccountType is UltraSSD_LRS.
    :vartype disk_iops_read_write: int
    :ivar disk_m_bps_read_write: Specifies the bandwidth in MB per second for the managed disk when
     StorageAccountType is UltraSSD_LRS.
    :vartype disk_m_bps_read_write: int
    :ivar detach_option: Specifies the detach behavior to be used while detaching a disk or which
     is already in the process of detachment from the virtual machine. Supported values:
     **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a
     previous detachment attempt of the data disk did not complete due to an unexpected failure from
     the virtual machine and the disk is still not released then use force-detach as a last resort
     option to detach the disk forcibly from the VM. All writes might not have been flushed when
     using this detach behavior. **This feature is still in preview**. To force-detach a data disk
     update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. "ForceDetach"
    :vartype detach_option: str or ~azure.mgmt.compute.models.DiskDetachOptionTypes
    :ivar delete_option: Specifies whether data disk should be deleted or detached upon VM
     deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when
     VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is
     deleted. The default value is set to **Detach**. Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    """

    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the logical unit number of the data disk. This value is used to identify data disks
     within the VM and therefore must be unique for each data disk attached to a VM. Required."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disk name."""
    vhd: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual hard disk."""
    image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The source user image virtual hard disk. The virtual hard disk will be copied before being
     attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive
     must not exist."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""
    create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(
        name="createOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies how the virtual machine disk should be created. Possible values are **Attach:** This
     value is used when you are using a specialized disk to create the virtual machine.
     **FromImage:** This value is used when you are using an image to create the virtual machine
     data disk. If you are using a platform image, you should also use the imageReference element
     described above. If you are using a marketplace image, you should also use the plan element
     previously described. **Empty:** This value is used when creating an empty data disk. **Copy:**
     This value is used to create a data disk from a snapshot or another disk. **Restore:** This
     value is used to create a data disk from a disk restore point. Required. Known values are:
     \"FromImage\", \"Empty\", \"Attach\", \"Copy\", and \"Restore\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite
     the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of
     bytes x 1024^3 for the disk and the value cannot be larger than 1023."""
    storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = rest_field(
        name="storageFaultDomainAlignment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage fault domain alignment type for the disk. Known values are: \"Aligned\"
     and \"BestEffortAligned\"."""
    managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed disk parameters."""
    source_resource: Optional["_models.ApiEntityReference"] = rest_field(
        name="sourceResource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The source resource identifier. It can be a snapshot, or disk restore point from which to
     create a disk."""
    to_be_detached: Optional[bool] = rest_field(
        name="toBeDetached", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the data disk is in process of detachment from the
     VirtualMachine/VirtualMachineScaleset."""
    disk_iops_read_write: Optional[int] = rest_field(
        name="diskIOPSReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS."""
    disk_m_bps_read_write: Optional[int] = rest_field(
        name="diskMBpsReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is
     UltraSSD_LRS."""
    detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = rest_field(
        name="detachOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the detach behavior to be used while detaching a disk or which is already in the
     process of detachment from the virtual machine. Supported values: **ForceDetach.**
     detachOption: **ForceDetach** is applicable only for managed data disks. If a previous
     detachment attempt of the data disk did not complete due to an unexpected failure from the
     virtual machine and the disk is still not released then use force-detach as a last resort
     option to detach the disk forcibly from the VM. All writes might not have been flushed when
     using this detach behavior. **This feature is still in preview**. To force-detach a data disk
     update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. \"ForceDetach\""""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether data disk should be deleted or detached upon VM deletion. Possible values
     are: **Delete.** If this value is used, the data disk is deleted when VM is deleted.
     **Detach.** If this value is used, the data disk is retained after VM is deleted. The default
     value is set to **Detach**. Known values are: \"Delete\" and \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        create_option: Union[str, "_models.DiskCreateOptionTypes"],
        name: Optional[str] = None,
        vhd: Optional["_models.VirtualHardDisk"] = None,
        image: Optional["_models.VirtualHardDisk"] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        write_accelerator_enabled: Optional[bool] = None,
        disk_size_gb: Optional[int] = None,
        storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = None,
        managed_disk: Optional["_models.ManagedDiskParameters"] = None,
        source_resource: Optional["_models.ApiEntityReference"] = None,
        to_be_detached: Optional[bool] = None,
        disk_iops_read_write: Optional[int] = None,
        disk_m_bps_read_write: Optional[int] = None,
        detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = 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 DataDiskImage(_Model):
    """Contains the data disk images information.

    :ivar lun: Specifies the logical unit number of the data disk. This value is used to identify
     data disks within the VM and therefore must be unique for each data disk attached to a VM.
    :vartype lun: int
    """

    lun: Optional[int] = rest_field(visibility=["read"])
    """Specifies the logical unit number of the data disk. This value is used to identify data disks
     within the VM and therefore must be unique for each data disk attached to a VM."""


class DiskImageEncryption(_Model):
    """This is the disk image encryption base class.

    :ivar disk_encryption_set_id: A relative URI containing the resource ID of the disk encryption
     set.
    :vartype disk_encryption_set_id: str
    """

    disk_encryption_set_id: Optional[str] = rest_field(
        name="diskEncryptionSetId", visibility=["read", "create", "update", "delete", "query"]
    )
    """A relative URI containing the resource ID of the disk encryption set."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_set_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 DataDiskImageEncryption(DiskImageEncryption):
    """Contains encryption settings for a data disk image.

    :ivar disk_encryption_set_id: A relative URI containing the resource ID of the disk encryption
     set.
    :vartype disk_encryption_set_id: str
    :ivar lun: This property specifies the logical unit number of the data disk. This value is used
     to identify data disks within the Virtual Machine and therefore must be unique for each data
     disk attached to the Virtual Machine. Required.
    :vartype lun: int
    """

    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This property specifies the logical unit number of the data disk. This value is used to
     identify data disks within the Virtual Machine and therefore must be unique for each data disk
     attached to the Virtual Machine. Required."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        disk_encryption_set_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 DataDisksToAttach(_Model):
    """Describes the data disk to be attached.

    :ivar disk_id: ID of the managed data disk. Required.
    :vartype disk_id: str
    :ivar lun: The logical unit number of the data disk. This value is used to identify data disks
     within the VM and therefore must be unique for each data disk attached to a VM. If not
     specified, lun would be auto assigned.
    :vartype lun: int
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar delete_option: Specifies whether data disk should be deleted or detached upon VM
     deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when
     VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is
     deleted. The default value is set to **Detach**. Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    """

    disk_id: str = rest_field(name="diskId", visibility=["read", "create", "update", "delete", "query"])
    """ID of the managed data disk. Required."""
    lun: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The logical unit number of the data disk. This value is used to identify data disks within the
     VM and therefore must be unique for each data disk attached to a VM. If not specified, lun
     would be auto assigned."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether data disk should be deleted or detached upon VM deletion. Possible values
     are: **Delete.** If this value is used, the data disk is deleted when VM is deleted.
     **Detach.** If this value is used, the data disk is retained after VM is deleted. The default
     value is set to **Detach**. Known values are: \"Delete\" and \"Detach\"."""
    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the customer managed disk encryption set resource id for the managed disk."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""

    @overload
    def __init__(
        self,
        *,
        disk_id: str,
        lun: Optional[int] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None,
        write_accelerator_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 DataDisksToDetach(_Model):
    """Describes the data disk to be detached.

    :ivar disk_id: ID of the managed data disk. Required.
    :vartype disk_id: str
    :ivar detach_option: Supported options available for Detach of a disk from a VM. Refer to
     DetachOption object reference for more details. "ForceDetach"
    :vartype detach_option: str or ~azure.mgmt.compute.models.DiskDetachOptionTypes
    """

    disk_id: str = rest_field(name="diskId", visibility=["read", "create", "update", "delete", "query"])
    """ID of the managed data disk. Required."""
    detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = rest_field(
        name="detachOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Supported options available for Detach of a disk from a VM. Refer to DetachOption object
     reference for more details. \"ForceDetach\""""

    @overload
    def __init__(
        self,
        *,
        disk_id: str,
        detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = 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 DedicatedHost(TrackedResource):
    """Specifies information about the Dedicated host.

    :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.compute.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: Properties of the dedicated host.
    :vartype properties: ~azure.mgmt.compute.models.DedicatedHostProperties
    :ivar sku: SKU of the dedicated host for Hardware Generation and VM family. Only name is
     required to be set. List Microsoft.Compute SKUs for a list of possible values. Required.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    properties: Optional["_models.DedicatedHostProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the dedicated host."""
    sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be
     set. List Microsoft.Compute SKUs for a list of possible values. Required."""

    __flattened_items = [
        "platform_fault_domain",
        "auto_replace_on_failure",
        "host_id",
        "virtual_machines",
        "license_type",
        "provisioning_time",
        "provisioning_state",
        "instance_view",
        "time_created",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        sku: "_models.Sku",
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DedicatedHostProperties"] = 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 DedicatedHostAllocatableVM(_Model):
    """Represents the dedicated host unutilized capacity in terms of a specific VM size.

    :ivar vm_size: VM size in terms of which the unutilized capacity is represented.
    :vartype vm_size: str
    :ivar count: Maximum number of VMs of size vmSize that can fit in the dedicated host's
     remaining capacity.
    :vartype count: float
    """

    vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"])
    """VM size in terms of which the unutilized capacity is represented."""
    count: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity."""

    @overload
    def __init__(
        self,
        *,
        vm_size: Optional[str] = None,
        count: Optional[float] = 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 DedicatedHostAvailableCapacity(_Model):
    """Dedicated host unutilized capacity.

    :ivar allocatable_v_ms: The unutilized capacity of the dedicated host represented in terms of
     each VM size that is allowed to be deployed to the dedicated host.
    :vartype allocatable_v_ms: list[~azure.mgmt.compute.models.DedicatedHostAllocatableVM]
    """

    allocatable_v_ms: Optional[list["_models.DedicatedHostAllocatableVM"]] = rest_field(
        name="allocatableVMs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unutilized capacity of the dedicated host represented in terms of each VM size that is
     allowed to be deployed to the dedicated host."""

    @overload
    def __init__(
        self,
        *,
        allocatable_v_ms: Optional[list["_models.DedicatedHostAllocatableVM"]] = 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 DedicatedHostGroup(TrackedResource):
    """Specifies information about the dedicated host group that the dedicated hosts should be
    assigned to. Currently, a dedicated host can only be added to a dedicated host group at
    creation time. An existing dedicated host cannot be added to another dedicated host 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.compute.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: Dedicated Host Group Properties.
    :vartype properties: ~azure.mgmt.compute.models.DedicatedHostGroupProperties
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    """

    properties: Optional["_models.DedicatedHostGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Dedicated Host Group Properties."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""

    __flattened_items = [
        "platform_fault_domain_count",
        "hosts",
        "instance_view",
        "support_automatic_placement",
        "additional_capabilities",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DedicatedHostGroupProperties"] = None,
        zones: 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:
        _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 DedicatedHostGroupInstanceView(_Model):
    """DedicatedHostGroupInstanceView.

    :ivar hosts: List of instance view of the dedicated hosts under the dedicated host group.
    :vartype hosts: list[~azure.mgmt.compute.models.DedicatedHostInstanceViewWithName]
    """

    hosts: Optional[list["_models.DedicatedHostInstanceViewWithName"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of instance view of the dedicated hosts under the dedicated host group."""

    @overload
    def __init__(
        self,
        *,
        hosts: Optional[list["_models.DedicatedHostInstanceViewWithName"]] = 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 DedicatedHostGroupProperties(_Model):
    """Dedicated Host Group Properties.

    :ivar platform_fault_domain_count: Number of fault domains that the host group can span.
     Required.
    :vartype platform_fault_domain_count: int
    :ivar hosts: A list of references to all dedicated hosts in the dedicated host group.
    :vartype hosts: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar instance_view: The dedicated host group instance view, which has the list of instance
     view of the dedicated hosts under the dedicated host group.
    :vartype instance_view: ~azure.mgmt.compute.models.DedicatedHostGroupInstanceView
    :ivar support_automatic_placement: Specifies whether virtual machines or virtual machine scale
     sets can be placed automatically on the dedicated host group. Automatic placement means
     resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host
     group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01.
    :vartype support_automatic_placement: bool
    :ivar additional_capabilities: Enables or disables a capability on the dedicated host group.
     Minimum api-version: 2022-03-01.
    :vartype additional_capabilities:
     ~azure.mgmt.compute.models.DedicatedHostGroupPropertiesAdditionalCapabilities
    """

    platform_fault_domain_count: int = rest_field(
        name="platformFaultDomainCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Number of fault domains that the host group can span. Required."""
    hosts: Optional[list["_models.SubResourceReadOnly"]] = rest_field(visibility=["read"])
    """A list of references to all dedicated hosts in the dedicated host group."""
    instance_view: Optional["_models.DedicatedHostGroupInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The dedicated host group instance view, which has the list of instance view of the dedicated
     hosts under the dedicated host group."""
    support_automatic_placement: Optional[bool] = rest_field(
        name="supportAutomaticPlacement", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether virtual machines or virtual machine scale sets can be placed automatically on
     the dedicated host group. Automatic placement means resources are allocated on dedicated hosts,
     that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false'
     when not provided. Minimum api-version: 2020-06-01."""
    additional_capabilities: Optional["_models.DedicatedHostGroupPropertiesAdditionalCapabilities"] = rest_field(
        name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01."""

    @overload
    def __init__(
        self,
        *,
        platform_fault_domain_count: int,
        support_automatic_placement: Optional[bool] = None,
        additional_capabilities: Optional["_models.DedicatedHostGroupPropertiesAdditionalCapabilities"] = 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 DedicatedHostGroupPropertiesAdditionalCapabilities(_Model):  # pylint: disable=name-too-long
    """Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.

    :ivar ultra_ssd_enabled: The flag that enables or disables a capability to have UltraSSD
     Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual
     Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as
     well. The value is defaulted to 'false' when not provided. Please refer to
     `https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd
     <https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd>`_ for more
     details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for
     Host Groups that are created as zonal. Minimum api-version: 2022-03-01.
    :vartype ultra_ssd_enabled: bool
    """

    ultra_ssd_enabled: Optional[bool] = rest_field(
        name="ultraSSDEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on
     Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled,
     UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to
     'false' when not provided. Please refer to
     `https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd
     <https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd>`_ for more
     details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for
     Host Groups that are created as zonal. Minimum api-version: 2022-03-01."""

    @overload
    def __init__(
        self,
        *,
        ultra_ssd_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 DedicatedHostGroupUpdate(UpdateResource):
    """Specifies information about the dedicated host group that the dedicated host should be assigned
    to. Only tags may be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Dedicated Host Group Properties.
    :vartype properties: ~azure.mgmt.compute.models.DedicatedHostGroupProperties
    :ivar zones: Availability Zone to use for this host group. Only single zone is supported. The
     zone can be assigned only during creation. If not provided, the group supports all zones in the
     region. If provided, enforces each host in the group to be in the same zone.
    :vartype zones: list[str]
    """

    properties: Optional["_models.DedicatedHostGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Dedicated Host Group Properties."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Availability Zone to use for this host group. Only single zone is supported. The zone can be
     assigned only during creation. If not provided, the group supports all zones in the region. If
     provided, enforces each host in the group to be in the same zone."""

    __flattened_items = [
        "platform_fault_domain_count",
        "hosts",
        "instance_view",
        "support_automatic_placement",
        "additional_capabilities",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DedicatedHostGroupProperties"] = None,
        zones: 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:
        _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 DedicatedHostInstanceView(_Model):
    """The instance view of a dedicated host.

    :ivar asset_id: Specifies the unique id of the dedicated physical machine on which the
     dedicated host resides.
    :vartype asset_id: str
    :ivar available_capacity: Unutilized capacity of the dedicated host.
    :vartype available_capacity: ~azure.mgmt.compute.models.DedicatedHostAvailableCapacity
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    asset_id: Optional[str] = rest_field(name="assetId", visibility=["read"])
    """Specifies the unique id of the dedicated physical machine on which the dedicated host resides."""
    available_capacity: Optional["_models.DedicatedHostAvailableCapacity"] = rest_field(
        name="availableCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Unutilized capacity of the dedicated host."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        available_capacity: Optional["_models.DedicatedHostAvailableCapacity"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 DedicatedHostInstanceViewWithName(DedicatedHostInstanceView):
    """The instance view of a dedicated host that includes the name of the dedicated host. It is used
    for the response to the instance view of a dedicated host group.

    :ivar asset_id: Specifies the unique id of the dedicated physical machine on which the
     dedicated host resides.
    :vartype asset_id: str
    :ivar available_capacity: Unutilized capacity of the dedicated host.
    :vartype available_capacity: ~azure.mgmt.compute.models.DedicatedHostAvailableCapacity
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar name: The name of the dedicated host.
    :vartype name: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the dedicated host."""

    @overload
    def __init__(
        self,
        *,
        available_capacity: Optional["_models.DedicatedHostAvailableCapacity"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 DedicatedHostProperties(_Model):
    """Properties of the dedicated host.

    :ivar platform_fault_domain: Fault domain of the dedicated host within a dedicated host group.
    :vartype platform_fault_domain: int
    :ivar auto_replace_on_failure: Specifies whether the dedicated host should be replaced
     automatically in case of a failure. The value is defaulted to 'true' when not provided.
    :vartype auto_replace_on_failure: bool
    :ivar host_id: A unique id generated and assigned to the dedicated host by the platform. Does
     not change throughout the lifetime of the host.
    :vartype host_id: str
    :ivar virtual_machines: A list of references to all virtual machines in the Dedicated Host.
    :vartype virtual_machines: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar license_type: Specifies the software license type that will be applied to the VMs
     deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,**
     **Windows_Server_Perpetual.** The default value is: **None.**. Known values are: "None",
     "Windows_Server_Hybrid", and "Windows_Server_Perpetual".
    :vartype license_type: str or ~azure.mgmt.compute.models.DedicatedHostLicenseTypes
    :ivar provisioning_time: The date when the host was first provisioned.
    :vartype provisioning_time: ~datetime.datetime
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar instance_view: The dedicated host instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.DedicatedHostInstanceView
    :ivar time_created: Specifies the time at which the Dedicated Host resource was created.
     Minimum api-version: 2021-11-01.
    :vartype time_created: ~datetime.datetime
    """

    platform_fault_domain: Optional[int] = rest_field(
        name="platformFaultDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """Fault domain of the dedicated host within a dedicated host group."""
    auto_replace_on_failure: Optional[bool] = rest_field(
        name="autoReplaceOnFailure", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the dedicated host should be replaced automatically in case of a failure. The
     value is defaulted to 'true' when not provided."""
    host_id: Optional[str] = rest_field(name="hostId", visibility=["read"])
    """A unique id generated and assigned to the dedicated host by the platform. Does not change
     throughout the lifetime of the host."""
    virtual_machines: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="virtualMachines", visibility=["read"]
    )
    """A list of references to all virtual machines in the Dedicated Host."""
    license_type: Optional[Union[str, "_models.DedicatedHostLicenseTypes"]] = rest_field(
        name="licenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the software license type that will be applied to the VMs deployed on the dedicated
     host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.**
     The default value is: **None.**. Known values are: \"None\", \"Windows_Server_Hybrid\", and
     \"Windows_Server_Perpetual\"."""
    provisioning_time: Optional[datetime.datetime] = rest_field(
        name="provisioningTime", visibility=["read"], format="rfc3339"
    )
    """The date when the host was first provisioned."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    instance_view: Optional["_models.DedicatedHostInstanceView"] = rest_field(name="instanceView", visibility=["read"])
    """The dedicated host instance view."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Dedicated Host resource was created. Minimum api-version:
     2021-11-01."""

    @overload
    def __init__(
        self,
        *,
        platform_fault_domain: Optional[int] = None,
        auto_replace_on_failure: Optional[bool] = None,
        license_type: Optional[Union[str, "_models.DedicatedHostLicenseTypes"]] = 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 DedicatedHostUpdate(UpdateResource):
    """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType
    may be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Properties of the dedicated host.
    :vartype properties: ~azure.mgmt.compute.models.DedicatedHostProperties
    :ivar sku: [List all available dedicated host sizes for resizing]
     (`https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes
     <https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes>`_). Resizing
     can be only used to scale up DedicatedHost. Only name is required to be set.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    properties: Optional["_models.DedicatedHostProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the dedicated host."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """[List all available dedicated host sizes for resizing]
     (`https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes
     <https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes>`_). Resizing
     can be only used to scale up DedicatedHost. Only name is required to be set."""

    __flattened_items = [
        "platform_fault_domain",
        "auto_replace_on_failure",
        "host_id",
        "virtual_machines",
        "license_type",
        "provisioning_time",
        "provisioning_state",
        "instance_view",
        "time_created",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DedicatedHostProperties"] = None,
        sku: Optional["_models.Sku"] = 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 DefaultVirtualMachineScaleSetInfo(_Model):
    """Indicates the target Virtual Machine ScaleSet properties upon triggering a seamless migration
    without downtime of the VMs via the ConvertToVirtualMachineScaleSet API.

    :ivar constrained_maximum_capacity: Indicates if the the maximum capacity of the default
     migrated Virtual Machine Scale Set after its migration will be constrained to a limited number
     of VMs.
    :vartype constrained_maximum_capacity: bool
    :ivar default_virtual_machine_scale_set: The default Virtual Machine ScaleSet Uri that the
     Availability Set will be moved to upon triggering a seamless migration via the
     ConvertToVirtualMachineScaleSet API.
    :vartype default_virtual_machine_scale_set: ~azure.mgmt.compute.models.SubResource
    """

    constrained_maximum_capacity: Optional[bool] = rest_field(name="constrainedMaximumCapacity", visibility=["read"])
    """Indicates if the the maximum capacity of the default migrated Virtual Machine Scale Set after
     its migration will be constrained to a limited number of VMs."""
    default_virtual_machine_scale_set: Optional["_models.SubResource"] = rest_field(
        name="defaultVirtualMachineScaleSet", visibility=["read"]
    )
    """The default Virtual Machine ScaleSet Uri that the Availability Set will be moved to upon
     triggering a seamless migration via the ConvertToVirtualMachineScaleSet API."""


class DiagnosticsProfile(_Model):
    """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

    :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view
     Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified
     then ensure that the storage account is in the same region and subscription as the VM. You can
     easily view the output of your console log. Azure also enables you to see a screenshot of the
     VM from the hypervisor.
    :vartype boot_diagnostics: ~azure.mgmt.compute.models.BootDiagnostics
    """

    boot_diagnostics: Optional["_models.BootDiagnostics"] = rest_field(
        name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
     to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage
     account is in the same region and subscription as the VM. You can easily view the output of
     your console log. Azure also enables you to see a screenshot of the VM from the hypervisor."""

    @overload
    def __init__(
        self,
        *,
        boot_diagnostics: Optional["_models.BootDiagnostics"] = 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 DiffDiskSettings(_Model):
    """Describes the parameters of ephemeral disk settings that can be specified for operating system
    disk. **Note:** The ephemeral disk settings can only be specified for managed disk.

    :ivar option: Specifies the ephemeral disk settings for operating system disk. "Local"
    :vartype option: str or ~azure.mgmt.compute.models.DiffDiskOptions
    :ivar placement: Specifies the ephemeral disk placement for operating system disk. Possible
     values are: **CacheDisk,** **ResourceDisk,** **NvmeDisk.** The defaulting behavior is:
     **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** or **NvmeDisk**
     is used. Refer to the VM size documentation for Windows VM at
     `https://docs.microsoft.com/azure/virtual-machines/windows/sizes
     <https://docs.microsoft.com/azure/virtual-machines/windows/sizes>`_ and Linux VM at
     `https://docs.microsoft.com/azure/virtual-machines/linux/sizes
     <https://docs.microsoft.com/azure/virtual-machines/linux/sizes>`_ to check which VM sizes
     exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01. Known values are:
     "CacheDisk", "ResourceDisk", and "NvmeDisk".
    :vartype placement: str or ~azure.mgmt.compute.models.DiffDiskPlacement
    :ivar enable_full_caching: Specifies whether or not to enable full caching for this VM which
     will cache the OS disk locally on the host and make this VM more resilient to storage outages.
    :vartype enable_full_caching: bool
    """

    option: Optional[Union[str, "_models.DiffDiskOptions"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the ephemeral disk settings for operating system disk. \"Local\""""
    placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the ephemeral disk placement for operating system disk. Possible values are:
     **CacheDisk,** **ResourceDisk,** **NvmeDisk.** The defaulting behavior is: **CacheDisk** if one
     is configured for the VM size otherwise **ResourceDisk** or **NvmeDisk** is used. Refer to the
     VM size documentation for Windows VM at
     `https://docs.microsoft.com/azure/virtual-machines/windows/sizes
     <https://docs.microsoft.com/azure/virtual-machines/windows/sizes>`_ and Linux VM at
     `https://docs.microsoft.com/azure/virtual-machines/linux/sizes
     <https://docs.microsoft.com/azure/virtual-machines/linux/sizes>`_ to check which VM sizes
     exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01. Known values are:
     \"CacheDisk\", \"ResourceDisk\", and \"NvmeDisk\"."""
    enable_full_caching: Optional[bool] = rest_field(
        name="enableFullCaching", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether or not to enable full caching for this VM which will cache the OS disk
     locally on the host and make this VM more resilient to storage outages."""

    @overload
    def __init__(
        self,
        *,
        option: Optional[Union[str, "_models.DiffDiskOptions"]] = None,
        placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = None,
        enable_full_caching: 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 Disallowed(_Model):
    """Describes the disallowed disk types.

    :ivar disk_types: A list of disk types.
    :vartype disk_types: list[str]
    """

    disk_types: Optional[list[str]] = rest_field(
        name="diskTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of disk types."""

    @overload
    def __init__(
        self,
        *,
        disk_types: 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 DisallowedConfiguration(_Model):
    """Specifies the disallowed configuration for a virtual machine image.

    :ivar vm_disk_type: VM disk types which are disallowed. Known values are: "None" and
     "Unmanaged".
    :vartype vm_disk_type: str or ~azure.mgmt.compute.models.VmDiskTypes
    """

    vm_disk_type: Optional[Union[str, "_models.VmDiskTypes"]] = rest_field(
        name="vmDiskType", visibility=["read", "create", "update", "delete", "query"]
    )
    """VM disk types which are disallowed. Known values are: \"None\" and \"Unmanaged\"."""

    @overload
    def __init__(
        self,
        *,
        vm_disk_type: Optional[Union[str, "_models.VmDiskTypes"]] = 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 Disk(TrackedResource):
    """Disk 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.compute.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: Disk resource properties.
    :vartype properties: ~azure.mgmt.compute.models.DiskProperties
    :ivar managed_by: A relative URI containing the ID of the VM that has the disk attached.
    :vartype managed_by: str
    :ivar managed_by_extended: List of relative URIs containing the IDs of the VMs that have the
     disk attached. maxShares should be set to a value greater than one for disks to allow attaching
     them to multiple VMs.
    :vartype managed_by_extended: list[str]
    :ivar sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
     Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
    :vartype sku: ~azure.mgmt.compute.models.DiskSku
    :ivar zones: The Logical zone list for Disk.
    :vartype zones: list[str]
    :ivar extended_location: The extended location where the disk will be created. Extended
     location cannot be changed.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    """

    properties: Optional["_models.DiskProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk resource properties."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read"])
    """A relative URI containing the ID of the VM that has the disk attached."""
    managed_by_extended: Optional[list[str]] = rest_field(name="managedByExtended", visibility=["read"])
    """List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares
     should be set to a value greater than one for disks to allow attaching them to multiple VMs."""
    sku: Optional["_models.DiskSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
     Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Logical zone list for Disk."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location where the disk will be created. Extended location cannot be changed."""

    __flattened_items = [
        "time_created",
        "os_type",
        "hyper_v_generation",
        "purchase_plan",
        "supported_capabilities",
        "creation_data",
        "disk_size_gb",
        "disk_size_bytes",
        "unique_id",
        "encryption_settings_collection",
        "provisioning_state",
        "disk_iops_read_write",
        "disk_m_bps_read_write",
        "disk_iops_read_only",
        "disk_m_bps_read_only",
        "disk_state",
        "encryption",
        "max_shares",
        "share_info",
        "network_access_policy",
        "disk_access_id",
        "bursting_enabled_time",
        "tier",
        "bursting_enabled",
        "property_updates_in_progress",
        "supports_hibernation",
        "security_profile",
        "completion_percent",
        "public_network_access",
        "data_access_auth_mode",
        "optimized_for_frequent_attach",
        "last_ownership_update_time",
        "availability_policy",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DiskProperties"] = None,
        sku: Optional["_models.DiskSku"] = None,
        zones: Optional[list[str]] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 DiskAccess(TrackedResource):
    """disk access 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.compute.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:
    :vartype properties: ~azure.mgmt.compute.models.DiskAccessProperties
    :ivar extended_location: The extended location where the disk access will be created. Extended
     location cannot be changed.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    """

    properties: Optional["_models.DiskAccessProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location where the disk access will be created. Extended location cannot be
     changed."""

    __flattened_items = ["private_endpoint_connections", "provisioning_state", "time_created"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DiskAccessProperties"] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 DiskAccessProperties(_Model):
    """DiskAccessProperties.

    :ivar private_endpoint_connections: A readonly collection of private endpoint connections
     created on the disk. Currently only one endpoint connection is supported.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.compute.models.PrivateEndpointConnection]
    :ivar provisioning_state: The disk access resource provisioning state.
    :vartype provisioning_state: str
    :ivar time_created: The time when the disk access was created.
    :vartype time_created: ~datetime.datetime
    """

    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """A readonly collection of private endpoint connections created on the disk. Currently only one
     endpoint connection is supported."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The disk access resource provisioning state."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """The time when the disk access was created."""


class DiskAccessUpdate(_Model):
    """Used for updating a disk access resource.

    :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 DiskEncryptionSet(TrackedResource):
    """disk encryption set 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.compute.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:
    :vartype properties: ~azure.mgmt.compute.models.EncryptionSetProperties
    :ivar identity: The managed identity for the disk encryption set. It should be given permission
     on the key vault before it can be used to encrypt disks.
    :vartype identity: ~azure.mgmt.compute.models.EncryptionSetIdentity
    """

    properties: Optional["_models.EncryptionSetProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    identity: Optional["_models.EncryptionSetIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed identity for the disk encryption set. It should be given permission on the key
     vault before it can be used to encrypt disks."""

    __flattened_items = [
        "encryption_type",
        "active_key",
        "previous_keys",
        "provisioning_state",
        "rotation_to_latest_key_version_enabled",
        "last_key_rotation_timestamp",
        "auto_key_rotation_error",
        "federated_client_id",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.EncryptionSetProperties"] = None,
        identity: Optional["_models.EncryptionSetIdentity"] = 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 SubResource(_Model):
    """SubResource.

    :ivar id: Resource Id.
    :vartype id: str
    """

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

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 DiskEncryptionSetParameters(SubResource):
    """Describes the parameter of customer managed disk encryption set resource id that can be
    specified for disk. **Note:** The disk encryption set resource id can only be specified for
    managed disk. Please refer `https://aka.ms/mdssewithcmkoverview
    <https://aka.ms/mdssewithcmkoverview>`_ for more details.

    :ivar id: Resource Id.
    :vartype id: str
    """

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 DiskEncryptionSettings(_Model):
    """Describes a Encryption Settings for a Disk.

    :ivar disk_encryption_key: Specifies the location of the disk encryption key, which is a Key
     Vault Secret.
    :vartype disk_encryption_key: ~azure.mgmt.compute.models.KeyVaultSecretReference
    :ivar key_encryption_key: Specifies the location of the key encryption key in Key Vault.
    :vartype key_encryption_key: ~azure.mgmt.compute.models.KeyVaultKeyReference
    :ivar enabled: Specifies whether disk encryption should be enabled on the virtual machine.
    :vartype enabled: bool
    """

    disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = rest_field(
        name="diskEncryptionKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the location of the disk encryption key, which is a Key Vault Secret."""
    key_encryption_key: Optional["_models.KeyVaultKeyReference"] = rest_field(
        name="keyEncryptionKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the location of the key encryption key in Key Vault."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether disk encryption should be enabled on the virtual machine."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = None,
        key_encryption_key: Optional["_models.KeyVaultKeyReference"] = None,
        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 DiskEncryptionSetUpdate(_Model):
    """disk encryption set update resource.

    :ivar properties: disk encryption set resource update properties.
    :vartype properties: ~azure.mgmt.compute.models.DiskEncryptionSetUpdateProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar identity: The managed identity for the disk encryption set. It should be given permission
     on the key vault before it can be used to encrypt disks.
    :vartype identity: ~azure.mgmt.compute.models.EncryptionSetIdentity
    """

    properties: Optional["_models.DiskEncryptionSetUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """disk encryption set resource update properties."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    identity: Optional["_models.EncryptionSetIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed identity for the disk encryption set. It should be given permission on the key
     vault before it can be used to encrypt disks."""

    __flattened_items = [
        "encryption_type",
        "active_key",
        "rotation_to_latest_key_version_enabled",
        "federated_client_id",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.DiskEncryptionSetUpdateProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        identity: Optional["_models.EncryptionSetIdentity"] = 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 DiskEncryptionSetUpdateProperties(_Model):
    """disk encryption set resource update properties.

    :ivar encryption_type: The type of key used to encrypt the data of the disk. Known values are:
     "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys", and
     "ConfidentialVmEncryptedWithCustomerKey".
    :vartype encryption_type: str or ~azure.mgmt.compute.models.DiskEncryptionSetType
    :ivar active_key: Key Vault Key Url to be used for server side encryption of Managed Disks and
     Snapshots.
    :vartype active_key: ~azure.mgmt.compute.models.KeyForDiskEncryptionSet
    :ivar rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of
     this disk encryption set to the latest key version.
    :vartype rotation_to_latest_key_version_enabled: bool
    :ivar federated_client_id: Multi-tenant application client id to access key vault in a
     different tenant. Setting the value to 'None' will clear the property.
    :vartype federated_client_id: str
    """

    encryption_type: Optional[Union[str, "_models.DiskEncryptionSetType"]] = rest_field(
        name="encryptionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of key used to encrypt the data of the disk. Known values are:
     \"EncryptionAtRestWithCustomerKey\", \"EncryptionAtRestWithPlatformAndCustomerKeys\", and
     \"ConfidentialVmEncryptedWithCustomerKey\"."""
    active_key: Optional["_models.KeyForDiskEncryptionSet"] = rest_field(
        name="activeKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots."""
    rotation_to_latest_key_version_enabled: Optional[bool] = rest_field(
        name="rotationToLatestKeyVersionEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set this flag to true to enable auto-updating of this disk encryption set to the latest key
     version."""
    federated_client_id: Optional[str] = rest_field(
        name="federatedClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Multi-tenant application client id to access key vault in a different tenant. Setting the value
     to 'None' will clear the property."""

    @overload
    def __init__(
        self,
        *,
        encryption_type: Optional[Union[str, "_models.DiskEncryptionSetType"]] = None,
        active_key: Optional["_models.KeyForDiskEncryptionSet"] = None,
        rotation_to_latest_key_version_enabled: Optional[bool] = None,
        federated_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 DiskInstanceView(_Model):
    """The instance view of the disk.

    :ivar name: The disk name.
    :vartype name: str
    :ivar encryption_settings: Specifies the encryption settings for the OS Disk. <br><br> Minimum
     api-version: 2015-06-15.
    :vartype encryption_settings: list[~azure.mgmt.compute.models.DiskEncryptionSettings]
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar storage_alignment_status: Specifies the storage alignment status for the disk. Known
     values are: "Unaligned" and "Aligned".
    :vartype storage_alignment_status: str or ~azure.mgmt.compute.models.StorageAlignmentStatus
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disk name."""
    encryption_settings: Optional[list["_models.DiskEncryptionSettings"]] = rest_field(
        name="encryptionSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    storage_alignment_status: Optional[Union[str, "_models.StorageAlignmentStatus"]] = rest_field(
        name="storageAlignmentStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage alignment status for the disk. Known values are: \"Unaligned\" and
     \"Aligned\"."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        encryption_settings: Optional[list["_models.DiskEncryptionSettings"]] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = None,
        storage_alignment_status: Optional[Union[str, "_models.StorageAlignmentStatus"]] = 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 DiskProperties(_Model):
    """Disk resource properties.

    :ivar time_created: The time when the disk was created.
    :vartype time_created: ~datetime.datetime
    :ivar os_type: The Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar purchase_plan: Purchase plan information for the the image from which the OS disk was
     created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product:
     WindowsServer}.
    :vartype purchase_plan: ~azure.mgmt.compute.models.DiskPurchasePlan
    :ivar supported_capabilities: List of supported capabilities for the image from which the OS
     disk was created.
    :vartype supported_capabilities: ~azure.mgmt.compute.models.SupportedCapabilities
    :ivar creation_data: Disk source information. CreationData information cannot be changed after
     the disk has been created. Required.
    :vartype creation_data: ~azure.mgmt.compute.models.CreationData
    :ivar disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
     indicates the size of the disk to create. If this field is present for updates or creation with
     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
     running VM, and can only increase the disk's size.
    :vartype disk_size_gb: int
    :ivar disk_size_bytes: The size of the disk in bytes. This field is read only.
    :vartype disk_size_bytes: int
    :ivar unique_id: Unique Guid identifying the resource.
    :vartype unique_id: str
    :ivar encryption_settings_collection: Encryption settings collection used for Azure Disk
     Encryption, can contain multiple encryption settings per disk or snapshot.
    :vartype encryption_settings_collection:
     ~azure.mgmt.compute.models.EncryptionSettingsCollection
    :ivar provisioning_state: The disk provisioning state.
    :vartype provisioning_state: str
    :ivar disk_iops_read_write: The number of IOPS allowed for this disk; only settable for
     UltraSSD disks. One operation can transfer between 4k and 256k bytes.
    :vartype disk_iops_read_write: int
    :ivar disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD
     disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
     10.
    :vartype disk_m_bps_read_write: int
    :ivar disk_iops_read_only: The total number of IOPS that will be allowed across all VMs
     mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
    :vartype disk_iops_read_only: int
    :ivar disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs
     mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses
     the ISO notation, of powers of 10.
    :vartype disk_m_bps_read_only: int
    :ivar disk_state: The state of the disk. Known values are: "Unattached", "Attached",
     "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", and "ActiveUpload".
    :vartype disk_state: str or ~azure.mgmt.compute.models.DiskState
    :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed
     keys or platform managed keys.
    :vartype encryption: ~azure.mgmt.compute.models.Encryption
    :ivar max_shares: The maximum number of VMs that can attach to the disk at the same time. Value
     greater than one indicates a disk that can be mounted on multiple VMs at the same time.
    :vartype max_shares: int
    :ivar share_info: Details of the list of all VMs that have the disk attached. maxShares should
     be set to a value greater than one for disks to allow attaching them to multiple VMs.
    :vartype share_info: list[~azure.mgmt.compute.models.ShareInfoElement]
    :ivar network_access_policy: Policy for accessing the disk via network. Known values are:
     "AllowAll", "AllowPrivate", and "DenyAll".
    :vartype network_access_policy: str or ~azure.mgmt.compute.models.NetworkAccessPolicy
    :ivar disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
    :vartype disk_access_id: str
    :ivar bursting_enabled_time: Latest time when bursting was last enabled on a disk.
    :vartype bursting_enabled_time: ~datetime.datetime
    :ivar tier: Performance tier of the disk (e.g, P4, S10) as described here:
     `https://azure.microsoft.com/en-us/pricing/details/managed-disks/
     <https://azure.microsoft.com/en-us/pricing/details/managed-disks/>`_. Does not apply to Ultra
     disks.
    :vartype tier: str
    :ivar bursting_enabled: Set to true to enable bursting beyond the provisioned performance
     target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
    :vartype bursting_enabled: bool
    :ivar property_updates_in_progress: Properties of the disk for which update is pending.
    :vartype property_updates_in_progress: ~azure.mgmt.compute.models.PropertyUpdatesInProgress
    :ivar supports_hibernation: Indicates the OS on a disk supports hibernation.
    :vartype supports_hibernation: bool
    :ivar security_profile: Contains the security related information for the resource.
    :vartype security_profile: ~azure.mgmt.compute.models.DiskSecurityProfile
    :ivar completion_percent: Percentage complete for the background copy when a resource is
     created via the CopyStart operation.
    :vartype completion_percent: float
    :ivar public_network_access: Policy for controlling export on the disk. Known values are:
     "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.compute.models.PublicNetworkAccess
    :ivar data_access_auth_mode: Additional authentication requirements when exporting or uploading
     to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None".
    :vartype data_access_auth_mode: str or ~azure.mgmt.compute.models.DataAccessAuthMode
    :ivar optimized_for_frequent_attach: Setting this property to true improves reliability and
     performance of data disks that are frequently (more than 5 times a day) by detached from one
     virtual machine and attached to another. This property should not be set for disks that are not
     detached and attached frequently as it causes the disks to not align with the fault domain of
     the virtual machine.
    :vartype optimized_for_frequent_attach: bool
    :ivar last_ownership_update_time: The UTC time when the ownership state of the disk was last
     changed i.e., the time the disk was last attached or detached from a VM or the time when the VM
     to which the disk was attached was deallocated or started.
    :vartype last_ownership_update_time: ~datetime.datetime
    :ivar availability_policy: Determines how platform treats disk failures.
    :vartype availability_policy: ~azure.mgmt.compute.models.AvailabilityPolicy
    """

    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """The time when the disk was created."""
    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    purchase_plan: Optional["_models.DiskPurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Purchase plan information for the the image from which the OS disk was created. E.g. - {name:
     2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}."""
    supported_capabilities: Optional["_models.SupportedCapabilities"] = rest_field(
        name="supportedCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of supported capabilities for the image from which the OS disk was created."""
    creation_data: "_models.CreationData" = rest_field(
        name="creationData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk source information. CreationData information cannot be changed after the disk has been
     created. Required."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """If creationData.createOption is Empty, this field is mandatory and it indicates the size of the
     disk to create. If this field is present for updates or creation with other options, it
     indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and
     can only increase the disk's size."""
    disk_size_bytes: Optional[int] = rest_field(name="diskSizeBytes", visibility=["read"])
    """The size of the disk in bytes. This field is read only."""
    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read"])
    """Unique Guid identifying the resource."""
    encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = rest_field(
        name="encryptionSettingsCollection", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption
     settings per disk or snapshot."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The disk provisioning state."""
    disk_iops_read_write: Optional[int] = rest_field(
        name="diskIOPSReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can
     transfer between 4k and 256k bytes."""
    disk_m_bps_read_write: Optional[int] = rest_field(
        name="diskMBpsReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of
     bytes per second - MB here uses the ISO notation, of powers of 10."""
    disk_iops_read_only: Optional[int] = rest_field(
        name="diskIOPSReadOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total number of IOPS that will be allowed across all VMs mounting the shared disk as
     ReadOnly. One operation can transfer between 4k and 256k bytes."""
    disk_m_bps_read_only: Optional[int] = rest_field(
        name="diskMBpsReadOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as
     ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
     10."""
    disk_state: Optional[Union[str, "_models.DiskState"]] = rest_field(name="diskState", visibility=["read"])
    """The state of the disk. Known values are: \"Unattached\", \"Attached\", \"Reserved\",
     \"Frozen\", \"ActiveSAS\", \"ActiveSASFrozen\", \"ReadyToUpload\", and \"ActiveUpload\"."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Encryption property can be used to encrypt data at rest with customer managed keys or platform
     managed keys."""
    max_shares: Optional[int] = rest_field(name="maxShares", visibility=["read", "create", "update", "delete", "query"])
    """The maximum number of VMs that can attach to the disk at the same time. Value greater than one
     indicates a disk that can be mounted on multiple VMs at the same time."""
    share_info: Optional[list["_models.ShareInfoElement"]] = rest_field(name="shareInfo", visibility=["read"])
    """Details of the list of all VMs that have the disk attached. maxShares should be set to a value
     greater than one for disks to allow attaching them to multiple VMs."""
    network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = rest_field(
        name="networkAccessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for accessing the disk via network. Known values are: \"AllowAll\", \"AllowPrivate\",
     and \"DenyAll\"."""
    disk_access_id: Optional[str] = rest_field(
        name="diskAccessId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM id of the DiskAccess resource for using private endpoints on disks."""
    bursting_enabled_time: Optional[datetime.datetime] = rest_field(
        name="burstingEnabledTime", visibility=["read"], format="rfc3339"
    )
    """Latest time when bursting was last enabled on a disk."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Performance tier of the disk (e.g, P4, S10) as described here:
     `https://azure.microsoft.com/en-us/pricing/details/managed-disks/
     <https://azure.microsoft.com/en-us/pricing/details/managed-disks/>`_. Does not apply to Ultra
     disks."""
    bursting_enabled: Optional[bool] = rest_field(
        name="burstingEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting
     is disabled by default. Does not apply to Ultra disks."""
    property_updates_in_progress: Optional["_models.PropertyUpdatesInProgress"] = rest_field(
        name="propertyUpdatesInProgress", visibility=["read"]
    )
    """Properties of the disk for which update is pending."""
    supports_hibernation: Optional[bool] = rest_field(
        name="supportsHibernation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the OS on a disk supports hibernation."""
    security_profile: Optional["_models.DiskSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the security related information for the resource."""
    completion_percent: Optional[float] = rest_field(
        name="completionPercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Percentage complete for the background copy when a resource is created via the CopyStart
     operation."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for controlling export on the disk. Known values are: \"Enabled\" and \"Disabled\"."""
    data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = rest_field(
        name="dataAccessAuthMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional authentication requirements when exporting or uploading to a disk or snapshot. Known
     values are: \"AzureActiveDirectory\" and \"None\"."""
    optimized_for_frequent_attach: Optional[bool] = rest_field(
        name="optimizedForFrequentAttach", visibility=["read", "create", "update", "delete", "query"]
    )
    """Setting this property to true improves reliability and performance of data disks that are
     frequently (more than 5 times a day) by detached from one virtual machine and attached to
     another. This property should not be set for disks that are not detached and attached
     frequently as it causes the disks to not align with the fault domain of the virtual machine."""
    last_ownership_update_time: Optional[datetime.datetime] = rest_field(
        name="LastOwnershipUpdateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC time when the ownership state of the disk was last changed i.e., the time the disk was
     last attached or detached from a VM or the time when the VM to which the disk was attached was
     deallocated or started."""
    availability_policy: Optional["_models.AvailabilityPolicy"] = rest_field(
        name="availabilityPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Determines how platform treats disk failures."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        creation_data: "_models.CreationData",
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        purchase_plan: Optional["_models.DiskPurchasePlan"] = None,
        supported_capabilities: Optional["_models.SupportedCapabilities"] = None,
        disk_size_gb: Optional[int] = None,
        encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = None,
        disk_iops_read_write: Optional[int] = None,
        disk_m_bps_read_write: Optional[int] = None,
        disk_iops_read_only: Optional[int] = None,
        disk_m_bps_read_only: Optional[int] = None,
        encryption: Optional["_models.Encryption"] = None,
        max_shares: Optional[int] = None,
        network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = None,
        disk_access_id: Optional[str] = None,
        tier: Optional[str] = None,
        bursting_enabled: Optional[bool] = None,
        supports_hibernation: Optional[bool] = None,
        security_profile: Optional["_models.DiskSecurityProfile"] = None,
        completion_percent: Optional[float] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = None,
        optimized_for_frequent_attach: Optional[bool] = None,
        availability_policy: Optional["_models.AvailabilityPolicy"] = 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 DiskPurchasePlan(_Model):
    """Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

    :ivar name: The plan ID. Required.
    :vartype name: str
    :ivar publisher: The publisher ID. Required.
    :vartype publisher: str
    :ivar product: Specifies the product of the image from the marketplace. This is the same value
     as Offer under the imageReference element. Required.
    :vartype product: str
    :ivar promotion_code: The Offer Promotion Code.
    :vartype promotion_code: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan ID. Required."""
    publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publisher ID. Required."""
    product: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the product of the image from the marketplace. This is the same value as Offer under
     the imageReference element. Required."""
    promotion_code: Optional[str] = rest_field(
        name="promotionCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Offer Promotion Code."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        publisher: str,
        product: str,
        promotion_code: 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 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.compute.models.SystemData
    """


class DiskRestorePoint(ProxyResource):
    """Properties of disk restore point.

    :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.compute.models.SystemData
    :ivar properties: Properties of an incremental disk restore point.
    :vartype properties: ~azure.mgmt.compute.models.DiskRestorePointProperties
    """

    properties: Optional["_models.DiskRestorePointProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of an incremental disk restore point."""

    __flattened_items = [
        "time_created",
        "source_resource_id",
        "os_type",
        "hyper_v_generation",
        "purchase_plan",
        "supported_capabilities",
        "family_id",
        "source_unique_id",
        "encryption",
        "supports_hibernation",
        "network_access_policy",
        "public_network_access",
        "disk_access_id",
        "completion_percent",
        "replication_state",
        "source_resource_location",
        "security_profile",
        "logical_sector_size",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.DiskRestorePointProperties"] = 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 SubResourceReadOnly(_Model):
    """SubResourceReadOnly.

    :ivar id: Resource Id.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Resource Id."""


class DiskRestorePointAttributes(SubResourceReadOnly):
    """Disk Restore Point details.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar encryption: Encryption at rest settings for disk restore point. It is an optional
     property that can be specified in the input while creating a restore point.
    :vartype encryption: ~azure.mgmt.compute.models.RestorePointEncryption
    :ivar source_disk_restore_point: Resource Id of the source disk restore point.
    :vartype source_disk_restore_point: ~azure.mgmt.compute.models.ApiEntityReference
    """

    encryption: Optional["_models.RestorePointEncryption"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption at rest settings for disk restore point. It is an optional property that can be
     specified in the input while creating a restore point."""
    source_disk_restore_point: Optional["_models.ApiEntityReference"] = rest_field(
        name="sourceDiskRestorePoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Id of the source disk restore point."""

    @overload
    def __init__(
        self,
        *,
        encryption: Optional["_models.RestorePointEncryption"] = None,
        source_disk_restore_point: Optional["_models.ApiEntityReference"] = 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 DiskRestorePointInstanceView(_Model):
    """The instance view of a disk restore point.

    :ivar id: Disk restore point Id.
    :vartype id: str
    :ivar snapshot_access_state: The state of snapshot which determines the access availability of
     the snapshot. Known values are: "Unknown", "Pending", "Available", "InstantAccess", and
     "AvailableWithInstantAccess".
    :vartype snapshot_access_state: str or ~azure.mgmt.compute.models.SnapshotAccessState
    :ivar replication_status: The disk restore point replication status information.
    :vartype replication_status: ~azure.mgmt.compute.models.DiskRestorePointReplicationStatus
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Disk restore point Id."""
    snapshot_access_state: Optional[Union[str, "_models.SnapshotAccessState"]] = rest_field(
        name="snapshotAccessState", visibility=["read", "create", "update", "delete", "query"]
    )
    """The state of snapshot which determines the access availability of the snapshot. Known values
     are: \"Unknown\", \"Pending\", \"Available\", \"InstantAccess\", and
     \"AvailableWithInstantAccess\"."""
    replication_status: Optional["_models.DiskRestorePointReplicationStatus"] = rest_field(
        name="replicationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The disk restore point replication status information."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        snapshot_access_state: Optional[Union[str, "_models.SnapshotAccessState"]] = None,
        replication_status: Optional["_models.DiskRestorePointReplicationStatus"] = 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 DiskRestorePointProperties(_Model):
    """Properties of an incremental disk restore point.

    :ivar time_created: The timestamp of restorePoint creation.
    :vartype time_created: ~datetime.datetime
    :ivar source_resource_id: arm id of source disk or source disk restore point.
    :vartype source_resource_id: str
    :ivar os_type: The Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar purchase_plan: Purchase plan information for the the image from which the OS disk was
     created.
    :vartype purchase_plan: ~azure.mgmt.compute.models.DiskPurchasePlan
    :ivar supported_capabilities: List of supported capabilities for the image from which the OS
     disk was created.
    :vartype supported_capabilities: ~azure.mgmt.compute.models.SupportedCapabilities
    :ivar family_id: id of the backing snapshot's MIS family.
    :vartype family_id: str
    :ivar source_unique_id: unique incarnation id of the source disk.
    :vartype source_unique_id: str
    :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed
     keys or platform managed keys.
    :vartype encryption: ~azure.mgmt.compute.models.Encryption
    :ivar supports_hibernation: Indicates the OS on a disk supports hibernation.
    :vartype supports_hibernation: bool
    :ivar network_access_policy: Policy for accessing the disk via network. Known values are:
     "AllowAll", "AllowPrivate", and "DenyAll".
    :vartype network_access_policy: str or ~azure.mgmt.compute.models.NetworkAccessPolicy
    :ivar public_network_access: Policy for controlling export on the disk. Known values are:
     "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.compute.models.PublicNetworkAccess
    :ivar disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
    :vartype disk_access_id: str
    :ivar completion_percent: Percentage complete for the background copy of disk restore point
     when source resource is from a different region.
    :vartype completion_percent: float
    :ivar replication_state: Replication state of disk restore point when source resource is from a
     different region.
    :vartype replication_state: str
    :ivar source_resource_location: Location of source disk or source disk restore point when
     source resource is from a different region.
    :vartype source_resource_location: str
    :ivar security_profile: Contains the security related information for the resource.
    :vartype security_profile: ~azure.mgmt.compute.models.DiskSecurityProfile
    :ivar logical_sector_size: Logical sector size in bytes for disk restore points of UltraSSD_LRS
     and PremiumV2_LRS disks. Supported values are 512 and 4096. 4096 is the default.
    :vartype logical_sector_size: int
    """

    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """The timestamp of restorePoint creation."""
    source_resource_id: Optional[str] = rest_field(name="sourceResourceId", visibility=["read"])
    """arm id of source disk or source disk restore point."""
    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(name="osType", visibility=["read"])
    """The Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    purchase_plan: Optional["_models.DiskPurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Purchase plan information for the the image from which the OS disk was created."""
    supported_capabilities: Optional["_models.SupportedCapabilities"] = rest_field(
        name="supportedCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of supported capabilities for the image from which the OS disk was created."""
    family_id: Optional[str] = rest_field(name="familyId", visibility=["read"])
    """id of the backing snapshot's MIS family."""
    source_unique_id: Optional[str] = rest_field(name="sourceUniqueId", visibility=["read"])
    """unique incarnation id of the source disk."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read"])
    """Encryption property can be used to encrypt data at rest with customer managed keys or platform
     managed keys."""
    supports_hibernation: Optional[bool] = rest_field(
        name="supportsHibernation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the OS on a disk supports hibernation."""
    network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = rest_field(
        name="networkAccessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for accessing the disk via network. Known values are: \"AllowAll\", \"AllowPrivate\",
     and \"DenyAll\"."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for controlling export on the disk. Known values are: \"Enabled\" and \"Disabled\"."""
    disk_access_id: Optional[str] = rest_field(
        name="diskAccessId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM id of the DiskAccess resource for using private endpoints on disks."""
    completion_percent: Optional[float] = rest_field(
        name="completionPercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Percentage complete for the background copy of disk restore point when source resource is from
     a different region."""
    replication_state: Optional[str] = rest_field(name="replicationState", visibility=["read"])
    """Replication state of disk restore point when source resource is from a different region."""
    source_resource_location: Optional[str] = rest_field(name="sourceResourceLocation", visibility=["read"])
    """Location of source disk or source disk restore point when source resource is from a different
     region."""
    security_profile: Optional["_models.DiskSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the security related information for the resource."""
    logical_sector_size: Optional[int] = rest_field(name="logicalSectorSize", visibility=["read"])
    """Logical sector size in bytes for disk restore points of UltraSSD_LRS and PremiumV2_LRS disks.
     Supported values are 512 and 4096. 4096 is the default."""

    @overload
    def __init__(
        self,
        *,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        purchase_plan: Optional["_models.DiskPurchasePlan"] = None,
        supported_capabilities: Optional["_models.SupportedCapabilities"] = None,
        supports_hibernation: Optional[bool] = None,
        network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        disk_access_id: Optional[str] = None,
        completion_percent: Optional[float] = None,
        security_profile: Optional["_models.DiskSecurityProfile"] = 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 DiskRestorePointReplicationStatus(_Model):
    """The instance view of a disk restore point.

    :ivar status: The resource status information.
    :vartype status: ~azure.mgmt.compute.models.InstanceViewStatus
    :ivar completion_percent: Replication completion percentage.
    :vartype completion_percent: int
    """

    status: Optional["_models.InstanceViewStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    completion_percent: Optional[int] = rest_field(
        name="completionPercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Replication completion percentage."""

    @overload
    def __init__(
        self,
        *,
        status: Optional["_models.InstanceViewStatus"] = None,
        completion_percent: 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 DiskSecurityProfile(_Model):
    """Contains the security related information for the resource.

    :ivar security_type: Specifies the SecurityType of the VM. Applicable for OS disks only. Known
     values are: "TrustedLaunch", "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey",
     "ConfidentialVM_DiskEncryptedWithPlatformKey", "ConfidentialVM_DiskEncryptedWithCustomerKey",
     and "ConfidentialVM_NonPersistedTPM".
    :vartype security_type: str or ~azure.mgmt.compute.models.DiskSecurityTypes
    :ivar secure_vm_disk_encryption_set_id: ResourceId of the disk encryption set associated to
     Confidential VM supported disk encrypted with customer managed key.
    :vartype secure_vm_disk_encryption_set_id: str
    """

    security_type: Optional[Union[str, "_models.DiskSecurityTypes"]] = rest_field(
        name="securityType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the SecurityType of the VM. Applicable for OS disks only. Known values are:
     \"TrustedLaunch\", \"ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey\",
     \"ConfidentialVM_DiskEncryptedWithPlatformKey\",
     \"ConfidentialVM_DiskEncryptedWithCustomerKey\", and \"ConfidentialVM_NonPersistedTPM\"."""
    secure_vm_disk_encryption_set_id: Optional[str] = rest_field(
        name="secureVMDiskEncryptionSetId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted
     with customer managed key."""

    @overload
    def __init__(
        self,
        *,
        security_type: Optional[Union[str, "_models.DiskSecurityTypes"]] = None,
        secure_vm_disk_encryption_set_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 DiskSku(_Model):
    """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
    Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.

    :ivar name: The sku name. Known values are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS",
     "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype name: str or ~azure.mgmt.compute.models.DiskStorageAccountTypes
    :ivar tier: The sku tier.
    :vartype tier: str
    """

    name: Optional[Union[str, "_models.DiskStorageAccountTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The sku name. Known values are: \"Standard_LRS\", \"Premium_LRS\", \"StandardSSD_LRS\",
     \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\", and \"PremiumV2_LRS\"."""
    tier: Optional[str] = rest_field(visibility=["read"])
    """The sku tier."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[Union[str, "_models.DiskStorageAccountTypes"]] = 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 DiskUpdate(_Model):
    """Disk update resource.

    :ivar properties: Disk resource update properties.
    :vartype properties: ~azure.mgmt.compute.models.DiskUpdateProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
     Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
    :vartype sku: ~azure.mgmt.compute.models.DiskSku
    """

    properties: Optional["_models.DiskUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk resource update properties."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    sku: Optional["_models.DiskSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
     Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS."""

    __flattened_items = [
        "os_type",
        "disk_size_gb",
        "encryption_settings_collection",
        "disk_iops_read_write",
        "disk_m_bps_read_write",
        "disk_iops_read_only",
        "disk_m_bps_read_only",
        "max_shares",
        "encryption",
        "network_access_policy",
        "disk_access_id",
        "tier",
        "bursting_enabled",
        "purchase_plan",
        "supported_capabilities",
        "property_updates_in_progress",
        "supports_hibernation",
        "public_network_access",
        "data_access_auth_mode",
        "optimized_for_frequent_attach",
        "availability_policy",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.DiskUpdateProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        sku: Optional["_models.DiskSku"] = 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 DiskUpdateProperties(_Model):
    """Disk resource update properties.

    :ivar os_type: the Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
     indicates the size of the disk to create. If this field is present for updates or creation with
     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
     running VM, and can only increase the disk's size.
    :vartype disk_size_gb: int
    :ivar encryption_settings_collection: Encryption settings collection used be Azure Disk
     Encryption, can contain multiple encryption settings per disk or snapshot.
    :vartype encryption_settings_collection:
     ~azure.mgmt.compute.models.EncryptionSettingsCollection
    :ivar disk_iops_read_write: The number of IOPS allowed for this disk; only settable for
     UltraSSD disks. One operation can transfer between 4k and 256k bytes.
    :vartype disk_iops_read_write: int
    :ivar disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD
     disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
     10.
    :vartype disk_m_bps_read_write: int
    :ivar disk_iops_read_only: The total number of IOPS that will be allowed across all VMs
     mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
    :vartype disk_iops_read_only: int
    :ivar disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs
     mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses
     the ISO notation, of powers of 10.
    :vartype disk_m_bps_read_only: int
    :ivar max_shares: The maximum number of VMs that can attach to the disk at the same time. Value
     greater than one indicates a disk that can be mounted on multiple VMs at the same time.
    :vartype max_shares: int
    :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed
     keys or platform managed keys.
    :vartype encryption: ~azure.mgmt.compute.models.Encryption
    :ivar network_access_policy: Policy for accessing the disk via network. Known values are:
     "AllowAll", "AllowPrivate", and "DenyAll".
    :vartype network_access_policy: str or ~azure.mgmt.compute.models.NetworkAccessPolicy
    :ivar disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
    :vartype disk_access_id: str
    :ivar tier: Performance tier of the disk (e.g, P4, S10) as described here:
     `https://azure.microsoft.com/en-us/pricing/details/managed-disks/
     <https://azure.microsoft.com/en-us/pricing/details/managed-disks/>`_. Does not apply to Ultra
     disks.
    :vartype tier: str
    :ivar bursting_enabled: Set to true to enable bursting beyond the provisioned performance
     target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
    :vartype bursting_enabled: bool
    :ivar purchase_plan: Purchase plan information to be added on the OS disk.
    :vartype purchase_plan: ~azure.mgmt.compute.models.DiskPurchasePlan
    :ivar supported_capabilities: List of supported capabilities to be added on the OS disk.
    :vartype supported_capabilities: ~azure.mgmt.compute.models.SupportedCapabilities
    :ivar property_updates_in_progress: Properties of the disk for which update is pending.
    :vartype property_updates_in_progress: ~azure.mgmt.compute.models.PropertyUpdatesInProgress
    :ivar supports_hibernation: Indicates the OS on a disk supports hibernation.
    :vartype supports_hibernation: bool
    :ivar public_network_access: Policy for controlling export on the disk. Known values are:
     "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.compute.models.PublicNetworkAccess
    :ivar data_access_auth_mode: Additional authentication requirements when exporting or uploading
     to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None".
    :vartype data_access_auth_mode: str or ~azure.mgmt.compute.models.DataAccessAuthMode
    :ivar optimized_for_frequent_attach: Setting this property to true improves reliability and
     performance of data disks that are frequently (more than 5 times a day) by detached from one
     virtual machine and attached to another. This property should not be set for disks that are not
     detached and attached frequently as it causes the disks to not align with the fault domain of
     the virtual machine.
    :vartype optimized_for_frequent_attach: bool
    :ivar availability_policy: Determines how platform treats disk failures.
    :vartype availability_policy: ~azure.mgmt.compute.models.AvailabilityPolicy
    """

    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """the Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """If creationData.createOption is Empty, this field is mandatory and it indicates the size of the
     disk to create. If this field is present for updates or creation with other options, it
     indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and
     can only increase the disk's size."""
    encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = rest_field(
        name="encryptionSettingsCollection", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption
     settings per disk or snapshot."""
    disk_iops_read_write: Optional[int] = rest_field(
        name="diskIOPSReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can
     transfer between 4k and 256k bytes."""
    disk_m_bps_read_write: Optional[int] = rest_field(
        name="diskMBpsReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of
     bytes per second - MB here uses the ISO notation, of powers of 10."""
    disk_iops_read_only: Optional[int] = rest_field(
        name="diskIOPSReadOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total number of IOPS that will be allowed across all VMs mounting the shared disk as
     ReadOnly. One operation can transfer between 4k and 256k bytes."""
    disk_m_bps_read_only: Optional[int] = rest_field(
        name="diskMBpsReadOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as
     ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
     10."""
    max_shares: Optional[int] = rest_field(name="maxShares", visibility=["read", "create", "update", "delete", "query"])
    """The maximum number of VMs that can attach to the disk at the same time. Value greater than one
     indicates a disk that can be mounted on multiple VMs at the same time."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Encryption property can be used to encrypt data at rest with customer managed keys or platform
     managed keys."""
    network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = rest_field(
        name="networkAccessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for accessing the disk via network. Known values are: \"AllowAll\", \"AllowPrivate\",
     and \"DenyAll\"."""
    disk_access_id: Optional[str] = rest_field(
        name="diskAccessId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM id of the DiskAccess resource for using private endpoints on disks."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Performance tier of the disk (e.g, P4, S10) as described here:
     `https://azure.microsoft.com/en-us/pricing/details/managed-disks/
     <https://azure.microsoft.com/en-us/pricing/details/managed-disks/>`_. Does not apply to Ultra
     disks."""
    bursting_enabled: Optional[bool] = rest_field(
        name="burstingEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting
     is disabled by default. Does not apply to Ultra disks."""
    purchase_plan: Optional["_models.DiskPurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Purchase plan information to be added on the OS disk."""
    supported_capabilities: Optional["_models.SupportedCapabilities"] = rest_field(
        name="supportedCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of supported capabilities to be added on the OS disk."""
    property_updates_in_progress: Optional["_models.PropertyUpdatesInProgress"] = rest_field(
        name="propertyUpdatesInProgress", visibility=["read"]
    )
    """Properties of the disk for which update is pending."""
    supports_hibernation: Optional[bool] = rest_field(
        name="supportsHibernation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the OS on a disk supports hibernation."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for controlling export on the disk. Known values are: \"Enabled\" and \"Disabled\"."""
    data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = rest_field(
        name="dataAccessAuthMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional authentication requirements when exporting or uploading to a disk or snapshot. Known
     values are: \"AzureActiveDirectory\" and \"None\"."""
    optimized_for_frequent_attach: Optional[bool] = rest_field(
        name="optimizedForFrequentAttach", visibility=["read", "create", "update", "delete", "query"]
    )
    """Setting this property to true improves reliability and performance of data disks that are
     frequently (more than 5 times a day) by detached from one virtual machine and attached to
     another. This property should not be set for disks that are not detached and attached
     frequently as it causes the disks to not align with the fault domain of the virtual machine."""
    availability_policy: Optional["_models.AvailabilityPolicy"] = rest_field(
        name="availabilityPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Determines how platform treats disk failures."""

    @overload
    def __init__(
        self,
        *,
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        disk_size_gb: Optional[int] = None,
        encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = None,
        disk_iops_read_write: Optional[int] = None,
        disk_m_bps_read_write: Optional[int] = None,
        disk_iops_read_only: Optional[int] = None,
        disk_m_bps_read_only: Optional[int] = None,
        max_shares: Optional[int] = None,
        encryption: Optional["_models.Encryption"] = None,
        network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = None,
        disk_access_id: Optional[str] = None,
        tier: Optional[str] = None,
        bursting_enabled: Optional[bool] = None,
        purchase_plan: Optional["_models.DiskPurchasePlan"] = None,
        supported_capabilities: Optional["_models.SupportedCapabilities"] = None,
        supports_hibernation: Optional[bool] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = None,
        optimized_for_frequent_attach: Optional[bool] = None,
        availability_policy: Optional["_models.AvailabilityPolicy"] = 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 Encryption(_Model):
    """Encryption at rest settings for disk or snapshot.

    :ivar disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling
     encryption at rest.
    :vartype disk_encryption_set_id: str
    :ivar type: The type of key used to encrypt the data of the disk. Known values are:
     "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey", and
     "EncryptionAtRestWithPlatformAndCustomerKeys".
    :vartype type: str or ~azure.mgmt.compute.models.EncryptionType
    """

    disk_encryption_set_id: Optional[str] = rest_field(
        name="diskEncryptionSetId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ResourceId of the disk encryption set to use for enabling encryption at rest."""
    type: Optional[Union[str, "_models.EncryptionType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of key used to encrypt the data of the disk. Known values are:
     \"EncryptionAtRestWithPlatformKey\", \"EncryptionAtRestWithCustomerKey\", and
     \"EncryptionAtRestWithPlatformAndCustomerKeys\"."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_set_id: Optional[str] = None,
        type: Optional[Union[str, "_models.EncryptionType"]] = 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 EncryptionIdentity(_Model):
    """Specifies the Managed Identity used by ADE to get access token for keyvault operations.

    :ivar user_assigned_identity_resource_id: Specifies ARM Resource ID of one of the user
     identities associated with the VM.
    :vartype user_assigned_identity_resource_id: str
    """

    user_assigned_identity_resource_id: Optional[str] = rest_field(
        name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies ARM Resource ID of one of the user identities associated with the VM."""

    @overload
    def __init__(
        self,
        *,
        user_assigned_identity_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 EncryptionImages(_Model):
    """Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in
    the gallery artifact.

    :ivar os_disk_image: Contains encryption settings for an OS disk image.
    :vartype os_disk_image: ~azure.mgmt.compute.models.OSDiskImageEncryption
    :ivar data_disk_images: A list of encryption specifications for data disk images.
    :vartype data_disk_images: list[~azure.mgmt.compute.models.DataDiskImageEncryption]
    """

    os_disk_image: Optional["_models.OSDiskImageEncryption"] = rest_field(
        name="osDiskImage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains encryption settings for an OS disk image."""
    data_disk_images: Optional[list["_models.DataDiskImageEncryption"]] = rest_field(
        name="dataDiskImages", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of encryption specifications for data disk images."""

    @overload
    def __init__(
        self,
        *,
        os_disk_image: Optional["_models.OSDiskImageEncryption"] = None,
        data_disk_images: Optional[list["_models.DataDiskImageEncryption"]] = 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 EncryptionSetIdentity(_Model):
    """The managed identity for the disk encryption set. It should be given permission on the key
    vault before it can be used to encrypt disks.

    :ivar type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is
     supported for new creations. Disk Encryption Sets can be updated with Identity type None during
     migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted
     resources to lose access to the keys. Known values are: "SystemAssigned", "UserAssigned",
     "SystemAssigned, UserAssigned", and "None".
    :vartype type: str or ~azure.mgmt.compute.models.DiskEncryptionSetIdentityType
    :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP
     from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a
     systemAssigned(implicit) identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant id of the Managed Identity Resource. This will be sent to the RP
     from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a
     systemAssigned(implicit) identity.
    :vartype tenant_id: str
    :ivar user_assigned_identities: The list of user identities associated with the disk encryption
     set. The user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.compute.models.UserAssignedIdentitiesValue]
    """

    type: Optional[Union[str, "_models.DiskEncryptionSetIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported
     for new creations. Disk Encryption Sets can be updated with Identity type None during migration
     of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources
     to lose access to the keys. Known values are: \"SystemAssigned\", \"UserAssigned\",
     \"SystemAssigned, UserAssigned\", and \"None\"."""
    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the
     x-ms-identity-principal-id header in the PUT request if the resource has a
     systemAssigned(implicit) identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the
     x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit)
     identity."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user identities associated with the disk encryption set. The user identity
     dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.DiskEncryptionSetIdentityType"]] = None,
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = 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 EncryptionSetProperties(_Model):
    """EncryptionSetProperties.

    :ivar encryption_type: The type of key used to encrypt the data of the disk. Known values are:
     "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys", and
     "ConfidentialVmEncryptedWithCustomerKey".
    :vartype encryption_type: str or ~azure.mgmt.compute.models.DiskEncryptionSetType
    :ivar active_key: The key vault key which is currently used by this disk encryption set.
    :vartype active_key: ~azure.mgmt.compute.models.KeyForDiskEncryptionSet
    :ivar previous_keys: A readonly collection of key vault keys previously used by this disk
     encryption set while a key rotation is in progress. It will be empty if there is no ongoing key
     rotation.
    :vartype previous_keys: list[~azure.mgmt.compute.models.KeyForDiskEncryptionSet]
    :ivar provisioning_state: The disk encryption set provisioning state.
    :vartype provisioning_state: str
    :ivar rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of
     this disk encryption set to the latest key version.
    :vartype rotation_to_latest_key_version_enabled: bool
    :ivar last_key_rotation_timestamp: The time when the active key of this disk encryption set was
     updated.
    :vartype last_key_rotation_timestamp: ~datetime.datetime
    :ivar auto_key_rotation_error: The error that was encountered during auto-key rotation. If an
     error is present, then auto-key rotation will not be attempted until the error on this disk
     encryption set is fixed.
    :vartype auto_key_rotation_error: ~azure.mgmt.compute.models.ApiError
    :ivar federated_client_id: Multi-tenant application client id to access key vault in a
     different tenant. Setting the value to 'None' will clear the property.
    :vartype federated_client_id: str
    """

    encryption_type: Optional[Union[str, "_models.DiskEncryptionSetType"]] = rest_field(
        name="encryptionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of key used to encrypt the data of the disk. Known values are:
     \"EncryptionAtRestWithCustomerKey\", \"EncryptionAtRestWithPlatformAndCustomerKeys\", and
     \"ConfidentialVmEncryptedWithCustomerKey\"."""
    active_key: Optional["_models.KeyForDiskEncryptionSet"] = rest_field(
        name="activeKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """The key vault key which is currently used by this disk encryption set."""
    previous_keys: Optional[list["_models.KeyForDiskEncryptionSet"]] = rest_field(
        name="previousKeys", visibility=["read"]
    )
    """A readonly collection of key vault keys previously used by this disk encryption set while a key
     rotation is in progress. It will be empty if there is no ongoing key rotation."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The disk encryption set provisioning state."""
    rotation_to_latest_key_version_enabled: Optional[bool] = rest_field(
        name="rotationToLatestKeyVersionEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set this flag to true to enable auto-updating of this disk encryption set to the latest key
     version."""
    last_key_rotation_timestamp: Optional[datetime.datetime] = rest_field(
        name="lastKeyRotationTimestamp", visibility=["read"], format="rfc3339"
    )
    """The time when the active key of this disk encryption set was updated."""
    auto_key_rotation_error: Optional["_models.ApiError"] = rest_field(name="autoKeyRotationError", visibility=["read"])
    """The error that was encountered during auto-key rotation. If an error is present, then auto-key
     rotation will not be attempted until the error on this disk encryption set is fixed."""
    federated_client_id: Optional[str] = rest_field(
        name="federatedClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Multi-tenant application client id to access key vault in a different tenant. Setting the value
     to 'None' will clear the property."""

    @overload
    def __init__(
        self,
        *,
        encryption_type: Optional[Union[str, "_models.DiskEncryptionSetType"]] = None,
        active_key: Optional["_models.KeyForDiskEncryptionSet"] = None,
        rotation_to_latest_key_version_enabled: Optional[bool] = None,
        federated_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 EncryptionSettingsCollection(_Model):
    """Encryption settings for disk or snapshot.

    :ivar enabled: Set this flag to true and provide DiskEncryptionKey and optional
     KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and
     KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object,
     the existing settings remain unchanged. Required.
    :vartype enabled: bool
    :ivar encryption_settings: A collection of encryption settings, one for each disk volume.
    :vartype encryption_settings: list[~azure.mgmt.compute.models.EncryptionSettingsElement]
    :ivar encryption_settings_version: Describes what type of encryption is used for the disks.
     Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption
     with AAD app.'1.1' corresponds to Azure Disk Encryption.
    :vartype encryption_settings_version: str
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable
     encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable
     encryption. If EncryptionSettings is null in the request object, the existing settings remain
     unchanged. Required."""
    encryption_settings: Optional[list["_models.EncryptionSettingsElement"]] = rest_field(
        name="encryptionSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of encryption settings, one for each disk volume."""
    encryption_settings_version: Optional[str] = rest_field(
        name="encryptionSettingsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes what type of encryption is used for the disks. Once this field is set, it cannot be
     overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure
     Disk Encryption."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        encryption_settings: Optional[list["_models.EncryptionSettingsElement"]] = None,
        encryption_settings_version: 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 EncryptionSettingsElement(_Model):
    """Encryption settings for one disk volume.

    :ivar disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key.
    :vartype disk_encryption_key: ~azure.mgmt.compute.models.KeyVaultAndSecretReference
    :ivar key_encryption_key: Key Vault Key Url and vault id of the key encryption key.
     KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
    :vartype key_encryption_key: ~azure.mgmt.compute.models.KeyVaultAndKeyReference
    """

    disk_encryption_key: Optional["_models.KeyVaultAndSecretReference"] = rest_field(
        name="diskEncryptionKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Key Vault Secret Url and vault id of the disk encryption key."""
    key_encryption_key: Optional["_models.KeyVaultAndKeyReference"] = rest_field(
        name="keyEncryptionKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when
     provided is used to unwrap the disk encryption key."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_key: Optional["_models.KeyVaultAndSecretReference"] = None,
        key_encryption_key: Optional["_models.KeyVaultAndKeyReference"] = 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.compute.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.compute.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.compute.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 EventGridAndResourceGraph(_Model):
    """Specifies eventGridAndResourceGraph related Scheduled Event related configurations.

    :ivar enable: Specifies if event grid and resource graph is enabled for Scheduled event related
     configurations.
    :vartype enable: bool
    :ivar scheduled_events_api_version: Specifies the api-version to determine which Scheduled
     Events configuration schema version will be delivered.
    :vartype scheduled_events_api_version: str
    """

    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies if event grid and resource graph is enabled for Scheduled event related
     configurations."""
    scheduled_events_api_version: Optional[str] = rest_field(
        name="scheduledEventsApiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the api-version to determine which Scheduled Events configuration schema version will
     be delivered."""

    @overload
    def __init__(
        self,
        *,
        enable: Optional[bool] = None,
        scheduled_events_api_version: 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 ExecutedValidation(_Model):
    """This is the executed Validation.

    :ivar type: This property specifies the type of image version validation.
    :vartype type: str
    :ivar status: This property specifies the status of the validationProfile of the image version.
     Known values are: "Unknown", "Failed", and "Succeeded".
    :vartype status: str or ~azure.mgmt.compute.models.ValidationStatus
    :ivar version: This property specifies the valid version of the validation.
    :vartype version: str
    :ivar execution_time: This property specifies the starting timestamp.
    :vartype execution_time: ~datetime.datetime
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This property specifies the type of image version validation."""
    status: Optional[Union[str, "_models.ValidationStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This property specifies the status of the validationProfile of the image version. Known values
     are: \"Unknown\", \"Failed\", and \"Succeeded\"."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This property specifies the valid version of the validation."""
    execution_time: Optional[datetime.datetime] = rest_field(
        name="executionTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """This property specifies the starting timestamp."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[str] = None,
        status: Optional[Union[str, "_models.ValidationStatus"]] = None,
        version: Optional[str] = None,
        execution_time: 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 ExtendedLocation(_Model):
    """The complex type of the extended location.

    :ivar name: The name of the extended location.
    :vartype name: str
    :ivar type: The type of the extended location. "EdgeZone"
    :vartype type: str or ~azure.mgmt.compute.models.ExtendedLocationTypes
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the extended location."""
    type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the extended location. \"EdgeZone\""""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = 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 ExternalHealthPolicy(_Model):
    """Specifies the external health policy for the virtual machine scale set.

    :ivar enabled: If true, external health is enabled for this scale set. Cannot be set to true on
     instances where another health monitoring source is active (ApplicationHealth extension or
     SLB). Defaults to false.
    :vartype enabled: bool
    :ivar expiry_duration: Defines how long the health status set by External Health API will last
     on the VM. If a signal is not received/updated within this time, the VM Health will be marked
     as "unknown". Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 3 hours (PT3H).
    :vartype expiry_duration: ~datetime.timedelta
    :ivar grace_period: Grace period for newly created VMs or when the External Health policy is
     first applied on VMSS. Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 4 hours
     (PT4H).
    :vartype grace_period: ~datetime.timedelta
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If true, external health is enabled for this scale set. Cannot be set to true on instances
     where another health monitoring source is active (ApplicationHealth extension or SLB). Defaults
     to false."""
    expiry_duration: Optional[datetime.timedelta] = rest_field(
        name="expiryDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines how long the health status set by External Health API will last on the VM. If a signal
     is not received/updated within this time, the VM Health will be marked as \"unknown\". Uses the
     ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 3 hours (PT3H)."""
    grace_period: Optional[datetime.timedelta] = rest_field(
        name="gracePeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Grace period for newly created VMs or when the External Health policy is first applied on VMSS.
     Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 4 hours (PT4H)."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        expiry_duration: Optional[datetime.timedelta] = None,
        grace_period: Optional[datetime.timedelta] = 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 Gallery(TrackedResource):
    """Specifies information about the Shared Image Gallery that you want to create or update.

    :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.compute.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: Describes the properties of a Shared Image Gallery.
    :vartype properties: ~azure.mgmt.compute.models.GalleryProperties
    :ivar identity: The identity of the gallery, if configured.
    :vartype identity: ~azure.mgmt.compute.models.GalleryIdentity
    """

    properties: Optional["_models.GalleryProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Shared Image Gallery."""
    identity: Optional["_models.GalleryIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the gallery, if configured."""

    __flattened_items = [
        "description",
        "identifier",
        "provisioning_state",
        "sharing_profile",
        "soft_delete_policy",
        "sharing_status",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryProperties"] = None,
        identity: Optional["_models.GalleryIdentity"] = 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 GalleryApplication(TrackedResource):
    """Specifies information about the gallery Application Definition that you want to create or
    update.

    :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.compute.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: Describes the properties of a gallery Application Definition.
    :vartype properties: ~azure.mgmt.compute.models.GalleryApplicationProperties
    """

    properties: Optional["_models.GalleryApplicationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery Application Definition."""

    __flattened_items = [
        "description",
        "eula",
        "privacy_statement_uri",
        "release_note_uri",
        "end_of_life_date",
        "supported_os_type",
        "custom_actions",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryApplicationProperties"] = 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 GalleryApplicationCustomAction(_Model):
    """A custom action that can be performed with a Gallery Application Version.

    :ivar name: The name of the custom action.  Must be unique within the Gallery Application
     Version. Required.
    :vartype name: str
    :ivar script: The script to run when executing this custom action. Required.
    :vartype script: str
    :ivar description: Description to help the users understand what this custom action does.
    :vartype description: str
    :ivar parameters: The parameters that this custom action uses.
    :vartype parameters: list[~azure.mgmt.compute.models.GalleryApplicationCustomActionParameter]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom action.  Must be unique within the Gallery Application Version.
     Required."""
    script: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The script to run when executing this custom action. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description to help the users understand what this custom action does."""
    parameters: Optional[list["_models.GalleryApplicationCustomActionParameter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters that this custom action uses."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        script: str,
        description: Optional[str] = None,
        parameters: Optional[list["_models.GalleryApplicationCustomActionParameter"]] = 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 GalleryApplicationCustomActionParameter(_Model):
    """The definition of a parameter that can be passed to a custom action of a Gallery Application
    Version.

    :ivar name: The name of the custom action.  Must be unique within the Gallery Application
     Version. Required.
    :vartype name: str
    :ivar required: Indicates whether this parameter must be passed when running the custom action.
    :vartype required: bool
    :ivar type: Specifies the type of the custom action parameter. Possible values are: String,
     ConfigurationDataBlob or LogOutputBlob. Known values are: "String", "ConfigurationDataBlob",
     and "LogOutputBlob".
    :vartype type: str or ~azure.mgmt.compute.models.GalleryApplicationCustomActionParameterType
    :ivar default_value: The default value of the parameter.  Only applies to string types.
    :vartype default_value: str
    :ivar description: A description to help users understand what this parameter means.
    :vartype description: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom action.  Must be unique within the Gallery Application Version.
     Required."""
    required: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this parameter must be passed when running the custom action."""
    type: Optional[Union[str, "_models.GalleryApplicationCustomActionParameterType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of the custom action parameter. Possible values are: String,
     ConfigurationDataBlob or LogOutputBlob. Known values are: \"String\",
     \"ConfigurationDataBlob\", and \"LogOutputBlob\"."""
    default_value: Optional[str] = rest_field(
        name="defaultValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default value of the parameter.  Only applies to string types."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description to help users understand what this parameter means."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        required: Optional[bool] = None,
        type: Optional[Union[str, "_models.GalleryApplicationCustomActionParameterType"]] = None,
        default_value: Optional[str] = None,
        description: 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 GalleryApplicationProperties(_Model):
    """Describes the properties of a gallery Application Definition.

    :ivar description: The description of this gallery Application Definition resource. This
     property is updatable.
    :vartype description: str
    :ivar eula: The Eula agreement for the gallery Application Definition.
    :vartype eula: str
    :ivar privacy_statement_uri: The privacy statement uri.
    :vartype privacy_statement_uri: str
    :ivar release_note_uri: The release note uri.
    :vartype release_note_uri: str
    :ivar end_of_life_date: The end of life date of the gallery Application Definition. This
     property can be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar supported_os_type: This property allows you to specify the supported type of the OS that
     application is built for. Possible values are: **Windows,** **Linux.**. Required. Known values
     are: "Windows" and "Linux".
    :vartype supported_os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar custom_actions: A list of custom actions that can be performed with all of the Gallery
     Application Versions within this Gallery Application.
    :vartype custom_actions: list[~azure.mgmt.compute.models.GalleryApplicationCustomAction]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of this gallery Application Definition resource. This property is updatable."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Eula agreement for the gallery Application Definition."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The privacy statement uri."""
    release_note_uri: Optional[str] = rest_field(
        name="releaseNoteUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The release note uri."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery Application Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    supported_os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="supportedOSType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the supported type of the OS that application is built for.
     Possible values are: **Windows,** **Linux.**. Required. Known values are: \"Windows\" and
     \"Linux\"."""
    custom_actions: Optional[list["_models.GalleryApplicationCustomAction"]] = rest_field(
        name="customActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of custom actions that can be performed with all of the Gallery Application Versions
     within this Gallery Application."""

    @overload
    def __init__(
        self,
        *,
        supported_os_type: Union[str, "_models.OperatingSystemTypes"],
        description: Optional[str] = None,
        eula: Optional[str] = None,
        privacy_statement_uri: Optional[str] = None,
        release_note_uri: Optional[str] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        custom_actions: Optional[list["_models.GalleryApplicationCustomAction"]] = 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 UpdateResourceDefinition(_Model):
    """The Update Resource model definition.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Resource Id."""
    name: Optional[str] = rest_field(visibility=["read"])
    """Resource name."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    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 GalleryApplicationUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery Application Definition that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a gallery Application Definition.
    :vartype properties: ~azure.mgmt.compute.models.GalleryApplicationProperties
    """

    properties: Optional["_models.GalleryApplicationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery Application Definition."""

    __flattened_items = [
        "description",
        "eula",
        "privacy_statement_uri",
        "release_note_uri",
        "end_of_life_date",
        "supported_os_type",
        "custom_actions",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryApplicationProperties"] = 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 GalleryApplicationVersion(TrackedResource):
    """Specifies information about the gallery Application Version that you want to create or update.

    :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.compute.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: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.GalleryApplicationVersionProperties
    """

    properties: Optional["_models.GalleryApplicationVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = ["publishing_profile", "safety_profile", "provisioning_state", "replication_status"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryApplicationVersionProperties"] = 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 GalleryApplicationVersionProperties(_Model):
    """Describes the properties of a gallery image version.

    :ivar publishing_profile: The publishing profile of a gallery image version. Required.
    :vartype publishing_profile:
     ~azure.mgmt.compute.models.GalleryApplicationVersionPublishingProfile
    :ivar safety_profile: The safety profile of the Gallery Application Version.
    :vartype safety_profile: ~azure.mgmt.compute.models.GalleryApplicationVersionSafetyProfile
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar replication_status: This is the replication status of the gallery image version.
    :vartype replication_status: ~azure.mgmt.compute.models.ReplicationStatus
    """

    publishing_profile: "_models.GalleryApplicationVersionPublishingProfile" = rest_field(
        name="publishingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publishing profile of a gallery image version. Required."""
    safety_profile: Optional["_models.GalleryApplicationVersionSafetyProfile"] = rest_field(
        name="safetyProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The safety profile of the Gallery Application Version."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    replication_status: Optional["_models.ReplicationStatus"] = rest_field(
        name="replicationStatus", visibility=["read"]
    )
    """This is the replication status of the gallery image version."""

    @overload
    def __init__(
        self,
        *,
        publishing_profile: "_models.GalleryApplicationVersionPublishingProfile",
        safety_profile: Optional["_models.GalleryApplicationVersionSafetyProfile"] = 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 GalleryArtifactPublishingProfileBase(_Model):
    """Describes the basic gallery artifact publishing profile.

    :ivar target_regions: The target regions where the Image Version is going to be replicated to.
     This property is updatable.
    :vartype target_regions: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar replica_count: The number of replicas of the Image Version to be created per region. This
     property would take effect for a region when regionalReplicaCount is not specified. This
     property is updatable.
    :vartype replica_count: int
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the gallery image version is published.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version. This property can be
     used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     Cannot be specified along with storageAccountStrategy. This property is not updatable. Known
     values are: "Standard_LRS", "Standard_ZRS", "Premium_LRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar replication_mode: Optional parameter which specifies the mode to be used for replication.
     This property is not updatable. Known values are: "Full" and "Shallow".
    :vartype replication_mode: str or ~azure.mgmt.compute.models.ReplicationMode
    :ivar target_extended_locations: The target extended locations where the Image Version is going
     to be replicated to. This property is updatable.
    :vartype target_extended_locations:
     list[~azure.mgmt.compute.models.GalleryTargetExtendedLocation]
    :ivar storage_account_strategy: Specifies the strategy to be used when selecting the storage
     account type. Cannot be specified along with storageAccountType, but can be overridden per
     region by specifying targetRegions[].storageAccountType. This property is not updatable. Known
     values are: "PreferStandard_ZRS" and "DefaultStandard_LRS".
    :vartype storage_account_strategy: str or ~azure.mgmt.compute.models.StorageAccountStrategy
    """

    target_regions: Optional[list["_models.TargetRegion"]] = rest_field(
        name="targetRegions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target regions where the Image Version is going to be replicated to. This property is
     updatable."""
    replica_count: Optional[int] = rest_field(
        name="replicaCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of replicas of the Image Version to be created per region. This property would take
     effect for a region when regionalReplicaCount is not specified. This property is updatable."""
    exclude_from_latest: Optional[bool] = rest_field(
        name="excludeFromLatest", visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to true, Virtual Machines deployed from the latest version of the Image Definition won't
     use this Image Version."""
    published_date: Optional[datetime.datetime] = rest_field(
        name="publishedDate", visibility=["read"], format="rfc3339"
    )
    """The timestamp for when the gallery image version is published."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image version. This property can be used for
     decommissioning purposes. This property is updatable."""
    storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type to be used to store the image. Cannot be specified along
     with storageAccountStrategy. This property is not updatable. Known values are:
     \"Standard_LRS\", \"Standard_ZRS\", \"Premium_LRS\", and \"PremiumV2_LRS\"."""
    replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = rest_field(
        name="replicationMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional parameter which specifies the mode to be used for replication. This property is not
     updatable. Known values are: \"Full\" and \"Shallow\"."""
    target_extended_locations: Optional[list["_models.GalleryTargetExtendedLocation"]] = rest_field(
        name="targetExtendedLocations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target extended locations where the Image Version is going to be replicated to. This
     property is updatable."""
    storage_account_strategy: Optional[Union[str, "_models.StorageAccountStrategy"]] = rest_field(
        name="storageAccountStrategy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the strategy to be used when selecting the storage account type. Cannot be specified
     along with storageAccountType, but can be overridden per region by specifying
     targetRegions[].storageAccountType. This property is not updatable. Known values are:
     \"PreferStandard_ZRS\" and \"DefaultStandard_LRS\"."""

    @overload
    def __init__(
        self,
        *,
        target_regions: Optional[list["_models.TargetRegion"]] = None,
        replica_count: Optional[int] = None,
        exclude_from_latest: Optional[bool] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = None,
        target_extended_locations: Optional[list["_models.GalleryTargetExtendedLocation"]] = None,
        storage_account_strategy: Optional[Union[str, "_models.StorageAccountStrategy"]] = 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 GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase):  # pylint: disable=name-too-long
    """The publishing profile of a gallery image version.

    :ivar target_regions: The target regions where the Image Version is going to be replicated to.
     This property is updatable.
    :vartype target_regions: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar replica_count: The number of replicas of the Image Version to be created per region. This
     property would take effect for a region when regionalReplicaCount is not specified. This
     property is updatable.
    :vartype replica_count: int
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the gallery image version is published.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version. This property can be
     used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     Cannot be specified along with storageAccountStrategy. This property is not updatable. Known
     values are: "Standard_LRS", "Standard_ZRS", "Premium_LRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar replication_mode: Optional parameter which specifies the mode to be used for replication.
     This property is not updatable. Known values are: "Full" and "Shallow".
    :vartype replication_mode: str or ~azure.mgmt.compute.models.ReplicationMode
    :ivar target_extended_locations: The target extended locations where the Image Version is going
     to be replicated to. This property is updatable.
    :vartype target_extended_locations:
     list[~azure.mgmt.compute.models.GalleryTargetExtendedLocation]
    :ivar storage_account_strategy: Specifies the strategy to be used when selecting the storage
     account type. Cannot be specified along with storageAccountType, but can be overridden per
     region by specifying targetRegions[].storageAccountType. This property is not updatable. Known
     values are: "PreferStandard_ZRS" and "DefaultStandard_LRS".
    :vartype storage_account_strategy: str or ~azure.mgmt.compute.models.StorageAccountStrategy
    :ivar source: The source image from which the Image Version is going to be created. Required.
    :vartype source: ~azure.mgmt.compute.models.UserArtifactSource
    :ivar manage_actions:
    :vartype manage_actions: ~azure.mgmt.compute.models.UserArtifactManage
    :ivar settings: Additional settings for the VM app that contains the target package and config
     file name when it is deployed to target VM or VM scale set.
    :vartype settings: ~azure.mgmt.compute.models.UserArtifactSettings
    :ivar advanced_settings: Optional. Additional settings to pass to the vm-application-manager
     extension. For advanced use only.
    :vartype advanced_settings: dict[str, str]
    :ivar enable_health_check: Optional. Whether or not this application reports health.
    :vartype enable_health_check: bool
    :ivar custom_actions: A list of custom actions that can be performed with this Gallery
     Application Version.
    :vartype custom_actions: list[~azure.mgmt.compute.models.GalleryApplicationCustomAction]
    """

    source: "_models.UserArtifactSource" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The source image from which the Image Version is going to be created. Required."""
    manage_actions: Optional["_models.UserArtifactManage"] = rest_field(
        name="manageActions", visibility=["read", "create", "update", "delete", "query"]
    )
    settings: Optional["_models.UserArtifactSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional settings for the VM app that contains the target package and config file name when
     it is deployed to target VM or VM scale set."""
    advanced_settings: Optional[dict[str, str]] = rest_field(
        name="advancedSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Additional settings to pass to the vm-application-manager extension. For advanced use
     only."""
    enable_health_check: Optional[bool] = rest_field(
        name="enableHealthCheck", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Whether or not this application reports health."""
    custom_actions: Optional[list["_models.GalleryApplicationCustomAction"]] = rest_field(
        name="customActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of custom actions that can be performed with this Gallery Application Version."""

    @overload
    def __init__(
        self,
        *,
        source: "_models.UserArtifactSource",
        target_regions: Optional[list["_models.TargetRegion"]] = None,
        replica_count: Optional[int] = None,
        exclude_from_latest: Optional[bool] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = None,
        target_extended_locations: Optional[list["_models.GalleryTargetExtendedLocation"]] = None,
        storage_account_strategy: Optional[Union[str, "_models.StorageAccountStrategy"]] = None,
        manage_actions: Optional["_models.UserArtifactManage"] = None,
        settings: Optional["_models.UserArtifactSettings"] = None,
        advanced_settings: Optional[dict[str, str]] = None,
        enable_health_check: Optional[bool] = None,
        custom_actions: Optional[list["_models.GalleryApplicationCustomAction"]] = 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 GalleryArtifactSafetyProfileBase(_Model):
    """This is the safety profile of the Gallery Artifact Version.

    :ivar allow_deletion_of_replicated_locations: Indicates whether or not removing this Gallery
     Image Version from replicated regions is allowed.
    :vartype allow_deletion_of_replicated_locations: bool
    """

    allow_deletion_of_replicated_locations: Optional[bool] = rest_field(
        name="allowDeletionOfReplicatedLocations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether or not removing this Gallery Image Version from replicated regions is
     allowed."""

    @overload
    def __init__(
        self,
        *,
        allow_deletion_of_replicated_locations: 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 GalleryApplicationVersionSafetyProfile(GalleryArtifactSafetyProfileBase):
    """The safety profile of the Gallery Application Version.

    :ivar allow_deletion_of_replicated_locations: Indicates whether or not removing this Gallery
     Image Version from replicated regions is allowed.
    :vartype allow_deletion_of_replicated_locations: bool
    """

    @overload
    def __init__(
        self,
        *,
        allow_deletion_of_replicated_locations: 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 GalleryApplicationVersionUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery Application Version that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.GalleryApplicationVersionProperties
    """

    properties: Optional["_models.GalleryApplicationVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = ["publishing_profile", "safety_profile", "provisioning_state", "replication_status"]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryApplicationVersionProperties"] = 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 GalleryArtifactVersionSource(_Model):
    """The gallery artifact version source.

    :ivar id: The id of the gallery artifact version source.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The id of the gallery artifact version source."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 GalleryArtifactVersionFullSource(GalleryArtifactVersionSource):
    """The source of the gallery artifact version.

    :ivar id: The id of the gallery artifact version source.
    :vartype id: str
    :ivar community_gallery_image_id: The resource Id of the source Community Gallery Image.  Only
     required when using Community Gallery Image as a source.
    :vartype community_gallery_image_id: str
    :ivar virtual_machine_id: The resource Id of the source virtual machine.  Only required when
     capturing a virtual machine to source this Gallery Image Version.
    :vartype virtual_machine_id: str
    """

    community_gallery_image_id: Optional[str] = rest_field(
        name="communityGalleryImageId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource Id of the source Community Gallery Image.  Only required when using Community
     Gallery Image as a source."""
    virtual_machine_id: Optional[str] = rest_field(
        name="virtualMachineId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource Id of the source virtual machine.  Only required when capturing a virtual machine
     to source this Gallery Image Version."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        community_gallery_image_id: Optional[str] = None,
        virtual_machine_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 GalleryDiskImage(_Model):
    """This is the disk image base class.

    :ivar size_in_gb: This property indicates the size of the VHD to be created.
    :vartype size_in_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.HostCaching
    :ivar source: The source for the disk image.
    :vartype source: ~azure.mgmt.compute.models.GalleryDiskImageSource
    """

    size_in_gb: Optional[int] = rest_field(name="sizeInGB", visibility=["read"])
    """This property indicates the size of the VHD to be created."""
    host_caching: Optional[Union[str, "_models.HostCaching"]] = rest_field(
        name="hostCaching", visibility=["read", "create", "update", "delete", "query"]
    )
    """The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    source: Optional["_models.GalleryDiskImageSource"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The source for the disk image."""

    @overload
    def __init__(
        self,
        *,
        host_caching: Optional[Union[str, "_models.HostCaching"]] = None,
        source: Optional["_models.GalleryDiskImageSource"] = 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 GalleryDataDiskImage(GalleryDiskImage):
    """This is the data disk image.

    :ivar size_in_gb: This property indicates the size of the VHD to be created.
    :vartype size_in_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.HostCaching
    :ivar source: The source for the disk image.
    :vartype source: ~azure.mgmt.compute.models.GalleryDiskImageSource
    :ivar lun: This property specifies the logical unit number of the data disk. This value is used
     to identify data disks within the Virtual Machine and therefore must be unique for each data
     disk attached to the Virtual Machine. Required.
    :vartype lun: int
    """

    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This property specifies the logical unit number of the data disk. This value is used to
     identify data disks within the Virtual Machine and therefore must be unique for each data disk
     attached to the Virtual Machine. Required."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        host_caching: Optional[Union[str, "_models.HostCaching"]] = None,
        source: Optional["_models.GalleryDiskImageSource"] = 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 GalleryDiskImageSource(GalleryArtifactVersionSource):
    """The source for the disk image.

    :ivar id: The id of the gallery artifact version source.
    :vartype id: str
    :ivar uri: The uri of the gallery artifact version source. Currently used to specify vhd/blob
     source.
    :vartype uri: str
    :ivar storage_account_id: The Storage Account Id that contains the vhd blob being used as a
     source for this artifact version.
    :vartype storage_account_id: str
    """

    uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The uri of the gallery artifact version source. Currently used to specify vhd/blob source."""
    storage_account_id: Optional[str] = rest_field(
        name="storageAccountId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Storage Account Id that contains the vhd blob being used as a source for this artifact
     version."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        uri: Optional[str] = None,
        storage_account_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 GalleryExtendedLocation(_Model):
    """The name of the extended location.

    :ivar name:
    :vartype name: str
    :ivar type: It is type of the extended location. Known values are: "EdgeZone" and "Unknown".
    :vartype type: str or ~azure.mgmt.compute.models.GalleryExtendedLocationType
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    type: Optional[Union[str, "_models.GalleryExtendedLocationType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """It is type of the extended location. Known values are: \"EdgeZone\" and \"Unknown\"."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        type: Optional[Union[str, "_models.GalleryExtendedLocationType"]] = 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 GalleryIdentifier(_Model):
    """Describes the gallery unique name.

    :ivar unique_name: The unique name of the Shared Image Gallery. This name is generated
     automatically by Azure.
    :vartype unique_name: str
    """

    unique_name: Optional[str] = rest_field(name="uniqueName", visibility=["read"])
    """The unique name of the Shared Image Gallery. This name is generated automatically by Azure."""


class GalleryIdentity(_Model):
    """Identity for the virtual machine.

    :ivar principal_id: The principal id of the gallery identity. This property will only be
     provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The AAD tenant id of the gallery identity. This property will only be provided
     for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned'
     includes both an implicitly created identity and a set of user assigned identities. The type
     'None' will remove all identities from the gallery. Known values are: "SystemAssigned",
     "UserAssigned", "SystemAssigned, UserAssigned", and "None".
    :vartype type: str or ~azure.mgmt.compute.models.ResourceIdentityType
    :ivar user_assigned_identities: The list of user identities associated with the gallery. The
     user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.compute.models.UserAssignedIdentitiesValue]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal id of the gallery identity. This property will only be provided for a system
     assigned identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The AAD tenant id of the gallery identity. This property will only be provided for a system
     assigned identity."""
    type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes
     both an implicitly created identity and a set of user assigned identities. The type 'None' will
     remove all identities from the gallery. Known values are: \"SystemAssigned\", \"UserAssigned\",
     \"SystemAssigned, UserAssigned\", and \"None\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user identities associated with the gallery. The user identity dictionary key
     references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.ResourceIdentityType"]] = None,
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = 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 GalleryImage(TrackedResource):
    """Specifies information about the gallery image definition that you want to create or update.

    :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.compute.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: Describes the properties of a gallery image definition.
    :vartype properties: ~azure.mgmt.compute.models.GalleryImageProperties
    """

    properties: Optional["_models.GalleryImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image definition."""

    __flattened_items = [
        "description",
        "eula",
        "privacy_statement_uri",
        "release_note_uri",
        "os_type",
        "os_state",
        "hyper_v_generation",
        "end_of_life_date",
        "identifier",
        "recommended",
        "disallowed",
        "purchase_plan",
        "provisioning_state",
        "features",
        "architecture",
        "allow_update_image",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryImageProperties"] = 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 GalleryImageFeature(_Model):
    """A feature for gallery image.

    :ivar name: The name of the gallery image feature.
    :vartype name: str
    :ivar value: The value of the gallery image feature.
    :vartype value: str
    :ivar starts_at_version: The minimum gallery image version which supports this feature.
    :vartype starts_at_version: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image feature."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the gallery image feature."""
    starts_at_version: Optional[str] = rest_field(
        name="startsAtVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum gallery image version which supports this feature."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        value: Optional[str] = None,
        starts_at_version: 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 GalleryImageIdentifier(_Model):
    """This is the gallery image definition identifier.

    :ivar publisher: The name of the gallery image definition publisher. Required.
    :vartype publisher: str
    :ivar offer: The name of the gallery image definition offer. Required.
    :vartype offer: str
    :ivar sku: The name of the gallery image definition SKU. Required.
    :vartype sku: str
    """

    publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition publisher. Required."""
    offer: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition offer. Required."""
    sku: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the gallery image definition SKU. Required."""

    @overload
    def __init__(
        self,
        *,
        publisher: str,
        offer: str,
        sku: 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 GalleryImageProperties(_Model):
    """Describes the properties of a gallery image definition.

    :ivar description: The description of this gallery image definition resource. This property is
     updatable.
    :vartype description: str
    :ivar eula: The Eula agreement for the gallery image definition.
    :vartype eula: str
    :ivar privacy_statement_uri: The privacy statement uri.
    :vartype privacy_statement_uri: str
    :ivar release_note_uri: The release note uri.
    :vartype release_note_uri: str
    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux.**.
     Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar os_state: This property allows the user to specify whether the virtual machines created
     under this image are 'Generalized' or 'Specialized'. Required. Known values are: "Generalized"
     and "Specialized".
    :vartype os_state: str or ~azure.mgmt.compute.models.OperatingSystemStateTypes
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar end_of_life_date: The end of life date of the gallery image definition. This property can
     be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar identifier: This is the gallery image definition identifier. Required.
    :vartype identifier: ~azure.mgmt.compute.models.GalleryImageIdentifier
    :ivar recommended: The properties describe the recommended machine configuration for this Image
     Definition. These properties are updatable.
    :vartype recommended: ~azure.mgmt.compute.models.RecommendedMachineConfiguration
    :ivar disallowed: Describes the disallowed disk types.
    :vartype disallowed: ~azure.mgmt.compute.models.Disallowed
    :ivar purchase_plan: Describes the gallery image definition purchase plan. This is used by
     marketplace images.
    :vartype purchase_plan: ~azure.mgmt.compute.models.ImagePurchasePlan
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar features: A list of gallery image features.
    :vartype features: list[~azure.mgmt.compute.models.GalleryImageFeature]
    :ivar architecture: The architecture of the image. Applicable to OS disks only. Known values
     are: "x64" and "Arm64".
    :vartype architecture: str or ~azure.mgmt.compute.models.Architecture
    :ivar allow_update_image: Optional. Must be set to true if the gallery image features are being
     updated.
    :vartype allow_update_image: bool
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of this gallery image definition resource. This property is updatable."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Eula agreement for the gallery image definition."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The privacy statement uri."""
    release_note_uri: Optional[str] = rest_field(
        name="releaseNoteUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The release note uri."""
    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk when
     creating a VM from a managed image. Possible values are: **Windows,** **Linux.**. Required.
     Known values are: \"Windows\" and \"Linux\"."""
    os_state: Union[str, "_models.OperatingSystemStateTypes"] = rest_field(
        name="osState", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows the user to specify whether the virtual machines created under this image
     are 'Generalized' or 'Specialized'. Required. Known values are: \"Generalized\" and
     \"Specialized\"."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    identifier: "_models.GalleryImageIdentifier" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the gallery image definition identifier. Required."""
    recommended: Optional["_models.RecommendedMachineConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties describe the recommended machine configuration for this Image Definition. These
     properties are updatable."""
    disallowed: Optional["_models.Disallowed"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the disallowed disk types."""
    purchase_plan: Optional["_models.ImagePurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the gallery image definition purchase plan. This is used by marketplace images."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    features: Optional[list["_models.GalleryImageFeature"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of gallery image features."""
    architecture: Optional[Union[str, "_models.Architecture"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The architecture of the image. Applicable to OS disks only. Known values are: \"x64\" and
     \"Arm64\"."""
    allow_update_image: Optional[bool] = rest_field(
        name="allowUpdateImage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Must be set to true if the gallery image features are being updated."""

    @overload
    def __init__(
        self,
        *,
        os_type: Union[str, "_models.OperatingSystemTypes"],
        os_state: Union[str, "_models.OperatingSystemStateTypes"],
        identifier: "_models.GalleryImageIdentifier",
        description: Optional[str] = None,
        eula: Optional[str] = None,
        privacy_statement_uri: Optional[str] = None,
        release_note_uri: Optional[str] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        recommended: Optional["_models.RecommendedMachineConfiguration"] = None,
        disallowed: Optional["_models.Disallowed"] = None,
        purchase_plan: Optional["_models.ImagePurchasePlan"] = None,
        features: Optional[list["_models.GalleryImageFeature"]] = None,
        architecture: Optional[Union[str, "_models.Architecture"]] = None,
        allow_update_image: 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 GalleryImageUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery image definition that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a gallery image definition.
    :vartype properties: ~azure.mgmt.compute.models.GalleryImageProperties
    """

    properties: Optional["_models.GalleryImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image definition."""

    __flattened_items = [
        "description",
        "eula",
        "privacy_statement_uri",
        "release_note_uri",
        "os_type",
        "os_state",
        "hyper_v_generation",
        "end_of_life_date",
        "identifier",
        "recommended",
        "disallowed",
        "purchase_plan",
        "provisioning_state",
        "features",
        "architecture",
        "allow_update_image",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryImageProperties"] = 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 GalleryImageVersion(TrackedResource):
    """Specifies information about the gallery image version that you want to create or update.

    :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.compute.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: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.GalleryImageVersionProperties
    """

    properties: Optional["_models.GalleryImageVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = [
        "publishing_profile",
        "provisioning_state",
        "storage_profile",
        "safety_profile",
        "replication_status",
        "security_profile",
        "restore",
        "validations_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryImageVersionProperties"] = 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 GalleryImageVersionProperties(_Model):
    """Describes the properties of a gallery image version.

    :ivar publishing_profile: The publishing profile of a gallery image Version.
    :vartype publishing_profile: ~azure.mgmt.compute.models.GalleryImageVersionPublishingProfile
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar storage_profile: This is the storage profile of a Gallery Image Version. Required.
    :vartype storage_profile: ~azure.mgmt.compute.models.GalleryImageVersionStorageProfile
    :ivar safety_profile: This is the safety profile of the Gallery Image Version.
    :vartype safety_profile: ~azure.mgmt.compute.models.GalleryImageVersionSafetyProfile
    :ivar replication_status: This is the replication status of the gallery image version.
    :vartype replication_status: ~azure.mgmt.compute.models.ReplicationStatus
    :ivar security_profile: The security profile of a gallery image version.
    :vartype security_profile: ~azure.mgmt.compute.models.ImageVersionSecurityProfile
    :ivar restore: Indicates if this is a soft-delete resource restoration request.
    :vartype restore: bool
    :ivar validations_profile: This is the validations profile of a Gallery Image Version.
    :vartype validations_profile: ~azure.mgmt.compute.models.ValidationsProfile
    """

    publishing_profile: Optional["_models.GalleryImageVersionPublishingProfile"] = rest_field(
        name="publishingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publishing profile of a gallery image Version."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    storage_profile: "_models.GalleryImageVersionStorageProfile" = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the storage profile of a Gallery Image Version. Required."""
    safety_profile: Optional["_models.GalleryImageVersionSafetyProfile"] = rest_field(
        name="safetyProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the safety profile of the Gallery Image Version."""
    replication_status: Optional["_models.ReplicationStatus"] = rest_field(
        name="replicationStatus", visibility=["read"]
    )
    """This is the replication status of the gallery image version."""
    security_profile: Optional["_models.ImageVersionSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security profile of a gallery image version."""
    restore: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates if this is a soft-delete resource restoration request."""
    validations_profile: Optional["_models.ValidationsProfile"] = rest_field(
        name="validationsProfile", visibility=["read"]
    )
    """This is the validations profile of a Gallery Image Version."""

    @overload
    def __init__(
        self,
        *,
        storage_profile: "_models.GalleryImageVersionStorageProfile",
        publishing_profile: Optional["_models.GalleryImageVersionPublishingProfile"] = None,
        safety_profile: Optional["_models.GalleryImageVersionSafetyProfile"] = None,
        security_profile: Optional["_models.ImageVersionSecurityProfile"] = None,
        restore: 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 GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase):
    """The publishing profile of a gallery image Version.

    :ivar target_regions: The target regions where the Image Version is going to be replicated to.
     This property is updatable.
    :vartype target_regions: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar replica_count: The number of replicas of the Image Version to be created per region. This
     property would take effect for a region when regionalReplicaCount is not specified. This
     property is updatable.
    :vartype replica_count: int
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the gallery image version is published.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version. This property can be
     used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     Cannot be specified along with storageAccountStrategy. This property is not updatable. Known
     values are: "Standard_LRS", "Standard_ZRS", "Premium_LRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar replication_mode: Optional parameter which specifies the mode to be used for replication.
     This property is not updatable. Known values are: "Full" and "Shallow".
    :vartype replication_mode: str or ~azure.mgmt.compute.models.ReplicationMode
    :ivar target_extended_locations: The target extended locations where the Image Version is going
     to be replicated to. This property is updatable.
    :vartype target_extended_locations:
     list[~azure.mgmt.compute.models.GalleryTargetExtendedLocation]
    :ivar storage_account_strategy: Specifies the strategy to be used when selecting the storage
     account type. Cannot be specified along with storageAccountType, but can be overridden per
     region by specifying targetRegions[].storageAccountType. This property is not updatable. Known
     values are: "PreferStandard_ZRS" and "DefaultStandard_LRS".
    :vartype storage_account_strategy: str or ~azure.mgmt.compute.models.StorageAccountStrategy
    """

    @overload
    def __init__(
        self,
        *,
        target_regions: Optional[list["_models.TargetRegion"]] = None,
        replica_count: Optional[int] = None,
        exclude_from_latest: Optional[bool] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = None,
        target_extended_locations: Optional[list["_models.GalleryTargetExtendedLocation"]] = None,
        storage_account_strategy: Optional[Union[str, "_models.StorageAccountStrategy"]] = 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 GalleryImageVersionSafetyProfile(GalleryArtifactSafetyProfileBase):
    """This is the safety profile of the Gallery Image Version.

    :ivar allow_deletion_of_replicated_locations: Indicates whether or not removing this Gallery
     Image Version from replicated regions is allowed.
    :vartype allow_deletion_of_replicated_locations: bool
    :ivar reported_for_policy_violation: Indicates whether this image has been reported as
     violating Microsoft's policies.
    :vartype reported_for_policy_violation: bool
    :ivar policy_violations: A list of Policy Violations that have been reported for this Gallery
     Image Version.
    :vartype policy_violations: list[~azure.mgmt.compute.models.PolicyViolation]
    :ivar block_deletion_before_end_of_life: Indicates whether or not the deletion is blocked for
     this Gallery Image Version if its End Of Life has not expired.
    :vartype block_deletion_before_end_of_life: bool
    """

    reported_for_policy_violation: Optional[bool] = rest_field(name="reportedForPolicyViolation", visibility=["read"])
    """Indicates whether this image has been reported as violating Microsoft's policies."""
    policy_violations: Optional[list["_models.PolicyViolation"]] = rest_field(
        name="policyViolations", visibility=["read"]
    )
    """A list of Policy Violations that have been reported for this Gallery Image Version."""
    block_deletion_before_end_of_life: Optional[bool] = rest_field(
        name="blockDeletionBeforeEndOfLife", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether or not the deletion is blocked for this Gallery Image Version if its End Of
     Life has not expired."""

    @overload
    def __init__(
        self,
        *,
        allow_deletion_of_replicated_locations: Optional[bool] = None,
        block_deletion_before_end_of_life: 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 GalleryImageVersionStorageProfile(_Model):
    """This is the storage profile of a Gallery Image Version.

    :ivar source: The source of the gallery artifact version.
    :vartype source: ~azure.mgmt.compute.models.GalleryArtifactVersionFullSource
    :ivar os_disk_image: This is the OS disk image.
    :vartype os_disk_image: ~azure.mgmt.compute.models.GalleryOSDiskImage
    :ivar data_disk_images: A list of data disk images.
    :vartype data_disk_images: list[~azure.mgmt.compute.models.GalleryDataDiskImage]
    """

    source: Optional["_models.GalleryArtifactVersionFullSource"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The source of the gallery artifact version."""
    os_disk_image: Optional["_models.GalleryOSDiskImage"] = rest_field(
        name="osDiskImage", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the OS disk image."""
    data_disk_images: Optional[list["_models.GalleryDataDiskImage"]] = rest_field(
        name="dataDiskImages", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of data disk images."""

    @overload
    def __init__(
        self,
        *,
        source: Optional["_models.GalleryArtifactVersionFullSource"] = None,
        os_disk_image: Optional["_models.GalleryOSDiskImage"] = None,
        data_disk_images: Optional[list["_models.GalleryDataDiskImage"]] = 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 GalleryImageVersionUefiSettings(_Model):
    """Contains UEFI settings for the image version.

    :ivar signature_template_names: The name of the template(s) that contains default UEFI key
     signatures that will be added to the image.
    :vartype signature_template_names: list[str or
     ~azure.mgmt.compute.models.UefiSignatureTemplateName]
    :ivar additional_signatures: Additional UEFI key signatures that will be added to the image in
     addition to the signature templates.
    :vartype additional_signatures: ~azure.mgmt.compute.models.UefiKeySignatures
    """

    signature_template_names: Optional[list[Union[str, "_models.UefiSignatureTemplateName"]]] = rest_field(
        name="signatureTemplateNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the template(s) that contains default UEFI key signatures that will be added to the
     image."""
    additional_signatures: Optional["_models.UefiKeySignatures"] = rest_field(
        name="additionalSignatures", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional UEFI key signatures that will be added to the image in addition to the signature
     templates."""

    @overload
    def __init__(
        self,
        *,
        signature_template_names: Optional[list[Union[str, "_models.UefiSignatureTemplateName"]]] = None,
        additional_signatures: Optional["_models.UefiKeySignatures"] = 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 GalleryImageVersionUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery image version that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.GalleryImageVersionProperties
    """

    properties: Optional["_models.GalleryImageVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = [
        "publishing_profile",
        "provisioning_state",
        "storage_profile",
        "safety_profile",
        "replication_status",
        "security_profile",
        "restore",
        "validations_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryImageVersionProperties"] = 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 GalleryInVMAccessControlProfile(TrackedResource):
    """Specifies information about the gallery inVMAccessControlProfile that you want to create or
    update.

    :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.compute.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: Describes the properties of a gallery inVMAccessControlProfile.
    :vartype properties: ~azure.mgmt.compute.models.GalleryInVMAccessControlProfileProperties
    """

    properties: Optional["_models.GalleryInVMAccessControlProfileProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery inVMAccessControlProfile."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryInVMAccessControlProfileProperties"] = 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 GalleryResourceProfilePropertiesBase(_Model):
    """The properties of a gallery ResourceProfile.

    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    """

    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""


class GalleryInVMAccessControlProfileProperties(GalleryResourceProfilePropertiesBase):  # pylint: disable=name-too-long
    """Describes the properties of a gallery inVMAccessControlProfile.

    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar description: The description of this gallery inVMAccessControlProfile resources. This
     property is updatable.
    :vartype description: str
    :ivar os_type: This property allows you to specify the OS type of the VMs/VMSS for which this
     profile can be used against. Possible values are: 'Windows' or 'Linux'. Required. Known values
     are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar applicable_host_endpoint: This property allows you to specify the Endpoint type for which
     this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'.
     Required. Known values are: "WireServer" and "IMDS".
    :vartype applicable_host_endpoint: str or ~azure.mgmt.compute.models.EndpointTypes
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of this gallery inVMAccessControlProfile resources. This property is updatable."""
    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the OS type of the VMs/VMSS for which this profile can be
     used against. Possible values are: 'Windows' or 'Linux'. Required. Known values are:
     \"Windows\" and \"Linux\"."""
    applicable_host_endpoint: Union[str, "_models.EndpointTypes"] = rest_field(
        name="applicableHostEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the Endpoint type for which this profile is defining the
     access control for. Possible values are: 'WireServer' or 'IMDS'. Required. Known values are:
     \"WireServer\" and \"IMDS\"."""

    @overload
    def __init__(
        self,
        *,
        os_type: Union[str, "_models.OperatingSystemTypes"],
        applicable_host_endpoint: Union[str, "_models.EndpointTypes"],
        description: 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 GalleryInVMAccessControlProfileUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery inVMAccessControlProfile that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a gallery inVMAccessControlProfile.
    :vartype properties: ~azure.mgmt.compute.models.GalleryInVMAccessControlProfileProperties
    """

    properties: Optional["_models.GalleryInVMAccessControlProfileProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery inVMAccessControlProfile."""

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryInVMAccessControlProfileProperties"] = 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 GalleryInVMAccessControlProfileVersion(TrackedResource):
    """Specifies information about the gallery inVMAccessControlProfile version that you want to
    create or update.

    :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.compute.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: Describes the properties of an inVMAccessControlProfile version.
    :vartype properties:
     ~azure.mgmt.compute.models.GalleryInVMAccessControlProfileVersionProperties
    """

    properties: Optional["_models.GalleryInVMAccessControlProfileVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of an inVMAccessControlProfile version."""

    __flattened_items = [
        "target_locations",
        "exclude_from_latest",
        "published_date",
        "provisioning_state",
        "replication_status",
        "mode",
        "default_access",
        "rules",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryInVMAccessControlProfileVersionProperties"] = 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 GalleryResourceProfileVersionPropertiesBase(_Model):  # pylint: disable=name-too-long
    """The properties of a gallery ResourceProfile version.

    :ivar target_locations: The target regions where the Resource Profile version is going to be
     replicated to. This property is updatable.
    :vartype target_locations: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Resource Profile won't use this Profile version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the Resource Profile Version is published.
    :vartype published_date: ~datetime.datetime
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar replication_status: This is the replication status of the gallery image version.
    :vartype replication_status: ~azure.mgmt.compute.models.ReplicationStatus
    """

    target_locations: Optional[list["_models.TargetRegion"]] = rest_field(
        name="targetLocations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target regions where the Resource Profile version is going to be replicated to. This
     property is updatable."""
    exclude_from_latest: Optional[bool] = rest_field(
        name="excludeFromLatest", visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't
     use this Profile version."""
    published_date: Optional[datetime.datetime] = rest_field(
        name="publishedDate", visibility=["read"], format="rfc3339"
    )
    """The timestamp for when the Resource Profile Version is published."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    replication_status: Optional["_models.ReplicationStatus"] = rest_field(
        name="replicationStatus", visibility=["read"]
    )
    """This is the replication status of the gallery image version."""

    @overload
    def __init__(
        self,
        *,
        target_locations: Optional[list["_models.TargetRegion"]] = None,
        exclude_from_latest: 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 GalleryInVMAccessControlProfileVersionProperties(
    GalleryResourceProfileVersionPropertiesBase
):  # pylint: disable=name-too-long
    """Describes the properties of an inVMAccessControlProfile version.

    :ivar target_locations: The target regions where the Resource Profile version is going to be
     replicated to. This property is updatable.
    :vartype target_locations: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Resource Profile won't use this Profile version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the Resource Profile Version is published.
    :vartype published_date: ~datetime.datetime
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar replication_status: This is the replication status of the gallery image version.
    :vartype replication_status: ~azure.mgmt.compute.models.ReplicationStatus
    :ivar mode: This property allows you to specify whether the access control rules are in Audit
     mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'.
     Required. Known values are: "Audit", "Enforce", and "Disabled".
    :vartype mode: str or ~azure.mgmt.compute.models.AccessControlRulesMode
    :ivar default_access: This property allows you to specify if the requests will be allowed to
     access the host endpoints. Possible values are: 'Allow', 'Deny'. Required. Known values are:
     "Allow" and "Deny".
    :vartype default_access: str or ~azure.mgmt.compute.models.EndpointAccess
    :ivar rules: This is the Access Control Rules specification for an inVMAccessControlProfile
     version.
    :vartype rules: ~azure.mgmt.compute.models.AccessControlRules
    """

    mode: Union[str, "_models.AccessControlRulesMode"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify whether the access control rules are in Audit mode, in
     Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. Required.
     Known values are: \"Audit\", \"Enforce\", and \"Disabled\"."""
    default_access: Union[str, "_models.EndpointAccess"] = rest_field(
        name="defaultAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify if the requests will be allowed to access the host
     endpoints. Possible values are: 'Allow', 'Deny'. Required. Known values are: \"Allow\" and
     \"Deny\"."""
    rules: Optional["_models.AccessControlRules"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the Access Control Rules specification for an inVMAccessControlProfile version."""

    @overload
    def __init__(
        self,
        *,
        mode: Union[str, "_models.AccessControlRulesMode"],
        default_access: Union[str, "_models.EndpointAccess"],
        target_locations: Optional[list["_models.TargetRegion"]] = None,
        exclude_from_latest: Optional[bool] = None,
        rules: Optional["_models.AccessControlRules"] = 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 GalleryInVMAccessControlProfileVersionUpdate(UpdateResourceDefinition):  # pylint: disable=name-too-long
    """Specifies information about the gallery inVMAccessControlProfile version that you want to
    update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of an inVMAccessControlProfile version.
    :vartype properties:
     ~azure.mgmt.compute.models.GalleryInVMAccessControlProfileVersionProperties
    """

    properties: Optional["_models.GalleryInVMAccessControlProfileVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of an inVMAccessControlProfile version."""

    __flattened_items = [
        "target_locations",
        "exclude_from_latest",
        "published_date",
        "provisioning_state",
        "replication_status",
        "mode",
        "default_access",
        "rules",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryInVMAccessControlProfileVersionProperties"] = 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 GalleryOSDiskImage(GalleryDiskImage):
    """This is the OS disk image.

    :ivar size_in_gb: This property indicates the size of the VHD to be created.
    :vartype size_in_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.HostCaching
    :ivar source: The source for the disk image.
    :vartype source: ~azure.mgmt.compute.models.GalleryDiskImageSource
    """

    @overload
    def __init__(
        self,
        *,
        host_caching: Optional[Union[str, "_models.HostCaching"]] = None,
        source: Optional["_models.GalleryDiskImageSource"] = 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 GalleryProperties(_Model):
    """Describes the properties of a Shared Image Gallery.

    :ivar description: The description of this Shared Image Gallery resource. This property is
     updatable.
    :vartype description: str
    :ivar identifier: Describes the gallery unique name.
    :vartype identifier: ~azure.mgmt.compute.models.GalleryIdentifier
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar sharing_profile: Profile for gallery sharing to subscription or tenant.
    :vartype sharing_profile: ~azure.mgmt.compute.models.SharingProfile
    :ivar soft_delete_policy: Contains information about the soft deletion policy of the gallery.
    :vartype soft_delete_policy: ~azure.mgmt.compute.models.SoftDeletePolicy
    :ivar sharing_status: Sharing status of current gallery.
    :vartype sharing_status: ~azure.mgmt.compute.models.SharingStatus
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of this Shared Image Gallery resource. This property is updatable."""
    identifier: Optional["_models.GalleryIdentifier"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the gallery unique name."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    sharing_profile: Optional["_models.SharingProfile"] = rest_field(
        name="sharingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Profile for gallery sharing to subscription or tenant."""
    soft_delete_policy: Optional["_models.SoftDeletePolicy"] = rest_field(
        name="softDeletePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains information about the soft deletion policy of the gallery."""
    sharing_status: Optional["_models.SharingStatus"] = rest_field(name="sharingStatus", visibility=["read"])
    """Sharing status of current gallery."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        identifier: Optional["_models.GalleryIdentifier"] = None,
        sharing_profile: Optional["_models.SharingProfile"] = None,
        soft_delete_policy: Optional["_models.SoftDeletePolicy"] = 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 GalleryScript(TrackedResource):
    """Specifies information about the gallery Script Definition that you want to create or update.

    :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.compute.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: Describes the properties of a gallery Script Definition.
    :vartype properties: ~azure.mgmt.compute.models.GalleryScriptProperties
    """

    properties: Optional["_models.GalleryScriptProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery Script Definition."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryScriptProperties"] = 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 GenericGalleryParameter(_Model):
    """The definition of a generic gallery parameter.

    :ivar name: The name of the parameter. Required.
    :vartype name: str
    :ivar required: Indicates whether this parameter must be passed.
    :vartype required: bool
    :ivar default_value: The default value of the parameter, only applies to string types.
    :vartype default_value: str
    :ivar description: A description to help users understand what this parameter means.
    :vartype description: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the parameter. Required."""
    required: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this parameter must be passed."""
    default_value: Optional[str] = rest_field(
        name="defaultValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default value of the parameter, only applies to string types."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description to help users understand what this parameter means."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        required: Optional[bool] = None,
        default_value: Optional[str] = None,
        description: 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 GalleryScriptParameter(GenericGalleryParameter):
    """The definition of a parameter that can be passed to a script of a Gallery Script Version.

    :ivar name: The name of the parameter. Required.
    :vartype name: str
    :ivar required: Indicates whether this parameter must be passed.
    :vartype required: bool
    :ivar default_value: The default value of the parameter, only applies to string types.
    :vartype default_value: str
    :ivar description: A description to help users understand what this parameter means.
    :vartype description: str
    :ivar type: Specifies the type of the Gallery Script parameter. Possible values are: String,
     Int, Double, Boolean, Enum. Known values are: "String", "Int", "Double", "Boolean", and "Enum".
    :vartype type: str or ~azure.mgmt.compute.models.GalleryScriptParameterType
    :ivar min_value: The minimum value of parameter.
    :vartype min_value: str
    :ivar max_value: The minimum value of parameter.
    :vartype max_value: str
    :ivar enum_values: A list of permissible values. Only applicable values are from 'enum' values
     defined in 'GalleryScriptParameter'.
    :vartype enum_values: list[str]
    """

    type: Optional[Union[str, "_models.GalleryScriptParameterType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double,
     Boolean, Enum. Known values are: \"String\", \"Int\", \"Double\", \"Boolean\", and \"Enum\"."""
    min_value: Optional[str] = rest_field(name="minValue", visibility=["read", "create", "update", "delete", "query"])
    """The minimum value of parameter."""
    max_value: Optional[str] = rest_field(name="maxValue", visibility=["read", "create", "update", "delete", "query"])
    """The minimum value of parameter."""
    enum_values: Optional[list[str]] = rest_field(
        name="enumValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of permissible values. Only applicable values are from 'enum' values defined in
     'GalleryScriptParameter'."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        required: Optional[bool] = None,
        default_value: Optional[str] = None,
        description: Optional[str] = None,
        type: Optional[Union[str, "_models.GalleryScriptParameterType"]] = None,
        min_value: Optional[str] = None,
        max_value: Optional[str] = None,
        enum_values: 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 GalleryScriptProperties(_Model):
    """Describes the properties of a gallery script definition.

    :ivar description: The description of this gallery script definition resource. This property is
     updatable.
    :vartype description: str
    :ivar eula: The Eula agreement (End User License Agreement) for the gallery Script Definition.
    :vartype eula: str
    :ivar privacy_statement_uri: The privacy statement uri.
    :vartype privacy_statement_uri: str
    :ivar release_note_uri: The release note uri.
    :vartype release_note_uri: str
    :ivar end_of_life_date: The end of life date of the gallery Script Definition. This property
     can be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar supported_os_type: This property allows you to specify the supported type of the OS that
     application is built for. Possible values are: **Windows,** **Linux.**. Required. Known values
     are: "Windows" and "Linux".
    :vartype supported_os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of this gallery script definition resource. This property is updatable."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Eula agreement (End User License Agreement) for the gallery Script Definition."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The privacy statement uri."""
    release_note_uri: Optional[str] = rest_field(
        name="releaseNoteUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The release note uri."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery Script Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    supported_os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="supportedOSType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the supported type of the OS that application is built for.
     Possible values are: **Windows,** **Linux.**. Required. Known values are: \"Windows\" and
     \"Linux\"."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""

    @overload
    def __init__(
        self,
        *,
        supported_os_type: Union[str, "_models.OperatingSystemTypes"],
        description: Optional[str] = None,
        eula: Optional[str] = None,
        privacy_statement_uri: Optional[str] = None,
        release_note_uri: Optional[str] = None,
        end_of_life_date: 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 GalleryScriptUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery Script Definition that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Gallery script definition properties to update.
    :vartype properties: ~azure.mgmt.compute.models.GalleryScriptProperties
    """

    properties: Optional["_models.GalleryScriptProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gallery script definition properties to update."""

    __flattened_items = [
        "description",
        "eula",
        "privacy_statement_uri",
        "release_note_uri",
        "end_of_life_date",
        "supported_os_type",
        "provisioning_state",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryScriptProperties"] = 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 GalleryScriptVersion(TrackedResource):
    """Concrete tracked resource types can be created by aliasing this type using a specific property
    type.

    :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.compute.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: Describes the properties of a gallery Script Version.
    :vartype properties: ~azure.mgmt.compute.models.GalleryScriptVersionProperties
    """

    properties: Optional["_models.GalleryScriptVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery Script Version."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryScriptVersionProperties"] = 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 GalleryScriptVersionProperties(_Model):
    """Describes the properties of a gallery script version.

    :ivar publishing_profile: The publishing profile of a gallery image version. Required.
    :vartype publishing_profile: ~azure.mgmt.compute.models.GalleryScriptVersionPublishingProfile
    :ivar safety_profile: The safety profile of the Gallery Script Version.
    :vartype safety_profile: ~azure.mgmt.compute.models.GalleryScriptVersionSafetyProfile
    :ivar provisioning_state: The provisioning state, which only appears in the response. Known
     values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating".
    :vartype provisioning_state: str or ~azure.mgmt.compute.models.GalleryProvisioningState
    :ivar replication_status: This is the replication status of the gallery image version.
    :vartype replication_status: ~azure.mgmt.compute.models.ReplicationStatus
    """

    publishing_profile: "_models.GalleryScriptVersionPublishingProfile" = rest_field(
        name="publishingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publishing profile of a gallery image version. Required."""
    safety_profile: Optional["_models.GalleryScriptVersionSafetyProfile"] = rest_field(
        name="safetyProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The safety profile of the Gallery Script Version."""
    provisioning_state: Optional[Union[str, "_models.GalleryProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state, which only appears in the response. Known values are: \"Creating\",
     \"Updating\", \"Failed\", \"Succeeded\", \"Deleting\", and \"Migrating\"."""
    replication_status: Optional["_models.ReplicationStatus"] = rest_field(
        name="replicationStatus", visibility=["read"]
    )
    """This is the replication status of the gallery image version."""

    @overload
    def __init__(
        self,
        *,
        publishing_profile: "_models.GalleryScriptVersionPublishingProfile",
        safety_profile: Optional["_models.GalleryScriptVersionSafetyProfile"] = 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 GalleryScriptVersionPublishingProfile(GalleryArtifactPublishingProfileBase):
    """The publishing profile of a gallery image version.

    :ivar target_regions: The target regions where the Image Version is going to be replicated to.
     This property is updatable.
    :vartype target_regions: list[~azure.mgmt.compute.models.TargetRegion]
    :ivar replica_count: The number of replicas of the Image Version to be created per region. This
     property would take effect for a region when regionalReplicaCount is not specified. This
     property is updatable.
    :vartype replica_count: int
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar published_date: The timestamp for when the gallery image version is published.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version. This property can be
     used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     Cannot be specified along with storageAccountStrategy. This property is not updatable. Known
     values are: "Standard_LRS", "Standard_ZRS", "Premium_LRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar replication_mode: Optional parameter which specifies the mode to be used for replication.
     This property is not updatable. Known values are: "Full" and "Shallow".
    :vartype replication_mode: str or ~azure.mgmt.compute.models.ReplicationMode
    :ivar target_extended_locations: The target extended locations where the Image Version is going
     to be replicated to. This property is updatable.
    :vartype target_extended_locations:
     list[~azure.mgmt.compute.models.GalleryTargetExtendedLocation]
    :ivar storage_account_strategy: Specifies the strategy to be used when selecting the storage
     account type. Cannot be specified along with storageAccountType, but can be overridden per
     region by specifying targetRegions[].storageAccountType. This property is not updatable. Known
     values are: "PreferStandard_ZRS" and "DefaultStandard_LRS".
    :vartype storage_account_strategy: str or ~azure.mgmt.compute.models.StorageAccountStrategy
    :ivar source: The source script from which the Script Version is going to be created. Required.
    :vartype source: ~azure.mgmt.compute.models.ScriptSource
    """

    source: "_models.ScriptSource" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The source script from which the Script Version is going to be created. Required."""

    @overload
    def __init__(
        self,
        *,
        source: "_models.ScriptSource",
        target_regions: Optional[list["_models.TargetRegion"]] = None,
        replica_count: Optional[int] = None,
        exclude_from_latest: Optional[bool] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = None,
        target_extended_locations: Optional[list["_models.GalleryTargetExtendedLocation"]] = None,
        storage_account_strategy: Optional[Union[str, "_models.StorageAccountStrategy"]] = 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 GalleryScriptVersionSafetyProfile(GalleryArtifactSafetyProfileBase):
    """The safety profile of the Gallery Script Version.

    :ivar allow_deletion_of_replicated_locations: Indicates whether or not removing this Gallery
     Image Version from replicated regions is allowed.
    :vartype allow_deletion_of_replicated_locations: bool
    """

    @overload
    def __init__(
        self,
        *,
        allow_deletion_of_replicated_locations: 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 GalleryScriptVersionUpdate(UpdateResourceDefinition):
    """Specifies information about the gallery Script Version that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Gallery script version properties to update.
    :vartype properties: ~azure.mgmt.compute.models.GalleryScriptVersionProperties
    """

    properties: Optional["_models.GalleryScriptVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gallery script version properties to update."""

    __flattened_items = ["publishing_profile", "safety_profile", "provisioning_state", "replication_status"]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryScriptVersionProperties"] = 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 GallerySoftDeletedResource(TrackedResource):
    """The details information of soft-deleted 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.compute.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: Describes the properties of a soft-deleted resource.
    :vartype properties: ~azure.mgmt.compute.models.GallerySoftDeletedResourceProperties
    """

    properties: Optional["_models.GallerySoftDeletedResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a soft-deleted resource."""

    __flattened_items = ["resource_arm_id", "soft_deleted_artifact_type", "soft_deleted_time"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GallerySoftDeletedResourceProperties"] = 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 GallerySoftDeletedResourceProperties(_Model):
    """Describes the properties of a soft-deleted resource.

    :ivar resource_arm_id: arm id of the soft-deleted resource.
    :vartype resource_arm_id: str
    :ivar soft_deleted_artifact_type: artifact type of the soft-deleted resource. "Images"
    :vartype soft_deleted_artifact_type: str or ~azure.mgmt.compute.models.SoftDeletedArtifactTypes
    :ivar soft_deleted_time: The timestamp for when the resource is soft-deleted. In dateTime
     offset format.
    :vartype soft_deleted_time: str
    """

    resource_arm_id: Optional[str] = rest_field(
        name="resourceArmId", visibility=["read", "create", "update", "delete", "query"]
    )
    """arm id of the soft-deleted resource."""
    soft_deleted_artifact_type: Optional[Union[str, "_models.SoftDeletedArtifactTypes"]] = rest_field(
        name="softDeletedArtifactType", visibility=["read", "create", "update", "delete", "query"]
    )
    """artifact type of the soft-deleted resource. \"Images\""""
    soft_deleted_time: Optional[str] = rest_field(
        name="softDeletedTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The timestamp for when the resource is soft-deleted. In dateTime offset format."""

    @overload
    def __init__(
        self,
        *,
        resource_arm_id: Optional[str] = None,
        soft_deleted_artifact_type: Optional[Union[str, "_models.SoftDeletedArtifactTypes"]] = None,
        soft_deleted_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 GalleryTargetExtendedLocation(_Model):
    """GalleryTargetExtendedLocation.

    :ivar name: The name of the region.
    :vartype name: str
    :ivar extended_location: The name of the extended location.
    :vartype extended_location: ~azure.mgmt.compute.models.GalleryExtendedLocation
    :ivar extended_location_replica_count: The number of replicas of the Image Version to be
     created per extended location. This property is updatable.
    :vartype extended_location_replica_count: int
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     This property is not updatable. Known values are: "Standard_LRS", "Standard_ZRS",
     "StandardSSD_LRS", and "Premium_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.EdgeZoneStorageAccountType
    :ivar encryption: Optional. Allows users to provide customer managed keys for encrypting the OS
     and data disks in the gallery artifact.
    :vartype encryption: ~azure.mgmt.compute.models.EncryptionImages
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the region."""
    extended_location: Optional["_models.GalleryExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the extended location."""
    extended_location_replica_count: Optional[int] = rest_field(
        name="extendedLocationReplicaCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of replicas of the Image Version to be created per extended location. This property
     is updatable."""
    storage_account_type: Optional[Union[str, "_models.EdgeZoneStorageAccountType"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type to be used to store the image. This property is not
     updatable. Known values are: \"Standard_LRS\", \"Standard_ZRS\", \"StandardSSD_LRS\", and
     \"Premium_LRS\"."""
    encryption: Optional["_models.EncryptionImages"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in
     the gallery artifact."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        extended_location: Optional["_models.GalleryExtendedLocation"] = None,
        extended_location_replica_count: Optional[int] = None,
        storage_account_type: Optional[Union[str, "_models.EdgeZoneStorageAccountType"]] = None,
        encryption: Optional["_models.EncryptionImages"] = 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 GalleryUpdate(UpdateResourceDefinition):
    """Specifies information about the Shared Image Gallery that you want to update.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a Shared Image Gallery.
    :vartype properties: ~azure.mgmt.compute.models.GalleryProperties
    :ivar identity: The identity of the gallery, if configured.
    :vartype identity: ~azure.mgmt.compute.models.GalleryIdentity
    """

    properties: Optional["_models.GalleryProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Shared Image Gallery."""
    identity: Optional["_models.GalleryIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the gallery, if configured."""

    __flattened_items = [
        "description",
        "identifier",
        "provisioning_state",
        "sharing_profile",
        "soft_delete_policy",
        "sharing_status",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.GalleryProperties"] = None,
        identity: Optional["_models.GalleryIdentity"] = 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 GrantAccessData(_Model):
    """Data used for requesting a SAS.

    :ivar access: The Access Level, accepted values include None, Read, Write. Required. Known
     values are: "None", "Read", and "Write".
    :vartype access: str or ~azure.mgmt.compute.models.AccessLevel
    :ivar duration_in_seconds: Time duration in seconds until the SAS access expires. Required.
    :vartype duration_in_seconds: int
    :ivar get_secure_vm_guest_state_sas: Set this flag to true to get additional SAS for VM guest
     state.
    :vartype get_secure_vm_guest_state_sas: bool
    :ivar file_format: Used to specify the file format when making request for SAS on a VHDX file
     format snapshot. Known values are: "VHD" and "VHDX".
    :vartype file_format: str or ~azure.mgmt.compute.models.FileFormat
    """

    access: Union[str, "_models.AccessLevel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Access Level, accepted values include None, Read, Write. Required. Known values are:
     \"None\", \"Read\", and \"Write\"."""
    duration_in_seconds: int = rest_field(
        name="durationInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Time duration in seconds until the SAS access expires. Required."""
    get_secure_vm_guest_state_sas: Optional[bool] = rest_field(
        name="getSecureVMGuestStateSAS", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set this flag to true to get additional SAS for VM guest state."""
    file_format: Optional[Union[str, "_models.FileFormat"]] = rest_field(
        name="fileFormat", visibility=["read", "create", "update", "delete", "query"]
    )
    """Used to specify the file format when making request for SAS on a VHDX file format snapshot.
     Known values are: \"VHD\" and \"VHDX\"."""

    @overload
    def __init__(
        self,
        *,
        access: Union[str, "_models.AccessLevel"],
        duration_in_seconds: int,
        get_secure_vm_guest_state_sas: Optional[bool] = None,
        file_format: Optional[Union[str, "_models.FileFormat"]] = 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 HardwareProfile(_Model):
    """Specifies the hardware settings for the virtual machine.

    :ivar vm_size: Specifies the size of the virtual machine. The enum data type is currently
     deprecated and will be removed by December 23rd 2023. The recommended way to get the list of
     available sizes is using these APIs: `List all available virtual machine sizes in an
     availability set
     <https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes>`_, `List all
     available virtual machine sizes in a region
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_, `List all available virtual
     machine sizes for resizing
     <https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes>`_. For more
     information about virtual machine sizes, see `Sizes for virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/sizes>`_. The available VM sizes depend on
     region and availability set. Known values are: "Basic_A0", "Basic_A1", "Basic_A2", "Basic_A3",
     "Basic_A4", "Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3", "Standard_A4",
     "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A9", "Standard_A10",
     "Standard_A11", "Standard_A1_v2", "Standard_A2_v2", "Standard_A4_v2", "Standard_A8_v2",
     "Standard_A2m_v2", "Standard_A4m_v2", "Standard_A8m_v2", "Standard_B1s", "Standard_B1ms",
     "Standard_B2s", "Standard_B2ms", "Standard_B4ms", "Standard_B8ms", "Standard_D1",
     "Standard_D2", "Standard_D3", "Standard_D4", "Standard_D11", "Standard_D12", "Standard_D13",
     "Standard_D14", "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2",
     "Standard_D5_v2", "Standard_D2_v3", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3",
     "Standard_D32_v3", "Standard_D64_v3", "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3",
     "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_D11_v2",
     "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_DS1",
     "Standard_DS2", "Standard_DS3", "Standard_DS4", "Standard_DS11", "Standard_DS12",
     "Standard_DS13", "Standard_DS14", "Standard_DS1_v2", "Standard_DS2_v2", "Standard_DS3_v2",
     "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS11_v2", "Standard_DS12_v2",
     "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_DS13-4_v2",
     "Standard_DS13-2_v2", "Standard_DS14-8_v2", "Standard_DS14-4_v2", "Standard_E2_v3",
     "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E32_v3", "Standard_E64_v3",
     "Standard_E2s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3",
     "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E32-16_v3", "Standard_E32-8s_v3",
     "Standard_E64-32s_v3", "Standard_E64-16s_v3", "Standard_F1", "Standard_F2", "Standard_F4",
     "Standard_F8", "Standard_F16", "Standard_F1s", "Standard_F2s", "Standard_F4s", "Standard_F8s",
     "Standard_F16s", "Standard_F2s_v2", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2",
     "Standard_F32s_v2", "Standard_F64s_v2", "Standard_F72s_v2", "Standard_G1", "Standard_G2",
     "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", "Standard_GS3",
     "Standard_GS4", "Standard_GS5", "Standard_GS4-8", "Standard_GS4-4", "Standard_GS5-16",
     "Standard_GS5-8", "Standard_H8", "Standard_H16", "Standard_H8m", "Standard_H16m",
     "Standard_H16r", "Standard_H16mr", "Standard_L4s", "Standard_L8s", "Standard_L16s",
     "Standard_L32s", "Standard_M64s", "Standard_M64ms", "Standard_M128s", "Standard_M128ms",
     "Standard_M64-32ms", "Standard_M64-16ms", "Standard_M128-64ms", "Standard_M128-32ms",
     "Standard_NC6", "Standard_NC12", "Standard_NC24", "Standard_NC24r", "Standard_NC6s_v2",
     "Standard_NC12s_v2", "Standard_NC24s_v2", "Standard_NC24rs_v2", "Standard_NC6s_v3",
     "Standard_NC12s_v3", "Standard_NC24s_v3", "Standard_NC24rs_v3", "Standard_ND6s",
     "Standard_ND12s", "Standard_ND24s", "Standard_ND24rs", "Standard_NV6", "Standard_NV12", and
     "Standard_NV24".
    :vartype vm_size: str or ~azure.mgmt.compute.models.VirtualMachineSizeTypes
    :ivar vm_size_properties: Specifies the properties for customizing the size of the virtual
     machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not
     supported for VirtualMachineScaleSet. Please follow the instructions in `VM Customization
     <https://aka.ms/vmcustomization>`_ for more details.
    :vartype vm_size_properties: ~azure.mgmt.compute.models.VMSizeProperties
    """

    vm_size: Optional[Union[str, "_models.VirtualMachineSizeTypes"]] = rest_field(
        name="vmSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of the virtual machine. The enum data type is currently deprecated and will
     be removed by December 23rd 2023. The recommended way to get the list of available sizes is
     using these APIs: `List all available virtual machine sizes in an availability set
     <https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes>`_, `List all
     available virtual machine sizes in a region
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_, `List all available virtual
     machine sizes for resizing
     <https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes>`_. For more
     information about virtual machine sizes, see `Sizes for virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/sizes>`_. The available VM sizes depend on
     region and availability set. Known values are: \"Basic_A0\", \"Basic_A1\", \"Basic_A2\",
     \"Basic_A3\", \"Basic_A4\", \"Standard_A0\", \"Standard_A1\", \"Standard_A2\", \"Standard_A3\",
     \"Standard_A4\", \"Standard_A5\", \"Standard_A6\", \"Standard_A7\", \"Standard_A8\",
     \"Standard_A9\", \"Standard_A10\", \"Standard_A11\", \"Standard_A1_v2\", \"Standard_A2_v2\",
     \"Standard_A4_v2\", \"Standard_A8_v2\", \"Standard_A2m_v2\", \"Standard_A4m_v2\",
     \"Standard_A8m_v2\", \"Standard_B1s\", \"Standard_B1ms\", \"Standard_B2s\", \"Standard_B2ms\",
     \"Standard_B4ms\", \"Standard_B8ms\", \"Standard_D1\", \"Standard_D2\", \"Standard_D3\",
     \"Standard_D4\", \"Standard_D11\", \"Standard_D12\", \"Standard_D13\", \"Standard_D14\",
     \"Standard_D1_v2\", \"Standard_D2_v2\", \"Standard_D3_v2\", \"Standard_D4_v2\",
     \"Standard_D5_v2\", \"Standard_D2_v3\", \"Standard_D4_v3\", \"Standard_D8_v3\",
     \"Standard_D16_v3\", \"Standard_D32_v3\", \"Standard_D64_v3\", \"Standard_D2s_v3\",
     \"Standard_D4s_v3\", \"Standard_D8s_v3\", \"Standard_D16s_v3\", \"Standard_D32s_v3\",
     \"Standard_D64s_v3\", \"Standard_D11_v2\", \"Standard_D12_v2\", \"Standard_D13_v2\",
     \"Standard_D14_v2\", \"Standard_D15_v2\", \"Standard_DS1\", \"Standard_DS2\", \"Standard_DS3\",
     \"Standard_DS4\", \"Standard_DS11\", \"Standard_DS12\", \"Standard_DS13\", \"Standard_DS14\",
     \"Standard_DS1_v2\", \"Standard_DS2_v2\", \"Standard_DS3_v2\", \"Standard_DS4_v2\",
     \"Standard_DS5_v2\", \"Standard_DS11_v2\", \"Standard_DS12_v2\", \"Standard_DS13_v2\",
     \"Standard_DS14_v2\", \"Standard_DS15_v2\", \"Standard_DS13-4_v2\", \"Standard_DS13-2_v2\",
     \"Standard_DS14-8_v2\", \"Standard_DS14-4_v2\", \"Standard_E2_v3\", \"Standard_E4_v3\",
     \"Standard_E8_v3\", \"Standard_E16_v3\", \"Standard_E32_v3\", \"Standard_E64_v3\",
     \"Standard_E2s_v3\", \"Standard_E4s_v3\", \"Standard_E8s_v3\", \"Standard_E16s_v3\",
     \"Standard_E32s_v3\", \"Standard_E64s_v3\", \"Standard_E32-16_v3\", \"Standard_E32-8s_v3\",
     \"Standard_E64-32s_v3\", \"Standard_E64-16s_v3\", \"Standard_F1\", \"Standard_F2\",
     \"Standard_F4\", \"Standard_F8\", \"Standard_F16\", \"Standard_F1s\", \"Standard_F2s\",
     \"Standard_F4s\", \"Standard_F8s\", \"Standard_F16s\", \"Standard_F2s_v2\",
     \"Standard_F4s_v2\", \"Standard_F8s_v2\", \"Standard_F16s_v2\", \"Standard_F32s_v2\",
     \"Standard_F64s_v2\", \"Standard_F72s_v2\", \"Standard_G1\", \"Standard_G2\", \"Standard_G3\",
     \"Standard_G4\", \"Standard_G5\", \"Standard_GS1\", \"Standard_GS2\", \"Standard_GS3\",
     \"Standard_GS4\", \"Standard_GS5\", \"Standard_GS4-8\", \"Standard_GS4-4\",
     \"Standard_GS5-16\", \"Standard_GS5-8\", \"Standard_H8\", \"Standard_H16\", \"Standard_H8m\",
     \"Standard_H16m\", \"Standard_H16r\", \"Standard_H16mr\", \"Standard_L4s\", \"Standard_L8s\",
     \"Standard_L16s\", \"Standard_L32s\", \"Standard_M64s\", \"Standard_M64ms\",
     \"Standard_M128s\", \"Standard_M128ms\", \"Standard_M64-32ms\", \"Standard_M64-16ms\",
     \"Standard_M128-64ms\", \"Standard_M128-32ms\", \"Standard_NC6\", \"Standard_NC12\",
     \"Standard_NC24\", \"Standard_NC24r\", \"Standard_NC6s_v2\", \"Standard_NC12s_v2\",
     \"Standard_NC24s_v2\", \"Standard_NC24rs_v2\", \"Standard_NC6s_v3\", \"Standard_NC12s_v3\",
     \"Standard_NC24s_v3\", \"Standard_NC24rs_v3\", \"Standard_ND6s\", \"Standard_ND12s\",
     \"Standard_ND24s\", \"Standard_ND24rs\", \"Standard_NV6\", \"Standard_NV12\", and
     \"Standard_NV24\"."""
    vm_size_properties: Optional["_models.VMSizeProperties"] = rest_field(
        name="vmSizeProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the properties for customizing the size of the virtual machine. Minimum api-version:
     2021-07-01. This feature is still in preview mode and is not supported for
     VirtualMachineScaleSet. Please follow the instructions in `VM Customization
     <https://aka.ms/vmcustomization>`_ for more details."""

    @overload
    def __init__(
        self,
        *,
        vm_size: Optional[Union[str, "_models.VirtualMachineSizeTypes"]] = None,
        vm_size_properties: Optional["_models.VMSizeProperties"] = 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 HostEndpointSettings(_Model):
    """Specifies particular host endpoint settings.

    :ivar mode: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing
     the access control policy, including emitting access denial entries in the logs but it does not
     actually deny any requests to host endpoints. In Enforce mode, the system will enforce the
     access control and it is the recommended mode of operation. Known values are: "Audit",
     "Enforce", and "Disabled".
    :vartype mode: str or ~azure.mgmt.compute.models.Modes
    :ivar in_vm_access_control_profile_reference_id: Specifies the InVMAccessControlProfileVersion
     resource id in the format of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}.
    :vartype in_vm_access_control_profile_reference_id: str
    """

    mode: Optional[Union[str, "_models.Modes"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access
     control policy, including emitting access denial entries in the logs but it does not actually
     deny any requests to host endpoints. In Enforce mode, the system will enforce the access
     control and it is the recommended mode of operation. Known values are: \"Audit\", \"Enforce\",
     and \"Disabled\"."""
    in_vm_access_control_profile_reference_id: Optional[str] = rest_field(
        name="inVMAccessControlProfileReferenceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the InVMAccessControlProfileVersion resource id in the format of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}."""

    @overload
    def __init__(
        self,
        *,
        mode: Optional[Union[str, "_models.Modes"]] = None,
        in_vm_access_control_profile_reference_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 Image(TrackedResource):
    """The source user image virtual hard disk. The virtual hard disk will be copied before being
    attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive
    must not exist.

    :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.compute.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: Describes the properties of an Image.
    :vartype properties: ~azure.mgmt.compute.models.ImageProperties
    :ivar extended_location: The extended location of the Image.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    """

    properties: Optional["_models.ImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of an Image."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location of the Image."""

    __flattened_items = ["source_virtual_machine", "storage_profile", "provisioning_state", "hyper_v_generation"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.ImageProperties"] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 ImageDisk(_Model):
    """Describes a image disk.

    :ivar snapshot: The snapshot.
    :vartype snapshot: ~azure.mgmt.compute.models.SubResource
    :ivar managed_disk: The managedDisk.
    :vartype managed_disk: ~azure.mgmt.compute.models.SubResource
    :ivar blob_uri: The Virtual Hard Disk.
    :vartype blob_uri: str
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar disk_size_gb: Specifies the size of empty data disks in gigabytes. This element can be
     used to overwrite the name of the disk in a virtual machine image. This value cannot be larger
     than 1023 GB.
    :vartype disk_size_gb: int
    :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE:
     UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values
     are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS",
     "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed image disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    """

    snapshot: Optional["_models.SubResource"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The snapshot."""
    managed_disk: Optional["_models.SubResource"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managedDisk."""
    blob_uri: Optional[str] = rest_field(name="blobUri", visibility=["read", "create", "update", "delete", "query"])
    """The Virtual Hard Disk."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The default values are: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the
     name of the disk in a virtual machine image. This value cannot be larger than 1023 GB."""
    storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used
     with data disks, it cannot be used with OS Disk. Known values are: \"Standard_LRS\",
     \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\",
     and \"PremiumV2_LRS\"."""
    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the customer managed disk encryption set resource id for the managed image disk."""

    @overload
    def __init__(
        self,
        *,
        snapshot: Optional["_models.SubResource"] = None,
        managed_disk: Optional["_models.SubResource"] = None,
        blob_uri: Optional[str] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        disk_size_gb: Optional[int] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = 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 ImageDataDisk(ImageDisk):
    """Describes a data disk.

    :ivar snapshot: The snapshot.
    :vartype snapshot: ~azure.mgmt.compute.models.SubResource
    :ivar managed_disk: The managedDisk.
    :vartype managed_disk: ~azure.mgmt.compute.models.SubResource
    :ivar blob_uri: The Virtual Hard Disk.
    :vartype blob_uri: str
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar disk_size_gb: Specifies the size of empty data disks in gigabytes. This element can be
     used to overwrite the name of the disk in a virtual machine image. This value cannot be larger
     than 1023 GB.
    :vartype disk_size_gb: int
    :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE:
     UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values
     are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS",
     "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed image disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar lun: Specifies the logical unit number of the data disk. This value is used to identify
     data disks within the VM and therefore must be unique for each data disk attached to a VM.
     Required.
    :vartype lun: int
    """

    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the logical unit number of the data disk. This value is used to identify data disks
     within the VM and therefore must be unique for each data disk attached to a VM. Required."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        snapshot: Optional["_models.SubResource"] = None,
        managed_disk: Optional["_models.SubResource"] = None,
        blob_uri: Optional[str] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        disk_size_gb: Optional[int] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = 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 ImageDeprecationStatus(_Model):
    """Describes image deprecation status properties on the image.

    :ivar image_state: Describes the state of the image. Known values are: "Active",
     "ScheduledForDeprecation", and "Deprecated".
    :vartype image_state: str or ~azure.mgmt.compute.models.ImageState
    :ivar scheduled_deprecation_time: The time, in future, at which this image will be marked as
     deprecated. This scheduled time is chosen by the Publisher.
    :vartype scheduled_deprecation_time: ~datetime.datetime
    :ivar alternative_option: Describes the alternative option specified by the Publisher for this
     image when this image is deprecated.
    :vartype alternative_option: ~azure.mgmt.compute.models.AlternativeOption
    """

    image_state: Optional[Union[str, "_models.ImageState"]] = rest_field(
        name="imageState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the state of the image. Known values are: \"Active\", \"ScheduledForDeprecation\",
     and \"Deprecated\"."""
    scheduled_deprecation_time: Optional[datetime.datetime] = rest_field(
        name="scheduledDeprecationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time, in future, at which this image will be marked as deprecated. This scheduled time is
     chosen by the Publisher."""
    alternative_option: Optional["_models.AlternativeOption"] = rest_field(
        name="alternativeOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the alternative option specified by the Publisher for this image when this image is
     deprecated."""

    @overload
    def __init__(
        self,
        *,
        image_state: Optional[Union[str, "_models.ImageState"]] = None,
        scheduled_deprecation_time: Optional[datetime.datetime] = None,
        alternative_option: Optional["_models.AlternativeOption"] = 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 ImageDiskReference(_Model):
    """The source image used for creating the disk.

    :ivar id: A relative uri containing either a Platform Image Repository, user image, or Azure
     Compute Gallery image reference.
    :vartype id: str
    :ivar shared_gallery_image_id: A relative uri containing a direct shared Azure Compute Gallery
     image reference.
    :vartype shared_gallery_image_id: str
    :ivar community_gallery_image_id: A relative uri containing a community Azure Compute Gallery
     image reference.
    :vartype community_gallery_image_id: str
    :ivar lun: If the disk is created from an image's data disk, this is an index that indicates
     which of the data disks in the image to use. For OS disks, this field is null.
    :vartype lun: int
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A relative uri containing either a Platform Image Repository, user image, or Azure Compute
     Gallery image reference."""
    shared_gallery_image_id: Optional[str] = rest_field(
        name="sharedGalleryImageId", visibility=["read", "create", "update", "delete", "query"]
    )
    """A relative uri containing a direct shared Azure Compute Gallery image reference."""
    community_gallery_image_id: Optional[str] = rest_field(
        name="communityGalleryImageId", visibility=["read", "create", "update", "delete", "query"]
    )
    """A relative uri containing a community Azure Compute Gallery image reference."""
    lun: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If the disk is created from an image's data disk, this is an index that indicates which of the
     data disks in the image to use. For OS disks, this field is null."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        shared_gallery_image_id: Optional[str] = None,
        community_gallery_image_id: Optional[str] = None,
        lun: 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 ImageOSDisk(ImageDisk):
    """Describes an Operating System disk.

    :ivar snapshot: The snapshot.
    :vartype snapshot: ~azure.mgmt.compute.models.SubResource
    :ivar managed_disk: The managedDisk.
    :vartype managed_disk: ~azure.mgmt.compute.models.SubResource
    :ivar blob_uri: The Virtual Hard Disk.
    :vartype blob_uri: str
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar disk_size_gb: Specifies the size of empty data disks in gigabytes. This element can be
     used to overwrite the name of the disk in a virtual machine image. This value cannot be larger
     than 1023 GB.
    :vartype disk_size_gb: int
    :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE:
     UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values
     are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS",
     "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed image disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**.
     Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar os_state: The OS State. For managed images, use Generalized. Required. Known values are:
     "Generalized" and "Specialized".
    :vartype os_state: str or ~azure.mgmt.compute.models.OperatingSystemStateTypes
    """

    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk if creating
     a VM from a custom image. Possible values are: **Windows,** **Linux.**. Required. Known values
     are: \"Windows\" and \"Linux\"."""
    os_state: Union[str, "_models.OperatingSystemStateTypes"] = rest_field(
        name="osState", visibility=["read", "create", "update", "delete", "query"]
    )
    """The OS State. For managed images, use Generalized. Required. Known values are: \"Generalized\"
     and \"Specialized\"."""

    @overload
    def __init__(
        self,
        *,
        os_type: Union[str, "_models.OperatingSystemTypes"],
        os_state: Union[str, "_models.OperatingSystemStateTypes"],
        snapshot: Optional["_models.SubResource"] = None,
        managed_disk: Optional["_models.SubResource"] = None,
        blob_uri: Optional[str] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        disk_size_gb: Optional[int] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = 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 ImageProperties(_Model):
    """Describes the properties of an Image.

    :ivar source_virtual_machine: The source virtual machine from which Image is created.
    :vartype source_virtual_machine: ~azure.mgmt.compute.models.SubResource
    :ivar storage_profile: Specifies the storage settings for the virtual machine disks.
    :vartype storage_profile: ~azure.mgmt.compute.models.ImageStorageProfile
    :ivar provisioning_state: The provisioning state.
    :vartype provisioning_state: str
    :ivar hyper_v_generation: Specifies the HyperVGenerationType of the VirtualMachine created from
     the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to
     specify the value, if the source is managed resource like disk or snapshot, we may require the
     user to specify the property if we cannot deduce it from the source managed resource. Known
     values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGenerationTypes
    """

    source_virtual_machine: Optional["_models.SubResource"] = rest_field(
        name="sourceVirtualMachine", visibility=["read", "create", "update", "delete", "query"]
    )
    """The source virtual machine from which Image is created."""
    storage_profile: Optional["_models.ImageStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage settings for the virtual machine disks."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationTypes"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API
     Version 2019-03-01 if the image source is a blob, then we need the user to specify the value,
     if the source is managed resource like disk or snapshot, we may require the user to specify the
     property if we cannot deduce it from the source managed resource. Known values are: \"V1\" and
     \"V2\"."""

    @overload
    def __init__(
        self,
        *,
        source_virtual_machine: Optional["_models.SubResource"] = None,
        storage_profile: Optional["_models.ImageStorageProfile"] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationTypes"]] = 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 ImagePurchasePlan(_Model):
    """Describes the gallery image definition purchase plan. This is used by marketplace images.

    :ivar name: The plan ID.
    :vartype name: str
    :ivar publisher: The publisher ID.
    :vartype publisher: str
    :ivar product: The product ID.
    :vartype product: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan ID."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publisher ID."""
    product: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The product ID."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        publisher: Optional[str] = None,
        product: 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 ImageReference(SubResource):
    """Specifies information about the image to use. You can specify information about platform
    images, marketplace images, or virtual machine images. This element is required when you want
    to use a platform image, marketplace image, or virtual machine image, but is not used in other
    creation operations. NOTE: Image reference publisher and offer can only be set when you create
    the scale set.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar publisher: The image publisher.
    :vartype publisher: str
    :ivar offer: Specifies the offer of the platform image or marketplace image used to create the
     virtual machine.
    :vartype offer: str
    :ivar sku: The image SKU.
    :vartype sku: str
    :ivar version: Specifies the version of the platform image or marketplace image used to create
     the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and
     Build are decimal numbers. Specify 'latest' to use the latest version of an image available at
     deploy time. Even if you use 'latest', the VM image will not automatically update after deploy
     time even if a new version becomes available. Please do not use field 'version' for gallery
     image deployment, gallery image should always use 'id' field for deployment, to use 'latest'
     version of gallery image, just set
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'
     in the 'id' field without version input.
    :vartype version: str
    :ivar exact_version: Specifies in decimal numbers, the version of platform image or marketplace
     image used to create the virtual machine. This readonly field differs from 'version', only if
     the value specified in 'version' field is 'latest'.
    :vartype exact_version: str
    :ivar shared_gallery_image_id: Specified the shared gallery image unique id for vm deployment.
     This can be fetched from shared gallery image GET call.
    :vartype shared_gallery_image_id: str
    :ivar community_gallery_image_id: Specified the community gallery image unique id for vm
     deployment. This can be fetched from community gallery image GET call.
    :vartype community_gallery_image_id: str
    """

    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The image publisher."""
    offer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the offer of the platform image or marketplace image used to create the virtual
     machine."""
    sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The image SKU."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the version of the platform image or marketplace image used to create the virtual
     machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are
     decimal numbers. Specify 'latest' to use the latest version of an image available at deploy
     time. Even if you use 'latest', the VM image will not automatically update after deploy time
     even if a new version becomes available. Please do not use field 'version' for gallery image
     deployment, gallery image should always use 'id' field for deployment, to use 'latest' version
     of gallery image, just set
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'
     in the 'id' field without version input."""
    exact_version: Optional[str] = rest_field(name="exactVersion", visibility=["read"])
    """Specifies in decimal numbers, the version of platform image or marketplace image used to create
     the virtual machine. This readonly field differs from 'version', only if the value specified in
     'version' field is 'latest'."""
    shared_gallery_image_id: Optional[str] = rest_field(
        name="sharedGalleryImageId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specified the shared gallery image unique id for vm deployment. This can be fetched from shared
     gallery image GET call."""
    community_gallery_image_id: Optional[str] = rest_field(
        name="communityGalleryImageId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specified the community gallery image unique id for vm deployment. This can be fetched from
     community gallery image GET call."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        publisher: Optional[str] = None,
        offer: Optional[str] = None,
        sku: Optional[str] = None,
        version: Optional[str] = None,
        shared_gallery_image_id: Optional[str] = None,
        community_gallery_image_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 ImageStorageProfile(_Model):
    """Describes a storage profile.

    :ivar os_disk: Specifies information about the operating system disk used by the virtual
     machine. <br><br> For more information about disks, see `About disks and VHDs for Azure virtual
     machines <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype os_disk: ~azure.mgmt.compute.models.ImageOSDisk
    :ivar data_disks: Specifies the parameters that are used to add a data disk to a virtual
     machine. <br><br> For more information about disks, see `About disks and VHDs for Azure virtual
     machines <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype data_disks: list[~azure.mgmt.compute.models.ImageDataDisk]
    :ivar zone_resilient: Specifies whether an image is zone resilient or not. Default is false.
     Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
    :vartype zone_resilient: bool
    """

    os_disk: Optional["_models.ImageOSDisk"] = rest_field(
        name="osDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the operating system disk used by the virtual machine. <br><br> For
     more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    data_disks: Optional[list["_models.ImageDataDisk"]] = rest_field(
        name="dataDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For
     more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    zone_resilient: Optional[bool] = rest_field(
        name="zoneResilient", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether an image is zone resilient or not. Default is false. Zone resilient images
     can be created only in regions that provide Zone Redundant Storage (ZRS)."""

    @overload
    def __init__(
        self,
        *,
        os_disk: Optional["_models.ImageOSDisk"] = None,
        data_disks: Optional[list["_models.ImageDataDisk"]] = None,
        zone_resilient: 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 ImageUpdate(UpdateResource):
    """The source user image virtual hard disk. Only tags may be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of an Image.
    :vartype properties: ~azure.mgmt.compute.models.ImageProperties
    """

    properties: Optional["_models.ImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of an Image."""

    __flattened_items = ["source_virtual_machine", "storage_profile", "provisioning_state", "hyper_v_generation"]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.ImageProperties"] = 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 ImageVersionSecurityProfile(_Model):
    """The security profile of a gallery image version.

    :ivar uefi_settings: Contains UEFI settings for the image version.
    :vartype uefi_settings: ~azure.mgmt.compute.models.GalleryImageVersionUefiSettings
    """

    uefi_settings: Optional["_models.GalleryImageVersionUefiSettings"] = rest_field(
        name="uefiSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains UEFI settings for the image version."""

    @overload
    def __init__(
        self,
        *,
        uefi_settings: Optional["_models.GalleryImageVersionUefiSettings"] = 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 InnerError(_Model):
    """Inner error details.

    :ivar exceptiontype: The exception type.
    :vartype exceptiontype: str
    :ivar errordetail: The internal error message or exception dump.
    :vartype errordetail: str
    """

    exceptiontype: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The exception type."""
    errordetail: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The internal error message or exception dump."""

    @overload
    def __init__(
        self,
        *,
        exceptiontype: Optional[str] = None,
        errordetail: 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 InstanceViewStatus(_Model):
    """Instance view status.

    :ivar code: The status code.
    :vartype code: str
    :ivar level: The level code. Known values are: "Info", "Warning", and "Error".
    :vartype level: str or ~azure.mgmt.compute.models.StatusLevelTypes
    :ivar display_status: The short localizable label for the status.
    :vartype display_status: str
    :ivar message: The detailed status message, including for alerts and error messages.
    :vartype message: str
    :ivar time: The time of the status.
    :vartype time: ~datetime.datetime
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status code."""
    level: Optional[Union[str, "_models.StatusLevelTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The level code. Known values are: \"Info\", \"Warning\", and \"Error\"."""
    display_status: Optional[str] = rest_field(
        name="displayStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The short localizable label for the status."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The detailed status message, including for alerts and error messages."""
    time: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time of the status."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        level: Optional[Union[str, "_models.StatusLevelTypes"]] = None,
        display_status: Optional[str] = None,
        message: Optional[str] = None,
        time: 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 InterconnectBlock(TrackedResource):
    """Specifies information about the Interconnect Block.

    :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.compute.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: Properties of the Interconnect Block.
    :vartype properties: ~azure.mgmt.compute.models.InterconnectBlockProperties
    :ivar sku: SKU of the resource for which capacity needs to be pre-allocated. Both ``sku.name``
     and ``sku.capacity`` are required at create. After create, only ``sku.capacity`` can be
     updated. Required.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    :ivar placement: Placement section specifies the user-defined constraints for Interconnect
     Block hardware placement. This property cannot be changed once Interconnect Block is
     provisioned.
    :vartype placement: ~azure.mgmt.compute.models.Placement
    """

    properties: Optional["_models.InterconnectBlockProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the Interconnect Block."""
    sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SKU of the resource for which capacity needs to be pre-allocated. Both ``sku.name`` and
     ``sku.capacity`` are required at create. After create, only ``sku.capacity`` can be updated.
     Required."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Placement section specifies the user-defined constraints for Interconnect Block hardware
     placement. This property cannot be changed once Interconnect Block is provisioned."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        sku: "_models.Sku",
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.InterconnectBlockProperties"] = None,
        zones: Optional[list[str]] = None,
        placement: Optional["_models.Placement"] = 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 InterconnectBlockInstanceView(_Model):
    """The instance view of an Interconnect Block.

    :ivar current_capacity: The current capacity allocated for this Interconnect Block.
    :vartype current_capacity: int
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    current_capacity: Optional[int] = rest_field(name="currentCapacity", visibility=["read"])
    """The current capacity allocated for this Interconnect Block."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(visibility=["read"])
    """The resource status information."""


class InterconnectBlockProfile(_Model):
    """The parameters of an Interconnect Block Profile.

    :ivar interconnect_block: Specifies the Interconnect Block resource ID that should be used for
     allocating the Virtual Machine or Scale Set VM instances provided enough capacity has been
     reserved.
    :vartype interconnect_block: ~azure.mgmt.compute.models.ApiEntityReference
    """

    interconnect_block: Optional["_models.ApiEntityReference"] = rest_field(
        name="interconnectBlock", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Interconnect Block resource ID that should be used for allocating the Virtual
     Machine or Scale Set VM instances provided enough capacity has been reserved."""

    @overload
    def __init__(
        self,
        *,
        interconnect_block: Optional["_models.ApiEntityReference"] = 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 InterconnectBlockProperties(_Model):
    """Properties of the Interconnect Block.

    :ivar virtual_machines_associated: A list of all virtual machine resource ids that are
     associated with the Interconnect Block.
    :vartype virtual_machines_associated: list[~azure.mgmt.compute.models.SubResourceReadOnly]
    :ivar interconnect_group: The Microsoft.Network/interconnectGroups resource that this
     Interconnect Block is associated with. Required at create and immutable thereafter. Required.
    :vartype interconnect_group: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar interconnect_block_id: A unique id (GUID) generated and assigned to the Interconnect
     Block by the platform which does not change throughout the lifetime of the resource.
    :vartype interconnect_block_id: str
    :ivar provisioning_time: The date time when the Interconnect Block was last updated.
    :vartype provisioning_time: ~datetime.datetime
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar instance_view: The Interconnect Block instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.InterconnectBlockInstanceView
    :ivar time_created: Specifies the time at which the Interconnect Block resource was created.
    :vartype time_created: ~datetime.datetime
    """

    virtual_machines_associated: Optional[list["_models.SubResourceReadOnly"]] = rest_field(
        name="virtualMachinesAssociated", visibility=["read"]
    )
    """A list of all virtual machine resource ids that are associated with the Interconnect Block."""
    interconnect_group: "_models.ApiEntityReference" = rest_field(
        name="interconnectGroup", visibility=["read", "create"]
    )
    """The Microsoft.Network/interconnectGroups resource that this Interconnect Block is associated
     with. Required at create and immutable thereafter. Required."""
    interconnect_block_id: Optional[str] = rest_field(name="interconnectBlockId", visibility=["read"])
    """A unique id (GUID) generated and assigned to the Interconnect Block by the platform which does
     not change throughout the lifetime of the resource."""
    provisioning_time: Optional[datetime.datetime] = rest_field(
        name="provisioningTime", visibility=["read"], format="rfc3339"
    )
    """The date time when the Interconnect Block was last updated."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    instance_view: Optional["_models.InterconnectBlockInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The Interconnect Block instance view."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Interconnect Block resource was created."""

    @overload
    def __init__(
        self,
        *,
        interconnect_group: "_models.ApiEntityReference",
    ) -> 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 InterconnectBlockUpdate(UpdateResource):
    """Specifies information about the Interconnect Block. Only tags and sku.capacity can be updated.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar sku: SKU of the resource for which capacity needs to be pre-allocated. Only
     ``sku.capacity`` is mutable; ``sku.name`` is immutable.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    """

    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SKU of the resource for which capacity needs to be pre-allocated. Only ``sku.capacity`` is
     mutable; ``sku.name`` is immutable."""

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        sku: Optional["_models.Sku"] = 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 InterconnectGroupProfile(_Model):
    """Specifies the interconnect group profile for a virtual machine, used to associate the VM with
    an interconnect group and subgroups.

    :ivar interconnect_group: Reference to the interconnect group resource.
    :vartype interconnect_group: ~azure.mgmt.compute.models.SubResource
    :ivar subgroups: The list of subgroup references within the interconnect group.
    :vartype subgroups: list[~azure.mgmt.compute.models.SubResource]
    """

    interconnect_group: Optional["_models.SubResource"] = rest_field(
        name="interconnectGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Reference to the interconnect group resource."""
    subgroups: Optional[list["_models.SubResource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of subgroup references within the interconnect group."""

    @overload
    def __init__(
        self,
        *,
        interconnect_group: Optional["_models.SubResource"] = None,
        subgroups: Optional[list["_models.SubResource"]] = 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 InterconnectInstanceView(_Model):
    """The Interconnect Block instance view details for a Virtual Machine or Scale Set VM instance.

    :ivar interconnect_subgroup_id: The ID (GUID) of the Interconnect subgroup in which the Virtual
     Machine was placed.
    :vartype interconnect_subgroup_id: str
    """

    interconnect_subgroup_id: Optional[str] = rest_field(name="interconnectSubgroupId", visibility=["read"])
    """The ID (GUID) of the Interconnect subgroup in which the Virtual Machine was placed."""


class KeyForDiskEncryptionSet(_Model):
    """Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots.

    :ivar source_vault: Resource id of the KeyVault containing the key or secret. This property is
     optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption
     Set subscription.
    :vartype source_vault: ~azure.mgmt.compute.models.SourceVault
    :ivar key_url: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the
     Url is required regardless of rotationToLatestKeyVersionEnabled value. Required.
    :vartype key_url: str
    """

    source_vault: Optional["_models.SourceVault"] = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource id of the KeyVault containing the key or secret. This property is optional and cannot
     be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription."""
    key_url: str = rest_field(name="keyUrl", visibility=["read", "create", "update", "delete", "query"])
    """Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required
     regardless of rotationToLatestKeyVersionEnabled value. Required."""

    @overload
    def __init__(
        self,
        *,
        key_url: str,
        source_vault: Optional["_models.SourceVault"] = 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 KeyVaultAndKeyReference(_Model):
    """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the
    encryptionKey.

    :ivar source_vault: Resource id of the KeyVault containing the key or secret. Required.
    :vartype source_vault: ~azure.mgmt.compute.models.SourceVault
    :ivar key_url: Url pointing to a key or secret in KeyVault. Required.
    :vartype key_url: str
    """

    source_vault: "_models.SourceVault" = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource id of the KeyVault containing the key or secret. Required."""
    key_url: str = rest_field(name="keyUrl", visibility=["read", "create", "update", "delete", "query"])
    """Url pointing to a key or secret in KeyVault. Required."""

    @overload
    def __init__(
        self,
        *,
        source_vault: "_models.SourceVault",
        key_url: 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 KeyVaultAndSecretReference(_Model):
    """Key Vault Secret Url and vault id of the encryption key.

    :ivar source_vault: Resource id of the KeyVault containing the key or secret. Required.
    :vartype source_vault: ~azure.mgmt.compute.models.SourceVault
    :ivar secret_url: Url pointing to a key or secret in KeyVault. Required.
    :vartype secret_url: str
    """

    source_vault: "_models.SourceVault" = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource id of the KeyVault containing the key or secret. Required."""
    secret_url: str = rest_field(name="secretUrl", visibility=["read", "create", "update", "delete", "query"])
    """Url pointing to a key or secret in KeyVault. Required."""

    @overload
    def __init__(
        self,
        *,
        source_vault: "_models.SourceVault",
        secret_url: 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 KeyVaultKeyReference(_Model):
    """Describes a reference to Key Vault Key.

    :ivar key_url: The URL referencing a key encryption key in Key Vault. Required.
    :vartype key_url: str
    :ivar source_vault: The relative URL of the Key Vault containing the key. Required.
    :vartype source_vault: ~azure.mgmt.compute.models.SubResource
    """

    key_url: str = rest_field(name="keyUrl", visibility=["read", "create", "update", "delete", "query"])
    """The URL referencing a key encryption key in Key Vault. Required."""
    source_vault: "_models.SubResource" = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The relative URL of the Key Vault containing the key. Required."""

    @overload
    def __init__(
        self,
        *,
        key_url: str,
        source_vault: "_models.SubResource",
    ) -> 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 KeyVaultSecretReference(_Model):
    """Describes a reference to Key Vault Secret.

    :ivar secret_url: The URL referencing a secret in a Key Vault. Required.
    :vartype secret_url: str
    :ivar source_vault: The relative URL of the Key Vault containing the secret. Required.
    :vartype source_vault: ~azure.mgmt.compute.models.SubResource
    """

    secret_url: str = rest_field(name="secretUrl", visibility=["read", "create", "update", "delete", "query"])
    """The URL referencing a secret in a Key Vault. Required."""
    source_vault: "_models.SubResource" = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The relative URL of the Key Vault containing the secret. Required."""

    @overload
    def __init__(
        self,
        *,
        secret_url: str,
        source_vault: "_models.SubResource",
    ) -> 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 LastPatchInstallationSummary(_Model):
    """Describes the properties of the last installed patch summary.

    :ivar status: The overall success or failure status of the operation. It remains "InProgress"
     until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded",
     or "CompletedWithWarnings.". Known values are: "Unknown", "InProgress", "Failed", "Succeeded",
     and "CompletedWithWarnings".
    :vartype status: str or ~azure.mgmt.compute.models.PatchOperationStatus
    :ivar installation_activity_id: The activity ID of the operation that produced this result. It
     is used to correlate across CRP and extension logs.
    :vartype installation_activity_id: str
    :ivar maintenance_window_exceeded: Describes whether the operation ran out of time before it
     completed all its intended actions.
    :vartype maintenance_window_exceeded: bool
    :ivar not_selected_patch_count: The number of all available patches but not going to be
     installed because it didn't match a classification or inclusion list entry.
    :vartype not_selected_patch_count: int
    :ivar excluded_patch_count: The number of all available patches but excluded explicitly by a
     customer-specified exclusion list match.
    :vartype excluded_patch_count: int
    :ivar pending_patch_count: The number of all available patches expected to be installed over
     the course of the patch installation operation.
    :vartype pending_patch_count: int
    :ivar installed_patch_count: The count of patches that successfully installed.
    :vartype installed_patch_count: int
    :ivar failed_patch_count: The count of patches that failed installation.
    :vartype failed_patch_count: int
    :ivar start_time: The UTC timestamp when the operation began.
    :vartype start_time: ~datetime.datetime
    :ivar last_modified_time: The UTC timestamp when the operation began.
    :vartype last_modified_time: ~datetime.datetime
    :ivar error: The errors that were encountered during execution of the operation. The details
     array contains the list of them.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    status: Optional[Union[str, "_models.PatchOperationStatus"]] = rest_field(visibility=["read"])
    """The overall success or failure status of the operation. It remains \"InProgress\" until the
     operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or
     \"CompletedWithWarnings.\". Known values are: \"Unknown\", \"InProgress\", \"Failed\",
     \"Succeeded\", and \"CompletedWithWarnings\"."""
    installation_activity_id: Optional[str] = rest_field(name="installationActivityId", visibility=["read"])
    """The activity ID of the operation that produced this result. It is used to correlate across CRP
     and extension logs."""
    maintenance_window_exceeded: Optional[bool] = rest_field(name="maintenanceWindowExceeded", visibility=["read"])
    """Describes whether the operation ran out of time before it completed all its intended actions."""
    not_selected_patch_count: Optional[int] = rest_field(name="notSelectedPatchCount", visibility=["read"])
    """The number of all available patches but not going to be installed because it didn't match a
     classification or inclusion list entry."""
    excluded_patch_count: Optional[int] = rest_field(name="excludedPatchCount", visibility=["read"])
    """The number of all available patches but excluded explicitly by a customer-specified exclusion
     list match."""
    pending_patch_count: Optional[int] = rest_field(name="pendingPatchCount", visibility=["read"])
    """The number of all available patches expected to be installed over the course of the patch
     installation operation."""
    installed_patch_count: Optional[int] = rest_field(name="installedPatchCount", visibility=["read"])
    """The count of patches that successfully installed."""
    failed_patch_count: Optional[int] = rest_field(name="failedPatchCount", visibility=["read"])
    """The count of patches that failed installation."""
    start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
    """The UTC timestamp when the operation began."""
    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp when the operation began."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """The errors that were encountered during execution of the operation. The details array contains
     the list of them."""


class LifecycleHook(_Model):
    """Describes a lifecycle hook.

    :ivar type: Specifies the type of the lifecycle hook. Known values are:
     "UpgradeAutoOSScheduling" and "UpgradeAutoOSRollingBatchStarting".
    :vartype type: str or ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventType
    :ivar wait_duration: Specifies the time duration a virtual machine scale set lifecycle hook
     event sent to the customer waits for a response from the customer. It should be in ISO 8601
     format.
    :vartype wait_duration: ~datetime.timedelta
    :ivar default_action: Specifies the action that will be applied to a target resource in the
     virtual machine scale set lifecycle hook event if the platform does not receive a response from
     the customer for the target resource before waitUntil. Known values are: "Approve" and
     "Reject".
    :vartype default_action: str or ~azure.mgmt.compute.models.LifecycleHookAction
    """

    type: Optional[Union[str, "_models.VMScaleSetLifecycleHookEventType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of the lifecycle hook. Known values are: \"UpgradeAutoOSScheduling\" and
     \"UpgradeAutoOSRollingBatchStarting\"."""
    wait_duration: Optional[datetime.timedelta] = rest_field(
        name="waitDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the time duration a virtual machine scale set lifecycle hook event sent to the
     customer waits for a response from the customer. It should be in ISO 8601 format."""
    default_action: Optional[Union[str, "_models.LifecycleHookAction"]] = rest_field(
        name="defaultAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the action that will be applied to a target resource in the virtual machine scale set
     lifecycle hook event if the platform does not receive a response from the customer for the
     target resource before waitUntil. Known values are: \"Approve\" and \"Reject\"."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.VMScaleSetLifecycleHookEventType"]] = None,
        wait_duration: Optional[datetime.timedelta] = None,
        default_action: Optional[Union[str, "_models.LifecycleHookAction"]] = 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 LifecycleHooksProfile(_Model):
    """Specifies the lifecycle hooks profile for the virtual machine scale set.

    :ivar lifecycle_hooks: Specifies the lifecycle hooks configured for the virtual machine scale
     set.
    :vartype lifecycle_hooks: list[~azure.mgmt.compute.models.LifecycleHook]
    """

    lifecycle_hooks: Optional[list["_models.LifecycleHook"]] = rest_field(
        name="lifecycleHooks", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the lifecycle hooks configured for the virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        lifecycle_hooks: Optional[list["_models.LifecycleHook"]] = 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 LinuxConfiguration(_Model):
    """Specifies the Linux operating system settings on the virtual machine. For a list of supported
    Linux distributions, see `Linux on Azure-Endorsed Distributions
    <https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros>`_.

    :ivar disable_password_authentication: Specifies whether password authentication should be
     disabled.
    :vartype disable_password_authentication: bool
    :ivar ssh: Specifies the ssh key configuration for a Linux OS.
    :vartype ssh: ~azure.mgmt.compute.models.SshConfiguration
    :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the
     virtual machine. When this property is not specified in the request body, default behavior is
     to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can
     be added to the VM later.
    :vartype provision_vm_agent: bool
    :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on
     Linux.
    :vartype patch_settings: ~azure.mgmt.compute.models.LinuxPatchSettings
    :ivar enable_vm_agent_platform_updates: Indicates whether VMAgent Platform Updates is enabled
     for the Linux virtual machine. Default value is false.
    :vartype enable_vm_agent_platform_updates: bool
    """

    disable_password_authentication: Optional[bool] = rest_field(
        name="disablePasswordAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether password authentication should be disabled."""
    ssh: Optional["_models.SshConfiguration"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the ssh key configuration for a Linux OS."""
    provision_vm_agent: Optional[bool] = rest_field(
        name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this
     property is not specified in the request body, default behavior is to set it to true. This will
     ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."""
    patch_settings: Optional["_models.LinuxPatchSettings"] = rest_field(
        name="patchSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """[Preview Feature] Specifies settings related to VM Guest Patching on Linux."""
    enable_vm_agent_platform_updates: Optional[bool] = rest_field(
        name="enableVMAgentPlatformUpdates", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default
     value is false."""

    @overload
    def __init__(
        self,
        *,
        disable_password_authentication: Optional[bool] = None,
        ssh: Optional["_models.SshConfiguration"] = None,
        provision_vm_agent: Optional[bool] = None,
        patch_settings: Optional["_models.LinuxPatchSettings"] = None,
        enable_vm_agent_platform_updates: 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 LinuxParameters(_Model):
    """Input for InstallPatches on a Linux VM, as directly received by the API.

    :ivar classifications_to_include: The update classifications to select when installing patches
     for Linux.
    :vartype classifications_to_include: list[str or
     ~azure.mgmt.compute.models.VMGuestPatchClassificationLinux]
    :ivar package_name_masks_to_include: packages to include in the patch operation. Format:
     packageName_packageVersion.
    :vartype package_name_masks_to_include: list[str]
    :ivar package_name_masks_to_exclude: packages to exclude in the patch operation. Format:
     packageName_packageVersion.
    :vartype package_name_masks_to_exclude: list[str]
    :ivar maintenance_run_id: This is used as a maintenance run identifier for Auto VM Guest
     Patching in Linux.
    :vartype maintenance_run_id: str
    """

    classifications_to_include: Optional[list[Union[str, "_models.VMGuestPatchClassificationLinux"]]] = rest_field(
        name="classificationsToInclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """The update classifications to select when installing patches for Linux."""
    package_name_masks_to_include: Optional[list[str]] = rest_field(
        name="packageNameMasksToInclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """packages to include in the patch operation. Format: packageName_packageVersion."""
    package_name_masks_to_exclude: Optional[list[str]] = rest_field(
        name="packageNameMasksToExclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """packages to exclude in the patch operation. Format: packageName_packageVersion."""
    maintenance_run_id: Optional[str] = rest_field(
        name="maintenanceRunId", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is used as a maintenance run identifier for Auto VM Guest Patching in Linux."""

    @overload
    def __init__(
        self,
        *,
        classifications_to_include: Optional[list[Union[str, "_models.VMGuestPatchClassificationLinux"]]] = None,
        package_name_masks_to_include: Optional[list[str]] = None,
        package_name_masks_to_exclude: Optional[list[str]] = None,
        maintenance_run_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 LinuxPatchSettings(_Model):
    """Specifies settings related to VM Guest Patching on Linux.

    :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual
     machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br
     /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching
     configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be
     automatically updated by the platform. The property provisionVMAgent must be true. Known values
     are: "ImageDefault" and "AutomaticByPlatform".
    :vartype patch_mode: str or ~azure.mgmt.compute.models.LinuxVMGuestPatchMode
    :ivar assessment_mode: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual
     machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing
     of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform
     will trigger periodic patch assessments. The property provisionVMAgent must be true. Known
     values are: "ImageDefault" and "AutomaticByPlatform".
    :vartype assessment_mode: str or ~azure.mgmt.compute.models.LinuxPatchAssessmentMode
    :ivar automatic_by_platform_settings: Specifies additional settings for patch mode
     AutomaticByPlatform in VM Guest Patching on Linux.
    :vartype automatic_by_platform_settings:
     ~azure.mgmt.compute.models.LinuxVMGuestPatchAutomaticByPlatformSettings
    """

    patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = rest_field(
        name="patchMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated
     to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values
     are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is
     used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated
     by the platform. The property provisionVMAgent must be true. Known values are: \"ImageDefault\"
     and \"AutomaticByPlatform\"."""
    assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = rest_field(
        name="assessmentMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br />
     Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments
     on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic
     patch assessments. The property provisionVMAgent must be true. Known values are:
     \"ImageDefault\" and \"AutomaticByPlatform\"."""
    automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = rest_field(
        name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux."""

    @overload
    def __init__(
        self,
        *,
        patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = None,
        assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = None,
        automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = 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 LinuxVMGuestPatchAutomaticByPlatformSettings(_Model):  # pylint: disable=name-too-long
    """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in
    Linux patch settings.

    :ivar reboot_setting: Specifies the reboot setting for all AutomaticByPlatform patch
     installation operations. Known values are: "Unknown", "IfRequired", "Never", and "Always".
    :vartype reboot_setting: str or
     ~azure.mgmt.compute.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting
    :ivar bypass_platform_safety_checks_on_user_schedule: Enables customer to schedule patching
     without accidental upgrades.
    :vartype bypass_platform_safety_checks_on_user_schedule: bool
    """

    reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field(
        name="rebootSetting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known
     values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\"."""
    bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field(
        name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables customer to schedule patching without accidental upgrades."""

    @overload
    def __init__(
        self,
        *,
        reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = None,
        bypass_platform_safety_checks_on_user_schedule: 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 LogAnalyticsInputBase(_Model):
    """Api input base class for LogAnalytics Api.

    :ivar blob_container_sas_uri: SAS Uri of the logging blob container to which LogAnalytics Api
     writes output logs to. Required.
    :vartype blob_container_sas_uri: str
    :ivar from_time: From time of the query. Required.
    :vartype from_time: ~datetime.datetime
    :ivar to_time: To time of the query. Required.
    :vartype to_time: ~datetime.datetime
    :ivar group_by_throttle_policy: Group query result by Throttle Policy applied.
    :vartype group_by_throttle_policy: bool
    :ivar group_by_operation_name: Group query result by Operation Name.
    :vartype group_by_operation_name: bool
    :ivar group_by_resource_name: Group query result by Resource Name.
    :vartype group_by_resource_name: bool
    :ivar group_by_client_application_id: Group query result by Client Application ID.
    :vartype group_by_client_application_id: bool
    :ivar group_by_user_agent: Group query result by User Agent.
    :vartype group_by_user_agent: bool
    """

    blob_container_sas_uri: str = rest_field(
        name="blobContainerSasUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
     Required."""
    from_time: datetime.datetime = rest_field(
        name="fromTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """From time of the query. Required."""
    to_time: datetime.datetime = rest_field(
        name="toTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """To time of the query. Required."""
    group_by_throttle_policy: Optional[bool] = rest_field(
        name="groupByThrottlePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Group query result by Throttle Policy applied."""
    group_by_operation_name: Optional[bool] = rest_field(
        name="groupByOperationName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Group query result by Operation Name."""
    group_by_resource_name: Optional[bool] = rest_field(
        name="groupByResourceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Group query result by Resource Name."""
    group_by_client_application_id: Optional[bool] = rest_field(
        name="groupByClientApplicationId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Group query result by Client Application ID."""
    group_by_user_agent: Optional[bool] = rest_field(
        name="groupByUserAgent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Group query result by User Agent."""

    @overload
    def __init__(
        self,
        *,
        blob_container_sas_uri: str,
        from_time: datetime.datetime,
        to_time: datetime.datetime,
        group_by_throttle_policy: Optional[bool] = None,
        group_by_operation_name: Optional[bool] = None,
        group_by_resource_name: Optional[bool] = None,
        group_by_client_application_id: Optional[bool] = None,
        group_by_user_agent: 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 LogAnalyticsOperationResult(_Model):
    """LogAnalytics operation status response.

    :ivar properties: LogAnalyticsOutput.
    :vartype properties: ~azure.mgmt.compute.models.LogAnalyticsOutput
    """

    properties: Optional["_models.LogAnalyticsOutput"] = rest_field(visibility=["read"])
    """LogAnalyticsOutput."""


class LogAnalyticsOutput(_Model):
    """LogAnalytics output properties.

    :ivar output: Output file Uri path to blob container.
    :vartype output: str
    """

    output: Optional[str] = rest_field(visibility=["read"])
    """Output file Uri path to blob container."""


class MaintenanceRedeployStatus(_Model):
    """Maintenance Operation Status.

    :ivar is_customer_initiated_maintenance_allowed: True, if customer is allowed to perform
     Maintenance.
    :vartype is_customer_initiated_maintenance_allowed: bool
    :ivar pre_maintenance_window_start_time: Start Time for the Pre Maintenance Window.
    :vartype pre_maintenance_window_start_time: ~datetime.datetime
    :ivar pre_maintenance_window_end_time: End Time for the Pre Maintenance Window.
    :vartype pre_maintenance_window_end_time: ~datetime.datetime
    :ivar maintenance_window_start_time: Start Time for the Maintenance Window.
    :vartype maintenance_window_start_time: ~datetime.datetime
    :ivar maintenance_window_end_time: End Time for the Maintenance Window.
    :vartype maintenance_window_end_time: ~datetime.datetime
    :ivar last_operation_result_code: The Last Maintenance Operation Result Code. Known values are:
     "None", "RetryLater", "MaintenanceAborted", and "MaintenanceCompleted".
    :vartype last_operation_result_code: str or
     ~azure.mgmt.compute.models.MaintenanceOperationResultCodeTypes
    :ivar last_operation_message: Message returned for the last Maintenance Operation.
    :vartype last_operation_message: str
    """

    is_customer_initiated_maintenance_allowed: Optional[bool] = rest_field(
        name="isCustomerInitiatedMaintenanceAllowed", visibility=["read", "create", "update", "delete", "query"]
    )
    """True, if customer is allowed to perform Maintenance."""
    pre_maintenance_window_start_time: Optional[datetime.datetime] = rest_field(
        name="preMaintenanceWindowStartTime",
        visibility=["read", "create", "update", "delete", "query"],
        format="rfc3339",
    )
    """Start Time for the Pre Maintenance Window."""
    pre_maintenance_window_end_time: Optional[datetime.datetime] = rest_field(
        name="preMaintenanceWindowEndTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """End Time for the Pre Maintenance Window."""
    maintenance_window_start_time: Optional[datetime.datetime] = rest_field(
        name="maintenanceWindowStartTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Start Time for the Maintenance Window."""
    maintenance_window_end_time: Optional[datetime.datetime] = rest_field(
        name="maintenanceWindowEndTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """End Time for the Maintenance Window."""
    last_operation_result_code: Optional[Union[str, "_models.MaintenanceOperationResultCodeTypes"]] = rest_field(
        name="lastOperationResultCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Last Maintenance Operation Result Code. Known values are: \"None\", \"RetryLater\",
     \"MaintenanceAborted\", and \"MaintenanceCompleted\"."""
    last_operation_message: Optional[str] = rest_field(
        name="lastOperationMessage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Message returned for the last Maintenance Operation."""

    @overload
    def __init__(
        self,
        *,
        is_customer_initiated_maintenance_allowed: Optional[bool] = None,
        pre_maintenance_window_start_time: Optional[datetime.datetime] = None,
        pre_maintenance_window_end_time: Optional[datetime.datetime] = None,
        maintenance_window_start_time: Optional[datetime.datetime] = None,
        maintenance_window_end_time: Optional[datetime.datetime] = None,
        last_operation_result_code: Optional[Union[str, "_models.MaintenanceOperationResultCodeTypes"]] = None,
        last_operation_message: 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 ManagedDiskParameters(SubResource):
    """The parameters of a managed disk.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE:
     UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values
     are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS",
     "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar security_profile: Specifies the security profile for the managed disk.
    :vartype security_profile: ~azure.mgmt.compute.models.VMDiskSecurityProfile
    """

    storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used
     with data disks, it cannot be used with OS Disk. Known values are: \"Standard_LRS\",
     \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\",
     and \"PremiumV2_LRS\"."""
    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the customer managed disk encryption set resource id for the managed disk."""
    security_profile: Optional["_models.VMDiskSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the security profile for the managed disk."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None,
        security_profile: Optional["_models.VMDiskSecurityProfile"] = 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 MaxInstancePercentPerZonePolicy(_Model):
    """The configuration parameters used to limit the number of virtual machines per availability zone
    in the virtual machine scale set.

    :ivar enabled: Specifies whether maxInstancePercentPerZonePolicy should be enabled on the
     virtual machine scale set.
    :vartype enabled: bool
    :ivar value: Limit on the number of instances in each zone as a percentage of the total
     capacity of the virtual machine scale set.
    :vartype value: int
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether maxInstancePercentPerZonePolicy should be enabled on the virtual machine
     scale set."""
    value: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Limit on the number of instances in each zone as a percentage of the total capacity of the
     virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        value: 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 MigrateToVirtualMachineScaleSetInput(_Model):
    """Describes the Virtual Machine Scale Set to migrate from Availability Set.

    :ivar virtual_machine_scale_set_flexible: Specifies information about the Virtual Machine Scale
     Set that the Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01. Required.
    :vartype virtual_machine_scale_set_flexible: ~azure.mgmt.compute.models.SubResource
    """

    virtual_machine_scale_set_flexible: "_models.SubResource" = rest_field(
        name="virtualMachineScaleSetFlexible", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the Virtual Machine Scale Set that the Availability Set should be
     migrated to. Minimum api‐version: 2024‐11‐01. Required."""

    @overload
    def __init__(
        self,
        *,
        virtual_machine_scale_set_flexible: "_models.SubResource",
    ) -> 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 MigrateVMToVirtualMachineScaleSetInput(_Model):
    """The input of virtual machine migration from Availability Set to Flexible Virtual Machine Scale
    Set.

    :ivar target_zone: The target zone of VM migration to Flexible Virtual Machine Scale Set.
    :vartype target_zone: str
    :ivar target_fault_domain: The target compute fault domain of VM migration to Flexible Virtual
     Machine Scale Set.
    :vartype target_fault_domain: int
    :ivar target_vm_size: The target Virtual Machine size of VM migration to Flexible Virtual
     Machine Scale Set.
    :vartype target_vm_size: str
    """

    target_zone: Optional[str] = rest_field(
        name="targetZone", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target zone of VM migration to Flexible Virtual Machine Scale Set."""
    target_fault_domain: Optional[int] = rest_field(
        name="targetFaultDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target compute fault domain of VM migration to Flexible Virtual Machine Scale Set."""
    target_vm_size: Optional[str] = rest_field(
        name="targetVMSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target Virtual Machine size of VM migration to Flexible Virtual Machine Scale Set."""

    @overload
    def __init__(
        self,
        *,
        target_zone: Optional[str] = None,
        target_fault_domain: Optional[int] = None,
        target_vm_size: 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 NetworkInterfaceReference(SubResource):
    """Describes a network interface reference.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar properties: Describes a network interface reference properties.
    :vartype properties: ~azure.mgmt.compute.models.NetworkInterfaceReferenceProperties
    """

    properties: Optional["_models.NetworkInterfaceReferenceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a network interface reference properties."""

    __flattened_items = ["primary", "delete_option"]

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        properties: Optional["_models.NetworkInterfaceReferenceProperties"] = 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 NetworkInterfaceReferenceProperties(_Model):
    """Describes a network interface reference properties.

    :ivar primary: Specifies the primary network interface in case the virtual machine has more
     than 1 network interface.
    :vartype primary: bool
    :ivar delete_option: Specify what happens to the network interface when the VM is deleted.
     Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    """

    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary network interface in case the virtual machine has more than 1 network
     interface."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the network interface when the VM is deleted. Known values are:
     \"Delete\" and \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        primary: Optional[bool] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = 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 NetworkProfile(_Model):
    """Specifies the network interfaces or the networking configuration of the virtual machine.

    :ivar network_interfaces: Specifies the list of resource Ids for the network interfaces
     associated with the virtual machine.
    :vartype network_interfaces: list[~azure.mgmt.compute.models.NetworkInterfaceReference]
    :ivar network_api_version: specifies the Microsoft.Network API version used when creating
     networking resources in the Network Interface Configurations. Known values are: "2020-11-01"
     and "2022-11-01".
    :vartype network_api_version: str or ~azure.mgmt.compute.models.NetworkApiVersion
    :ivar network_interface_configurations: Specifies the networking configurations that will be
     used to create the virtual machine networking resources.
    :vartype network_interface_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineNetworkInterfaceConfiguration]
    :ivar interconnect_group_profile: Specifies the interconnect group profile to associate with
     the virtual machine. Minimum api-version: 2026-03-01.
    :vartype interconnect_group_profile: ~azure.mgmt.compute.models.InterconnectGroupProfile
    """

    network_interfaces: Optional[list["_models.NetworkInterfaceReference"]] = rest_field(
        name="networkInterfaces", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource Ids for the network interfaces associated with the virtual
     machine."""
    network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field(
        name="networkApiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """specifies the Microsoft.Network API version used when creating networking resources in the
     Network Interface Configurations. Known values are: \"2020-11-01\" and \"2022-11-01\"."""
    network_interface_configurations: Optional[list["_models.VirtualMachineNetworkInterfaceConfiguration"]] = (
        rest_field(name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"])
    )
    """Specifies the networking configurations that will be used to create the virtual machine
     networking resources."""
    interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = rest_field(
        name="interconnectGroupProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the interconnect group profile to associate with the virtual machine. Minimum
     api-version: 2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        network_interfaces: Optional[list["_models.NetworkInterfaceReference"]] = None,
        network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = None,
        network_interface_configurations: Optional[list["_models.VirtualMachineNetworkInterfaceConfiguration"]] = None,
        interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = 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 Operation(_Model):
    """REST API Operation.

    :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
     "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
    :vartype name: str
    :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for
     data-plane operations and "false" for Azure Resource Manager/control-plane operations.
    :vartype is_data_action: bool
    :ivar display: Localized display information for this particular operation.
    :vartype display: ~azure.mgmt.compute.models.OperationDisplay
    :ivar origin: The intended executor of the operation; as in Resource Based Access Control
     (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system",
     and "user,system".
    :vartype origin: str or ~azure.mgmt.compute.models.Origin
    :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions
     that are for internal only APIs. "Internal"
    :vartype action_type: str or ~azure.mgmt.compute.models.ActionType
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
     \"Microsoft.Compute/virtualMachines/write\",
     \"Microsoft.Compute/virtualMachines/capture/action\"."""
    is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"])
    """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and
     \"false\" for Azure Resource Manager/control-plane operations."""
    display: Optional["_models.OperationDisplay"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Localized display information for this particular operation."""
    origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"])
    """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit
     logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and
     \"user,system\"."""
    action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"])
    """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for
     internal only APIs. \"Internal\""""

    @overload
    def __init__(
        self,
        *,
        display: Optional["_models.OperationDisplay"] = 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 OperationDisplay(_Model):
    """Localized display information for an 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 OperationRecoverySettings(_Model):
    """The configuration parameters used for operation recovery settings on a virtual machine scale
    set.

    :ivar restart_recovery_policy: The configuration parameters used for restart recovery policy.
    :vartype restart_recovery_policy: ~azure.mgmt.compute.models.RestartRecoveryPolicy
    :ivar start_recovery_policy: The configuration parameters used for start recovery policy.
    :vartype start_recovery_policy: ~azure.mgmt.compute.models.StartRecoveryPolicy
    :ivar reimage_recovery_policy: The configuration parameters used for reimage recovery policy.
    :vartype reimage_recovery_policy: ~azure.mgmt.compute.models.ReimageRecoveryPolicy
    """

    restart_recovery_policy: Optional["_models.RestartRecoveryPolicy"] = rest_field(
        name="restartRecoveryPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used for restart recovery policy."""
    start_recovery_policy: Optional["_models.StartRecoveryPolicy"] = rest_field(
        name="startRecoveryPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used for start recovery policy."""
    reimage_recovery_policy: Optional["_models.ReimageRecoveryPolicy"] = rest_field(
        name="reimageRecoveryPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used for reimage recovery policy."""

    @overload
    def __init__(
        self,
        *,
        restart_recovery_policy: Optional["_models.RestartRecoveryPolicy"] = None,
        start_recovery_policy: Optional["_models.StartRecoveryPolicy"] = None,
        reimage_recovery_policy: Optional["_models.ReimageRecoveryPolicy"] = 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 OrchestrationServiceStateInput(_Model):
    """The input for OrchestrationServiceState.

    :ivar service_name: The name of the service. Required. Known values are: "AutomaticRepairs" and
     "AutomaticZoneRebalancing".
    :vartype service_name: str or ~azure.mgmt.compute.models.OrchestrationServiceNames
    :ivar action: The action to be performed. Required. Known values are: "Resume" and "Suspend".
    :vartype action: str or ~azure.mgmt.compute.models.OrchestrationServiceStateAction
    """

    service_name: Union[str, "_models.OrchestrationServiceNames"] = rest_field(
        name="serviceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the service. Required. Known values are: \"AutomaticRepairs\" and
     \"AutomaticZoneRebalancing\"."""
    action: Union[str, "_models.OrchestrationServiceStateAction"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action to be performed. Required. Known values are: \"Resume\" and \"Suspend\"."""

    @overload
    def __init__(
        self,
        *,
        service_name: Union[str, "_models.OrchestrationServiceNames"],
        action: Union[str, "_models.OrchestrationServiceStateAction"],
    ) -> 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 OrchestrationServiceSummary(_Model):
    """Summary for an orchestration service of a virtual machine scale set.

    :ivar service_name: The name of the service. Known values are: "AutomaticRepairs" and
     "AutomaticZoneRebalancing".
    :vartype service_name: str or ~azure.mgmt.compute.models.OrchestrationServiceNames
    :ivar service_state: The current state of the service. Known values are: "NotRunning",
     "Running", and "Suspended".
    :vartype service_state: str or ~azure.mgmt.compute.models.OrchestrationServiceState
    :ivar latest_operation_status: The latest operation status of the service. Minimum API version
     for this property is 2025-04-01. Known values are: "InProgress" and "Completed".
    :vartype latest_operation_status: str or
     ~azure.mgmt.compute.models.OrchestrationServiceOperationStatus
    :ivar last_status_change_time: The last UTC time when the operation status changed. Minimum API
     version for this property is 2025-04-01.
    :vartype last_status_change_time: ~datetime.datetime
    """

    service_name: Optional[Union[str, "_models.OrchestrationServiceNames"]] = rest_field(
        name="serviceName", visibility=["read"]
    )
    """The name of the service. Known values are: \"AutomaticRepairs\" and
     \"AutomaticZoneRebalancing\"."""
    service_state: Optional[Union[str, "_models.OrchestrationServiceState"]] = rest_field(
        name="serviceState", visibility=["read"]
    )
    """The current state of the service. Known values are: \"NotRunning\", \"Running\", and
     \"Suspended\"."""
    latest_operation_status: Optional[Union[str, "_models.OrchestrationServiceOperationStatus"]] = rest_field(
        name="latestOperationStatus", visibility=["read"]
    )
    """The latest operation status of the service. Minimum API version for this property is
     2025-04-01. Known values are: \"InProgress\" and \"Completed\"."""
    last_status_change_time: Optional[datetime.datetime] = rest_field(
        name="lastStatusChangeTime", visibility=["read"], format="rfc3339"
    )
    """The last UTC time when the operation status changed. Minimum API version for this property is
     2025-04-01."""


class OSDisk(_Model):
    """Specifies information about the operating system disk used by the virtual machine. For more
    information about disks, see `About disks and VHDs for Azure virtual machines
    <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.

    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,**
     **Linux.**. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar encryption_settings: Specifies the encryption settings for the OS Disk. Minimum
     api-version: 2015-06-15.
    :vartype encryption_settings: ~azure.mgmt.compute.models.DiskEncryptionSettings
    :ivar name: The disk name.
    :vartype name: str
    :ivar vhd: The virtual hard disk.
    :vartype vhd: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar image: The source user image virtual hard disk. The virtual hard disk will be copied
     before being attached to the virtual machine. If SourceImage is provided, the destination
     virtual hard drive must not exist.
    :vartype image: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    :ivar diff_disk_settings: Specifies the ephemeral Disk Settings for the operating system disk
     used by the virtual machine.
    :vartype diff_disk_settings: ~azure.mgmt.compute.models.DiffDiskSettings
    :ivar create_option: Specifies how the virtual machine disk should be created. Possible values
     are **Attach:** This value is used when you are using a specialized disk to create the virtual
     machine. **FromImage:** This value is used when you are using an image to create the virtual
     machine. If you are using a platform image, you should also use the imageReference element
     described above. If you are using a marketplace image, you should also use the plan element
     previously described. Required. Known values are: "FromImage", "Empty", "Attach", "Copy", and
     "Restore".
    :vartype create_option: str or ~azure.mgmt.compute.models.DiskCreateOptionTypes
    :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be
     used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is
     the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
    :vartype disk_size_gb: int
    :ivar storage_fault_domain_alignment: Specifies the storage fault domain alignment type for the
     disk. Known values are: "Aligned" and "BestEffortAligned".
    :vartype storage_fault_domain_alignment: str or
     ~azure.mgmt.compute.models.StorageFaultDomainAlignmentType
    :ivar managed_disk: The managed disk parameters.
    :vartype managed_disk: ~azure.mgmt.compute.models.ManagedDiskParameters
    :ivar delete_option: Specifies whether OS Disk should be deleted or detached upon VM deletion.
     Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is
     deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The
     default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to
     **Delete**. The user cannot change the delete option for an ephemeral OS Disk. Known values
     are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    """

    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk if creating
     a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. Known
     values are: \"Windows\" and \"Linux\"."""
    encryption_settings: Optional["_models.DiskEncryptionSettings"] = rest_field(
        name="encryptionSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disk name."""
    vhd: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual hard disk."""
    image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The source user image virtual hard disk. The virtual hard disk will be copied before being
     attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive
     must not exist."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""
    diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field(
        name="diffDiskSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the ephemeral Disk Settings for the operating system disk used by the virtual
     machine."""
    create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(
        name="createOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies how the virtual machine disk should be created. Possible values are **Attach:** This
     value is used when you are using a specialized disk to create the virtual machine.
     **FromImage:** This value is used when you are using an image to create the virtual machine. If
     you are using a platform image, you should also use the imageReference element described above.
     If you are using a marketplace image, you should also use the plan element previously
     described. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", \"Copy\", and
     \"Restore\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite
     the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of
     bytes x 1024^3 for the disk and the value cannot be larger than 1023."""
    storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = rest_field(
        name="storageFaultDomainAlignment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage fault domain alignment type for the disk. Known values are: \"Aligned\"
     and \"BestEffortAligned\"."""
    managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed disk parameters."""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are:
     **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If
     this value is used, the os disk is retained after VM is deleted. The default value is set to
     **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot
     change the delete option for an ephemeral OS Disk. Known values are: \"Delete\" and \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        create_option: Union[str, "_models.DiskCreateOptionTypes"],
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        encryption_settings: Optional["_models.DiskEncryptionSettings"] = None,
        name: Optional[str] = None,
        vhd: Optional["_models.VirtualHardDisk"] = None,
        image: Optional["_models.VirtualHardDisk"] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        write_accelerator_enabled: Optional[bool] = None,
        diff_disk_settings: Optional["_models.DiffDiskSettings"] = None,
        disk_size_gb: Optional[int] = None,
        storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = None,
        managed_disk: Optional["_models.ManagedDiskParameters"] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = 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 OSDiskImage(_Model):
    """Contains the os disk image information.

    :ivar operating_system: The operating system of the osDiskImage. Required. Known values are:
     "Windows" and "Linux".
    :vartype operating_system: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    """

    operating_system: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="operatingSystem", visibility=["read", "create", "update", "delete", "query"]
    )
    """The operating system of the osDiskImage. Required. Known values are: \"Windows\" and \"Linux\"."""

    @overload
    def __init__(
        self,
        *,
        operating_system: Union[str, "_models.OperatingSystemTypes"],
    ) -> 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 OSDiskImageEncryption(DiskImageEncryption):
    """Contains encryption settings for an OS disk image.

    :ivar disk_encryption_set_id: A relative URI containing the resource ID of the disk encryption
     set.
    :vartype disk_encryption_set_id: str
    :ivar security_profile: This property specifies the security profile of an OS disk image.
    :vartype security_profile: ~azure.mgmt.compute.models.OSDiskImageSecurityProfile
    """

    security_profile: Optional["_models.OSDiskImageSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property specifies the security profile of an OS disk image."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_set_id: Optional[str] = None,
        security_profile: Optional["_models.OSDiskImageSecurityProfile"] = 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 OSDiskImageSecurityProfile(_Model):
    """Contains security profile for an OS disk image.

    :ivar confidential_vm_encryption_type: confidential VM encryption types. Known values are:
     "EncryptedVMGuestStateOnlyWithPmk", "EncryptedWithPmk", "EncryptedWithCmk", and
     "NonPersistedTPM".
    :vartype confidential_vm_encryption_type: str or
     ~azure.mgmt.compute.models.ConfidentialVMEncryptionType
    :ivar secure_vm_disk_encryption_set_id: secure VM disk encryption set id.
    :vartype secure_vm_disk_encryption_set_id: str
    """

    confidential_vm_encryption_type: Optional[Union[str, "_models.ConfidentialVMEncryptionType"]] = rest_field(
        name="confidentialVMEncryptionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """confidential VM encryption types. Known values are: \"EncryptedVMGuestStateOnlyWithPmk\",
     \"EncryptedWithPmk\", \"EncryptedWithCmk\", and \"NonPersistedTPM\"."""
    secure_vm_disk_encryption_set_id: Optional[str] = rest_field(
        name="secureVMDiskEncryptionSetId", visibility=["read", "create", "update", "delete", "query"]
    )
    """secure VM disk encryption set id."""

    @overload
    def __init__(
        self,
        *,
        confidential_vm_encryption_type: Optional[Union[str, "_models.ConfidentialVMEncryptionType"]] = None,
        secure_vm_disk_encryption_set_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 OSImageNotificationProfile(_Model):
    """OSImageNotificationProfile.

    :ivar not_before_timeout: Length of time a Virtual Machine being reimaged or having its OS
     upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto
     approved (timed out). The configuration is specified in ISO 8601 format, and the value must be
     15 minutes (PT15M).
    :vartype not_before_timeout: str
    :ivar enable: Specifies whether the OS Image Scheduled event is enabled or disabled.
    :vartype enable: bool
    """

    not_before_timeout: Optional[str] = rest_field(
        name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"]
    )
    """Length of time a Virtual Machine being reimaged or having its OS upgraded will have to
     potentially approve the OS Image Scheduled Event before the event is auto approved (timed out).
     The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)."""
    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether the OS Image Scheduled event is enabled or disabled."""

    @overload
    def __init__(
        self,
        *,
        not_before_timeout: Optional[str] = None,
        enable: 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 OSProfile(_Model):
    """Specifies the operating system settings for the virtual machine. Some of the settings cannot be
    changed once VM is provisioned.

    :ivar computer_name: Specifies the host OS name of the virtual machine. This name cannot be
     updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length
     (Linux):** 64 characters. For naming conventions and restrictions see `Azure infrastructure
     services implementation guidelines
     <https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules>`_.
    :vartype computer_name: str
    :ivar admin_username: Specifies the name of the administrator account. <br><br> This property
     cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in
     "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2",
     "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup",
     "console", "david", "guest", "john", "owner", "root", "server", "sql", "support",
     "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length
     (Linux):** 1  character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length
     (Windows):** 20 characters.
    :vartype admin_username: str
    :ivar admin_password: Specifies the password of the administrator account. <br><br>
     **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters
     <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72
     characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be
     fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a
     special character (Regex match [\\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd",
     "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
     "iloveyou!" <br><br> For resetting the password, see `How to reset the Remote Desktop service
     or its login password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_.
    :vartype admin_password: str
    :ivar custom_data: Specifies a base-64 encoded string of custom data. The base-64 encoded
     string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum
     length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in
     customData property.** This property cannot be updated after the VM is created. The property
     'customData' is passed to the VM to be saved as a file, for more information see `Custom Data
     on Azure VMs <https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/>`_.
     For using cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during
     creation <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_.
    :vartype custom_data: str
    :ivar windows_configuration: Specifies Windows operating system settings on the virtual
     machine.
    :vartype windows_configuration: ~azure.mgmt.compute.models.WindowsConfiguration
    :ivar linux_configuration: Specifies the Linux operating system settings on the virtual
     machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed
     Distributions <https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros>`_.
    :vartype linux_configuration: ~azure.mgmt.compute.models.LinuxConfiguration
    :ivar secrets: Specifies set of certificates that should be installed onto the virtual machine.
     To install certificates on a virtual machine it is recommended to use the `Azure Key Vault
     virtual machine extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_.
    :vartype secrets: list[~azure.mgmt.compute.models.VaultSecretGroup]
    :ivar allow_extension_operations: Specifies whether extension operations should be allowed on
     the virtual machine. This may only be set to False when no extensions are present on the
     virtual machine.
    :vartype allow_extension_operations: bool
    :ivar require_guest_provision_signal: Optional property which must either be set to True or
     omitted.
    :vartype require_guest_provision_signal: bool
    """

    computer_name: Optional[str] = rest_field(
        name="computerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is
     created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For
     naming conventions and restrictions see `Azure infrastructure services implementation
     guidelines
     <https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules>`_."""
    admin_username: Optional[str] = rest_field(
        name="adminUsername", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the name of the administrator account. <br><br> This property cannot be updated after
     the VM is created. <br><br> **Windows-only restriction:** Cannot end in \".\" <br><br>
     **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\",
     \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\",
     \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\",
     \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\",
     \"user4\", \"user5\". <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length
     (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters."""
    admin_password: Optional[str] = rest_field(
        name="adminPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8
     characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):**
     123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity
     requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters
     <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_])
     <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\",
     \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"
     <br><br> For resetting the password, see `How to reset the Remote Desktop service or its login
     password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_."""
    custom_data: Optional[str] = rest_field(
        name="customData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a
     binary array that is saved as a file on the Virtual Machine. The maximum length of the binary
     array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.**
     This property cannot be updated after the VM is created. The property 'customData' is passed to
     the VM to be saved as a file, for more information see `Custom Data on Azure VMs
     <https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/>`_. For using
     cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during creation
     <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_."""
    windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field(
        name="windowsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Windows operating system settings on the virtual machine."""
    linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field(
        name="linuxConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Linux operating system settings on the virtual machine. For a list of supported
     Linux distributions, see `Linux on Azure-Endorsed Distributions
     <https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros>`_."""
    secrets: Optional[list["_models.VaultSecretGroup"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies set of certificates that should be installed onto the virtual machine. To install
     certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine
     extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_."""
    allow_extension_operations: Optional[bool] = rest_field(
        name="allowExtensionOperations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether extension operations should be allowed on the virtual machine. This may only
     be set to False when no extensions are present on the virtual machine."""
    require_guest_provision_signal: Optional[bool] = rest_field(
        name="requireGuestProvisionSignal", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional property which must either be set to True or omitted."""

    @overload
    def __init__(
        self,
        *,
        computer_name: Optional[str] = None,
        admin_username: Optional[str] = None,
        admin_password: Optional[str] = None,
        custom_data: Optional[str] = None,
        windows_configuration: Optional["_models.WindowsConfiguration"] = None,
        linux_configuration: Optional["_models.LinuxConfiguration"] = None,
        secrets: Optional[list["_models.VaultSecretGroup"]] = None,
        allow_extension_operations: Optional[bool] = None,
        require_guest_provision_signal: 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 OSProfileProvisioningData(_Model):
    """Additional parameters for Reimaging Non-Ephemeral Virtual Machine.

    :ivar admin_password: Specifies the password of the administrator account. <br><br>
     **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters
     <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72
     characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be
     fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a
     special character (Regex match [\\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd",
     "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
     "iloveyou!" <br><br> For resetting the password, see `How to reset the Remote Desktop service
     or its login password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_.
    :vartype admin_password: str
    :ivar custom_data: Specifies a base-64 encoded string of custom data. The base-64 encoded
     string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum
     length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in
     customData property.** This property cannot be updated after the VM is created. The property
     customData is passed to the VM to be saved as a file, for more information see `Custom Data on
     Azure VMs <https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/>`_. If
     using cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during
     creation <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_.
    :vartype custom_data: str
    """

    admin_password: Optional[str] = rest_field(
        name="adminPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8
     characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):**
     123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity
     requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters
     <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_])
     <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\",
     \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"
     <br><br> For resetting the password, see `How to reset the Remote Desktop service or its login
     password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_."""
    custom_data: Optional[str] = rest_field(
        name="customData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a
     binary array that is saved as a file on the Virtual Machine. The maximum length of the binary
     array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.**
     This property cannot be updated after the VM is created. The property customData is passed to
     the VM to be saved as a file, for more information see `Custom Data on Azure VMs
     <https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/>`_. If using
     cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during creation
     <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_."""

    @overload
    def __init__(
        self,
        *,
        admin_password: Optional[str] = None,
        custom_data: 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 PatchInstallationDetail(_Model):
    """Information about a specific patch that was encountered during an installation action.

    :ivar patch_id: A unique identifier for the patch.
    :vartype patch_id: str
    :ivar name: The friendly name of the patch.
    :vartype name: str
    :ivar version: The version string of the package. It may conform to Semantic Versioning. Only
     applies to Linux.
    :vartype version: str
    :ivar kb_id: The KBID of the patch. Only applies to Windows patches.
    :vartype kb_id: str
    :ivar classifications: The classification(s) of the patch as provided by the patch publisher.
    :vartype classifications: list[str]
    :ivar installation_state: The state of the patch after the installation operation completed.
     Known values are: "Unknown", "Installed", "Failed", "Excluded", "NotSelected", and "Pending".
    :vartype installation_state: str or ~azure.mgmt.compute.models.PatchInstallationState
    """

    patch_id: Optional[str] = rest_field(name="patchId", visibility=["read"])
    """A unique identifier for the patch."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The friendly name of the patch."""
    version: Optional[str] = rest_field(visibility=["read"])
    """The version string of the package. It may conform to Semantic Versioning. Only applies to
     Linux."""
    kb_id: Optional[str] = rest_field(name="kbId", visibility=["read"])
    """The KBID of the patch. Only applies to Windows patches."""
    classifications: Optional[list[str]] = rest_field(visibility=["read"])
    """The classification(s) of the patch as provided by the patch publisher."""
    installation_state: Optional[Union[str, "_models.PatchInstallationState"]] = rest_field(
        name="installationState", visibility=["read"]
    )
    """The state of the patch after the installation operation completed. Known values are:
     \"Unknown\", \"Installed\", \"Failed\", \"Excluded\", \"NotSelected\", and \"Pending\"."""


class PatchSettings(_Model):
    """Specifies settings related to VM Guest Patching on Windows.

    :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual
     machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br
     /> Possible values are:<br /><br /> **Manual** - You  control the application of patches to a
     virtual machine. You do this by applying patches manually inside the VM. In this mode,
     automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must
     be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by
     the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br />
     **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The
     properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known
     values are: "Manual", "AutomaticByOS", and "AutomaticByPlatform".
    :vartype patch_mode: str or ~azure.mgmt.compute.models.WindowsVMGuestPatchMode
    :ivar enable_hotpatching: Enables customers to patch their Azure VMs without requiring a
     reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must
     be set to 'AutomaticByPlatform'.
    :vartype enable_hotpatching: bool
    :ivar assessment_mode: Specifies the mode of VM Guest patch assessment for the IaaS virtual
     machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing
     of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform
     will trigger periodic patch assessments. The property provisionVMAgent must be true. Known
     values are: "ImageDefault" and "AutomaticByPlatform".
    :vartype assessment_mode: str or ~azure.mgmt.compute.models.WindowsPatchAssessmentMode
    :ivar automatic_by_platform_settings: Specifies additional settings for patch mode
     AutomaticByPlatform in VM Guest Patching on Windows.
    :vartype automatic_by_platform_settings:
     ~azure.mgmt.compute.models.WindowsVMGuestPatchAutomaticByPlatformSettings
    """

    patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = rest_field(
        name="patchMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated
     to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values
     are:<br /><br /> **Manual** - You  control the application of patches to a virtual machine. You
     do this by applying patches manually inside the VM. In this mode, automatic updates are
     disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br />
     **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property
     WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform**
     - the virtual machine will automatically updated by the platform. The properties
     provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known values
     are: \"Manual\", \"AutomaticByOS\", and \"AutomaticByPlatform\"."""
    enable_hotpatching: Optional[bool] = rest_field(
        name="enableHotpatching", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching,
     the 'provisionVMAgent' must be set to true and 'patchMode' must be set to
     'AutomaticByPlatform'."""
    assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = rest_field(
        name="assessmentMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br />
     Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments
     on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic
     patch assessments. The property provisionVMAgent must be true. Known values are:
     \"ImageDefault\" and \"AutomaticByPlatform\"."""
    automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = rest_field(
        name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on
     Windows."""

    @overload
    def __init__(
        self,
        *,
        patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = None,
        enable_hotpatching: Optional[bool] = None,
        assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = None,
        automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = 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 PirResource(_Model):
    """The Resource model definition.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Resource name."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Resource location."""


class PirSharedGalleryResource(PirResource):
    """Base information about the shared gallery resource in pir.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar identifier: The identifier information of shared gallery.
    :vartype identifier: ~azure.mgmt.compute.models.SharedGalleryIdentifier
    """

    identifier: Optional["_models.SharedGalleryIdentifier"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identifier information of shared gallery."""

    __flattened_items = ["unique_id"]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.SharedGalleryIdentifier"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class Placement(_Model):
    """Describes the user-defined constraints for resource hardware placement.

    :ivar zone_placement_policy: Specifies the policy for resource's placement in availability
     zone. Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual
     Machine Scale Sets) - An availability zone will be automatically picked by system as part of
     resource creation. Known values are: "Any" and "Auto".
    :vartype zone_placement_policy: str or ~azure.mgmt.compute.models.ZonePlacementPolicyType
    :ivar include_zones: This property supplements the 'zonePlacementPolicy' property. If
     'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be
     present in the list of availability zones passed with 'includeZones'. If 'includeZones' is not
     provided, all availability zones in region will be considered for selection.
    :vartype include_zones: list[str]
    :ivar exclude_zones: This property supplements the 'zonePlacementPolicy' property. If
     'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not
     be present in the list of availability zones passed with 'excludeZones'. If 'excludeZones' is
     not provided, all availability zones in region will be considered for selection.
    :vartype exclude_zones: list[str]
    """

    zone_placement_policy: Optional[Union[str, "_models.ZonePlacementPolicyType"]] = rest_field(
        name="zonePlacementPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the policy for resource's placement in availability zone. Possible values are:
     **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An
     availability zone will be automatically picked by system as part of resource creation. Known
     values are: \"Any\" and \"Auto\"."""
    include_zones: Optional[list[str]] = rest_field(
        name="includeZones", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set
     to 'Any'/'Auto', availability zone selected by the system must be present in the list of
     availability zones passed with 'includeZones'. If 'includeZones' is not provided, all
     availability zones in region will be considered for selection."""
    exclude_zones: Optional[list[str]] = rest_field(
        name="excludeZones", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set
     to 'Any'/'Auto', availability zone selected by the system must not be present in the list of
     availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all
     availability zones in region will be considered for selection."""

    @overload
    def __init__(
        self,
        *,
        zone_placement_policy: Optional[Union[str, "_models.ZonePlacementPolicyType"]] = None,
        include_zones: Optional[list[str]] = None,
        exclude_zones: 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 Plan(_Model):
    """Specifies information about the marketplace image used to create the virtual machine. This
    element is only used for marketplace images. Before you can use a marketplace image from an
    API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace
    image that you want to use and then click **Want to deploy programmatically, Get Started ->**.
    Enter any required information and then click **Save**.

    :ivar name: The plan ID.
    :vartype name: str
    :ivar publisher: The publisher ID.
    :vartype publisher: str
    :ivar product: Specifies the product of the image from the marketplace. This is the same value
     as Offer under the imageReference element.
    :vartype product: str
    :ivar promotion_code: The promotion code.
    :vartype promotion_code: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan ID."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publisher ID."""
    product: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the product of the image from the marketplace. This is the same value as Offer under
     the imageReference element."""
    promotion_code: Optional[str] = rest_field(
        name="promotionCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The promotion code."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        publisher: Optional[str] = None,
        product: Optional[str] = None,
        promotion_code: 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 PlatformAttribute(_Model):
    """This is the platform attribute of the image version.

    :ivar name: This property specifies the name of the platformAttribute. It is read-only.
    :vartype name: str
    :ivar value: This property specifies the value of the corresponding name property. It is
     read-only.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """This property specifies the name of the platformAttribute. It is read-only."""
    value: Optional[str] = rest_field(visibility=["read"])
    """This property specifies the value of the corresponding name property. It is read-only."""


class PolicyViolation(_Model):
    """A policy violation reported against a gallery artifact.

    :ivar category: Describes the nature of the policy violation. Known values are: "Other",
     "ImageFlaggedUnsafe", "CopyrightValidation", and "IpTheft".
    :vartype category: str or ~azure.mgmt.compute.models.PolicyViolationCategory
    :ivar details: Describes specific details about why this policy violation was reported.
    :vartype details: str
    """

    category: Optional[Union[str, "_models.PolicyViolationCategory"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the nature of the policy violation. Known values are: \"Other\",
     \"ImageFlaggedUnsafe\", \"CopyrightValidation\", and \"IpTheft\"."""
    details: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes specific details about why this policy violation was reported."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.PolicyViolationCategory"]] = None,
        details: 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 PriorityMixPolicy(_Model):
    """Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible
    orchestration mode. With this property the customer is able to specify the base number of
    regular priority VMs created as the VMSS flex instance scales out and the split between Spot
    and Regular priority VMs after this base target has been reached.

    :ivar base_regular_priority_count: The base number of regular priority VMs that will be created
     in this scale set as it scales out.
    :vartype base_regular_priority_count: int
    :ivar regular_priority_percentage_above_base: The percentage of VM instances, after the base
     regular priority count has been reached, that are expected to use regular priority.
    :vartype regular_priority_percentage_above_base: int
    """

    base_regular_priority_count: Optional[int] = rest_field(
        name="baseRegularPriorityCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The base number of regular priority VMs that will be created in this scale set as it scales
     out."""
    regular_priority_percentage_above_base: Optional[int] = rest_field(
        name="regularPriorityPercentageAboveBase", visibility=["read", "create", "update", "delete", "query"]
    )
    """The percentage of VM instances, after the base regular priority count has been reached, that
     are expected to use regular priority."""

    @overload
    def __init__(
        self,
        *,
        base_regular_priority_count: Optional[int] = None,
        regular_priority_percentage_above_base: 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 PrivateEndpoint(_Model):
    """The Private Endpoint resource.

    :ivar id: The ARM identifier for Private Endpoint.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The ARM identifier for Private Endpoint."""


class PrivateEndpointConnection(ProxyResource):
    """The Private Endpoint Connection 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.compute.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.compute.models.PrivateEndpointConnectionProperties
    """

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

    __flattened_items = ["private_endpoint", "private_link_service_connection_state", "provisioning_state"]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.PrivateEndpointConnectionProperties"] = 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 PrivateEndpointConnectionProperties(_Model):
    """Properties of the PrivateEndpointConnectProperties.

    :ivar private_endpoint: The resource of private end point.
    :vartype private_endpoint: ~azure.mgmt.compute.models.PrivateEndpoint
    :ivar private_link_service_connection_state: A collection of information about the state of the
     connection between DiskAccess and Virtual Network. Required.
    :vartype private_link_service_connection_state:
     ~azure.mgmt.compute.models.PrivateLinkServiceConnectionState
    :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
     Known values are: "Succeeded", "Creating", "Deleting", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.compute.models.PrivateEndpointConnectionProvisioningState
    """

    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(name="privateEndpoint", visibility=["read"])
    """The resource of private end point."""
    private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field(
        name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of information about the state of the connection between DiskAccess and Virtual
     Network. Required."""
    provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the private endpoint connection resource. Known values are:
     \"Succeeded\", \"Creating\", \"Deleting\", and \"Failed\"."""

    @overload
    def __init__(
        self,
        *,
        private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState",
    ) -> 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 PrivateLinkResource(_Model):
    """A private link resource.

    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.compute.models.PrivateLinkResourceProperties
    :ivar id: private link resource Id.
    :vartype id: str
    :ivar name: private link resource name.
    :vartype name: str
    :ivar type: private link resource type.
    :vartype type: str
    """

    properties: Optional["_models.PrivateLinkResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource properties."""
    id: Optional[str] = rest_field(visibility=["read"])
    """private link resource Id."""
    name: Optional[str] = rest_field(visibility=["read"])
    """private link resource name."""
    type: Optional[str] = rest_field(visibility=["read"])
    """private link resource type."""

    __flattened_items = ["group_id", "required_members", "required_zone_names"]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.PrivateLinkResourceProperties"] = 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 PrivateLinkResourceListResult(_Model):
    """A list of private link resources.

    :ivar value: Array of private link resources.
    :vartype value: list[~azure.mgmt.compute.models.PrivateLinkResource]
    """

    value: Optional[list["_models.PrivateLinkResource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Array of private link resources."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[list["_models.PrivateLinkResource"]] = 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 PrivateLinkResourceProperties(_Model):
    """Properties of a private link resource.

    :ivar group_id: The private link resource group id.
    :vartype group_id: str
    :ivar required_members: The private link resource required member names.
    :vartype required_members: list[str]
    :ivar required_zone_names: The private link resource DNS zone name.
    :vartype required_zone_names: list[str]
    """

    group_id: Optional[str] = rest_field(name="groupId", visibility=["read"])
    """The private link resource group id."""
    required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"])
    """The private link resource required member names."""
    required_zone_names: Optional[list[str]] = rest_field(
        name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private link resource DNS zone name."""

    @overload
    def __init__(
        self,
        *,
        required_zone_names: 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 PrivateLinkServiceConnectionState(_Model):
    """A collection of information about the state of the connection between service consumer and
    provider.

    :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
     of the service. Known values are: "Pending", "Approved", and "Rejected".
    :vartype status: str or ~azure.mgmt.compute.models.PrivateEndpointServiceConnectionStatus
    :ivar description: The reason for approval/rejection of the connection.
    :vartype description: str
    :ivar actions_required: A message indicating if changes on the service provider require any
     updates on the consumer.
    :vartype actions_required: str
    """

    status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
     service. Known values are: \"Pending\", \"Approved\", and \"Rejected\"."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The reason for approval/rejection of the connection."""
    actions_required: Optional[str] = rest_field(
        name="actionsRequired", visibility=["read", "create", "update", "delete", "query"]
    )
    """A message indicating if changes on the service provider require any updates on the consumer."""

    @overload
    def __init__(
        self,
        *,
        status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None,
        description: Optional[str] = None,
        actions_required: 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 PropertyUpdatesInProgress(_Model):
    """Properties of the disk for which update is pending.

    :ivar target_tier: The target performance tier of the disk if a tier change operation is in
     progress.
    :vartype target_tier: str
    """

    target_tier: Optional[str] = rest_field(
        name="targetTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target performance tier of the disk if a tier change operation is in progress."""

    @overload
    def __init__(
        self,
        *,
        target_tier: 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 ProximityPlacementGroup(TrackedResource):
    """Specifies information about the proximity placement 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.compute.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: Describes the properties of a Proximity Placement Group.
    :vartype properties: ~azure.mgmt.compute.models.ProximityPlacementGroupProperties
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    """

    properties: Optional["_models.ProximityPlacementGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Proximity Placement Group."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""

    __flattened_items = [
        "proximity_placement_group_type",
        "virtual_machines",
        "virtual_machine_scale_sets",
        "availability_sets",
        "colocation_status",
        "intent",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.ProximityPlacementGroupProperties"] = None,
        zones: 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:
        _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 ProximityPlacementGroupProperties(_Model):
    """Describes the properties of a Proximity Placement Group.

    :ivar proximity_placement_group_type: Specifies the type of the proximity placement group.
     Possible values are: **Standard** : Co-locate resources within an Azure region or Availability
     Zone. **Ultra** : For future use. Known values are: "Standard" and "Ultra".
    :vartype proximity_placement_group_type: str or
     ~azure.mgmt.compute.models.ProximityPlacementGroupType
    :ivar virtual_machines: A list of references to all virtual machines in the proximity placement
     group.
    :vartype virtual_machines: list[~azure.mgmt.compute.models.SubResourceWithColocationStatus]
    :ivar virtual_machine_scale_sets: A list of references to all virtual machine scale sets in the
     proximity placement group.
    :vartype virtual_machine_scale_sets:
     list[~azure.mgmt.compute.models.SubResourceWithColocationStatus]
    :ivar availability_sets: A list of references to all availability sets in the proximity
     placement group.
    :vartype availability_sets: list[~azure.mgmt.compute.models.SubResourceWithColocationStatus]
    :ivar colocation_status: Describes colocation status of the Proximity Placement Group.
    :vartype colocation_status: ~azure.mgmt.compute.models.InstanceViewStatus
    :ivar intent: Specifies the user intent of the proximity placement group.
    :vartype intent: ~azure.mgmt.compute.models.ProximityPlacementGroupPropertiesIntent
    """

    proximity_placement_group_type: Optional[Union[str, "_models.ProximityPlacementGroupType"]] = rest_field(
        name="proximityPlacementGroupType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of the proximity placement group. Possible values are: **Standard** :
     Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.
     Known values are: \"Standard\" and \"Ultra\"."""
    virtual_machines: Optional[list["_models.SubResourceWithColocationStatus"]] = rest_field(
        name="virtualMachines", visibility=["read"]
    )
    """A list of references to all virtual machines in the proximity placement group."""
    virtual_machine_scale_sets: Optional[list["_models.SubResourceWithColocationStatus"]] = rest_field(
        name="virtualMachineScaleSets", visibility=["read"]
    )
    """A list of references to all virtual machine scale sets in the proximity placement group."""
    availability_sets: Optional[list["_models.SubResourceWithColocationStatus"]] = rest_field(
        name="availabilitySets", visibility=["read"]
    )
    """A list of references to all availability sets in the proximity placement group."""
    colocation_status: Optional["_models.InstanceViewStatus"] = rest_field(
        name="colocationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes colocation status of the Proximity Placement Group."""
    intent: Optional["_models.ProximityPlacementGroupPropertiesIntent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the user intent of the proximity placement group."""

    @overload
    def __init__(
        self,
        *,
        proximity_placement_group_type: Optional[Union[str, "_models.ProximityPlacementGroupType"]] = None,
        colocation_status: Optional["_models.InstanceViewStatus"] = None,
        intent: Optional["_models.ProximityPlacementGroupPropertiesIntent"] = 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 ProximityPlacementGroupPropertiesIntent(_Model):
    """Specifies the user intent of the proximity placement group.

    :ivar vm_sizes: Specifies possible sizes of virtual machines that can be created in the
     proximity placement group.
    :vartype vm_sizes: list[str]
    """

    vm_sizes: Optional[list[str]] = rest_field(
        name="vmSizes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies possible sizes of virtual machines that can be created in the proximity placement
     group."""

    @overload
    def __init__(
        self,
        *,
        vm_sizes: 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 ProximityPlacementGroupUpdate(UpdateResource):
    """Specifies information about the proximity placement group.

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

    @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 ProxyAgentSettings(_Model):
    """Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. Minimum
    api-version: 2023-09-01.

    :ivar enabled: Specifies whether ProxyAgent feature should be enabled on the virtual machine or
     virtual machine scale set.
    :vartype enabled: bool
    :ivar mode: Specifies the mode that ProxyAgent will execute on. Warning: this property has been
     deprecated, please specify 'mode' under particular hostendpoint setting. Known values are:
     "Audit" and "Enforce".
    :vartype mode: str or ~azure.mgmt.compute.models.Mode
    :ivar key_incarnation_id: Increase the value of this property allows users to reset the key
     used for securing communication channel between guest and host.
    :vartype key_incarnation_id: int
    :ivar wire_server: Specifies the Wire Server endpoint settings while creating the virtual
     machine or virtual machine scale set. Minimum api-version: 2024-03-01.
    :vartype wire_server: ~azure.mgmt.compute.models.HostEndpointSettings
    :ivar imds: Specifies the IMDS endpoint settings while creating the virtual machine or virtual
     machine scale set. Minimum api-version: 2024-03-01.
    :vartype imds: ~azure.mgmt.compute.models.HostEndpointSettings
    :ivar add_proxy_agent_extension: Specify whether to implicitly install the ProxyAgent
     Extension. This option is currently applicable only for Linux Os.
    :vartype add_proxy_agent_extension: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual
     machine scale set."""
    mode: Optional[Union[str, "_models.Mode"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the mode that ProxyAgent will execute on. Warning: this property has been deprecated,
     please specify 'mode' under particular hostendpoint setting. Known values are: \"Audit\" and
     \"Enforce\"."""
    key_incarnation_id: Optional[int] = rest_field(
        name="keyIncarnationId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Increase the value of this property allows users to reset the key used for securing
     communication channel between guest and host."""
    wire_server: Optional["_models.HostEndpointSettings"] = rest_field(
        name="wireServer", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Wire Server endpoint settings while creating the virtual machine or virtual
     machine scale set. Minimum api-version: 2024-03-01."""
    imds: Optional["_models.HostEndpointSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine
     scale set. Minimum api-version: 2024-03-01."""
    add_proxy_agent_extension: Optional[bool] = rest_field(
        name="addProxyAgentExtension", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify whether to implicitly install the ProxyAgent Extension. This option is currently
     applicable only for Linux Os."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        mode: Optional[Union[str, "_models.Mode"]] = None,
        key_incarnation_id: Optional[int] = None,
        wire_server: Optional["_models.HostEndpointSettings"] = None,
        imds: Optional["_models.HostEndpointSettings"] = None,
        add_proxy_agent_extension: 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 PublicIPAddressSku(_Model):
    """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.

    :ivar name: Specify public IP sku name. Known values are: "Basic" and "Standard".
    :vartype name: str or ~azure.mgmt.compute.models.PublicIPAddressSkuName
    :ivar tier: Specify public IP sku tier. Known values are: "Regional" and "Global".
    :vartype tier: str or ~azure.mgmt.compute.models.PublicIPAddressSkuTier
    """

    name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify public IP sku name. Known values are: \"Basic\" and \"Standard\"."""
    tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify public IP sku tier. Known values are: \"Regional\" and \"Global\"."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = None,
        tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = 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 PurchasePlan(_Model):
    """Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

    :ivar publisher: The publisher ID. Required.
    :vartype publisher: str
    :ivar name: The plan ID. Required.
    :vartype name: str
    :ivar product: Specifies the product of the image from the marketplace. This is the same value
     as Offer under the imageReference element. Required.
    :vartype product: str
    """

    publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publisher ID. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan ID. Required."""
    product: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the product of the image from the marketplace. This is the same value as Offer under
     the imageReference element. Required."""

    @overload
    def __init__(
        self,
        *,
        publisher: str,
        name: str,
        product: 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 RecommendedMachineConfiguration(_Model):
    """The properties describe the recommended machine configuration for this Image Definition. These
    properties are updatable.

    :ivar v_cp_us: Describes the resource range.
    :vartype v_cp_us: ~azure.mgmt.compute.models.ResourceRange
    :ivar memory: Describes the resource range.
    :vartype memory: ~azure.mgmt.compute.models.ResourceRange
    """

    v_cp_us: Optional["_models.ResourceRange"] = rest_field(
        name="vCPUs", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the resource range."""
    memory: Optional["_models.ResourceRange"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the resource range."""

    @overload
    def __init__(
        self,
        *,
        v_cp_us: Optional["_models.ResourceRange"] = None,
        memory: Optional["_models.ResourceRange"] = 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 RecoveryWalkResponse(_Model):
    """Response after calling a manual recovery walk.

    :ivar walk_performed: Whether the recovery walk was performed.
    :vartype walk_performed: bool
    :ivar next_platform_update_domain: The next update domain that needs to be walked. Null means
     walk spanning all update domains has been completed.
    :vartype next_platform_update_domain: int
    """

    walk_performed: Optional[bool] = rest_field(name="walkPerformed", visibility=["read"])
    """Whether the recovery walk was performed."""
    next_platform_update_domain: Optional[int] = rest_field(name="nextPlatformUpdateDomain", visibility=["read"])
    """The next update domain that needs to be walked. Null means walk spanning all update domains has
     been completed."""


class RegionalReplicationStatus(_Model):
    """This is the regional replication status.

    :ivar region: The region to which the gallery image version is being replicated to.
    :vartype region: str
    :ivar state: This is the regional replication state. Known values are: "Unknown",
     "Replicating", "Completed", and "Failed".
    :vartype state: str or ~azure.mgmt.compute.models.ReplicationState
    :ivar details: The details of the replication status.
    :vartype details: str
    :ivar progress: It indicates progress of the replication job.
    :vartype progress: int
    """

    region: Optional[str] = rest_field(visibility=["read"])
    """The region to which the gallery image version is being replicated to."""
    state: Optional[Union[str, "_models.ReplicationState"]] = rest_field(visibility=["read"])
    """This is the regional replication state. Known values are: \"Unknown\", \"Replicating\",
     \"Completed\", and \"Failed\"."""
    details: Optional[str] = rest_field(visibility=["read"])
    """The details of the replication status."""
    progress: Optional[int] = rest_field(visibility=["read"])
    """It indicates progress of the replication job."""


class RegionalSharingStatus(_Model):
    """Gallery regional sharing status.

    :ivar region: Region name.
    :vartype region: str
    :ivar state: Gallery sharing state in current region. Known values are: "Succeeded",
     "InProgress", "Failed", and "Unknown".
    :vartype state: str or ~azure.mgmt.compute.models.SharingState
    :ivar details: Details of gallery regional sharing failure.
    :vartype details: str
    """

    region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Region name."""
    state: Optional[Union[str, "_models.SharingState"]] = rest_field(visibility=["read"])
    """Gallery sharing state in current region. Known values are: \"Succeeded\", \"InProgress\",
     \"Failed\", and \"Unknown\"."""
    details: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Details of gallery regional sharing failure."""

    @overload
    def __init__(
        self,
        *,
        region: Optional[str] = None,
        details: 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 ReimageRecoveryPolicy(_Model):
    """The configuration parameters used while performing reimage recovery.

    :ivar enabled: Specifies whether reimage recovery should be enabled. The default value is
     false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether reimage recovery should be enabled. The default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 ReplicationStatus(_Model):
    """This is the replication status of the gallery image version.

    :ivar aggregated_state: This is the aggregated replication status based on all the regional
     replication status flags. Known values are: "Unknown", "InProgress", "Completed", and "Failed".
    :vartype aggregated_state: str or ~azure.mgmt.compute.models.AggregatedReplicationState
    :ivar summary: This is a summary of replication status for each region.
    :vartype summary: list[~azure.mgmt.compute.models.RegionalReplicationStatus]
    """

    aggregated_state: Optional[Union[str, "_models.AggregatedReplicationState"]] = rest_field(
        name="aggregatedState", visibility=["read"]
    )
    """This is the aggregated replication status based on all the regional replication status flags.
     Known values are: \"Unknown\", \"InProgress\", \"Completed\", and \"Failed\"."""
    summary: Optional[list["_models.RegionalReplicationStatus"]] = rest_field(visibility=["read"])
    """This is a summary of replication status for each region."""


class RequestRateByIntervalInput(LogAnalyticsInputBase):
    """Api request input for LogAnalytics getRequestRateByInterval Api.

    :ivar blob_container_sas_uri: SAS Uri of the logging blob container to which LogAnalytics Api
     writes output logs to. Required.
    :vartype blob_container_sas_uri: str
    :ivar from_time: From time of the query. Required.
    :vartype from_time: ~datetime.datetime
    :ivar to_time: To time of the query. Required.
    :vartype to_time: ~datetime.datetime
    :ivar group_by_throttle_policy: Group query result by Throttle Policy applied.
    :vartype group_by_throttle_policy: bool
    :ivar group_by_operation_name: Group query result by Operation Name.
    :vartype group_by_operation_name: bool
    :ivar group_by_resource_name: Group query result by Resource Name.
    :vartype group_by_resource_name: bool
    :ivar group_by_client_application_id: Group query result by Client Application ID.
    :vartype group_by_client_application_id: bool
    :ivar group_by_user_agent: Group query result by User Agent.
    :vartype group_by_user_agent: bool
    :ivar interval_length: Interval value in minutes used to create LogAnalytics call rate logs.
     Required. Known values are: "ThreeMins", "FiveMins", "ThirtyMins", and "SixtyMins".
    :vartype interval_length: str or ~azure.mgmt.compute.models.IntervalInMins
    """

    interval_length: Union[str, "_models.IntervalInMins"] = rest_field(
        name="intervalLength", visibility=["read", "create", "update", "delete", "query"]
    )
    """Interval value in minutes used to create LogAnalytics call rate logs. Required. Known values
     are: \"ThreeMins\", \"FiveMins\", \"ThirtyMins\", and \"SixtyMins\"."""

    @overload
    def __init__(
        self,
        *,
        blob_container_sas_uri: str,
        from_time: datetime.datetime,
        to_time: datetime.datetime,
        interval_length: Union[str, "_models.IntervalInMins"],
        group_by_throttle_policy: Optional[bool] = None,
        group_by_operation_name: Optional[bool] = None,
        group_by_resource_name: Optional[bool] = None,
        group_by_client_application_id: Optional[bool] = None,
        group_by_user_agent: 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 ResiliencyPolicy(_Model):
    """Describes an resiliency policy - AutomaticZoneRebalancingPolicy, ResilientVMCreationPolicy,
    ResilientVMDeletionPolicy and OperationRecoverySettings (version > 2025-11-01).

    :ivar resilient_vm_creation_policy: The configuration parameters used while performing
     resilient VM creation.
    :vartype resilient_vm_creation_policy: ~azure.mgmt.compute.models.ResilientVMCreationPolicy
    :ivar resilient_vm_deletion_policy: The configuration parameters used while performing
     resilient VM deletion.
    :vartype resilient_vm_deletion_policy: ~azure.mgmt.compute.models.ResilientVMDeletionPolicy
    :ivar automatic_zone_rebalancing_policy: The configuration parameters used while performing
     automatic AZ balancing.
    :vartype automatic_zone_rebalancing_policy:
     ~azure.mgmt.compute.models.AutomaticZoneRebalancingPolicy
    :ivar zone_allocation_policy: The configuration parameters used while performing zone
     allocation.
    :vartype zone_allocation_policy: ~azure.mgmt.compute.models.ZoneAllocationPolicy
    :ivar operation_recovery_settings: The configuration parameters used for operation recovery
     settings.
    :vartype operation_recovery_settings: ~azure.mgmt.compute.models.OperationRecoverySettings
    """

    resilient_vm_creation_policy: Optional["_models.ResilientVMCreationPolicy"] = rest_field(
        name="resilientVMCreationPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while performing resilient VM creation."""
    resilient_vm_deletion_policy: Optional["_models.ResilientVMDeletionPolicy"] = rest_field(
        name="resilientVMDeletionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while performing resilient VM deletion."""
    automatic_zone_rebalancing_policy: Optional["_models.AutomaticZoneRebalancingPolicy"] = rest_field(
        name="automaticZoneRebalancingPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while performing automatic AZ balancing."""
    zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = rest_field(
        name="zoneAllocationPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while performing zone allocation."""
    operation_recovery_settings: Optional["_models.OperationRecoverySettings"] = rest_field(
        name="operationRecoverySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used for operation recovery settings."""

    @overload
    def __init__(
        self,
        *,
        resilient_vm_creation_policy: Optional["_models.ResilientVMCreationPolicy"] = None,
        resilient_vm_deletion_policy: Optional["_models.ResilientVMDeletionPolicy"] = None,
        automatic_zone_rebalancing_policy: Optional["_models.AutomaticZoneRebalancingPolicy"] = None,
        zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = None,
        operation_recovery_settings: Optional["_models.OperationRecoverySettings"] = 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 ResiliencyProfile(_Model):
    """Gets resiliency solutions enabled on the VM. This includes backup or disaster recovery
    solutions.

    :ivar zone_movement: Zone movement configuration.
    :vartype zone_movement: ~azure.mgmt.compute.models.ZoneMovement
    """

    zone_movement: Optional["_models.ZoneMovement"] = rest_field(
        name="zoneMovement", visibility=["read", "create", "update", "delete", "query"]
    )
    """Zone movement configuration."""

    @overload
    def __init__(
        self,
        *,
        zone_movement: Optional["_models.ZoneMovement"] = 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 ResilientVMCreationPolicy(_Model):
    """The configuration parameters used while performing resilient VM creation.

    :ivar enabled: Specifies whether resilient VM creation should be enabled on the virtual machine
     scale set. The default value is false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether resilient VM creation should be enabled on the virtual machine scale set. The
     default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 ResilientVMDeletionPolicy(_Model):
    """The configuration parameters used while performing resilient VM deletion.

    :ivar enabled: Specifies whether resilient VM deletion should be enabled on the virtual machine
     scale set. The default value is false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether resilient VM deletion should be enabled on the virtual machine scale set. The
     default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 ResourceRange(_Model):
    """Describes the resource range.

    :ivar min: The minimum number of the resource.
    :vartype min: int
    :ivar max: The maximum number of the resource.
    :vartype max: int
    """

    min: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The minimum number of the resource."""
    max: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum number of the resource."""

    @overload
    def __init__(
        self,
        *,
        min: Optional[int] = None,  # pylint: disable=redefined-builtin
        max: Optional[int] = None,  # pylint: disable=redefined-builtin
    ) -> 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 ResourceSharingProfile(_Model):
    """ResourceSharingProfile.

    :ivar subscription_ids: Specifies an array of subscription resource IDs that capacity
     reservation group is shared with. Block Capacity Reservations does not support sharing across
     subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to
     `https://aka.ms/computereservationsharing <https://aka.ms/computereservationsharing>`_ for more
     details.
    :vartype subscription_ids: list[~azure.mgmt.compute.models.SubResource]
    """

    subscription_ids: Optional[list["_models.SubResource"]] = rest_field(
        name="subscriptionIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of subscription resource IDs that capacity reservation group is shared with.
     Block Capacity Reservations does not support sharing across subscriptions. **Note:** Minimum
     api-version: 2023-09-01. Please refer to `https://aka.ms/computereservationsharing
     <https://aka.ms/computereservationsharing>`_ for more details."""

    @overload
    def __init__(
        self,
        *,
        subscription_ids: Optional[list["_models.SubResource"]] = 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 ResourceSku(_Model):
    """Describes an available Compute SKU.

    :ivar resource_type: The type of resource the SKU applies to.
    :vartype resource_type: str
    :ivar name: The name of SKU.
    :vartype name: str
    :ivar tier: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible
     Values:<br /><br /> **Standard**<br /><br /> **Basic**.
    :vartype tier: str
    :ivar size: The Size of the SKU.
    :vartype size: str
    :ivar family: The Family of this particular SKU.
    :vartype family: str
    :ivar kind: The Kind of resources that are supported in this SKU.
    :vartype kind: str
    :ivar capacity: Specifies the number of virtual machines in the scale set.
    :vartype capacity: ~azure.mgmt.compute.models.ResourceSkuCapacity
    :ivar locations: The set of locations that the SKU is available.
    :vartype locations: list[str]
    :ivar location_info: A list of locations and availability zones in those locations where the
     SKU is available.
    :vartype location_info: list[~azure.mgmt.compute.models.ResourceSkuLocationInfo]
    :ivar api_versions: The api versions that support this SKU.
    :vartype api_versions: list[str]
    :ivar costs: Metadata for retrieving price info.
    :vartype costs: list[~azure.mgmt.compute.models.ResourceSkuCosts]
    :ivar capabilities: A name value pair to describe the capability.
    :vartype capabilities: list[~azure.mgmt.compute.models.ResourceSkuCapabilities]
    :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if
     there are no restrictions.
    :vartype restrictions: list[~azure.mgmt.compute.models.ResourceSkuRestrictions]
    """

    resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"])
    """The type of resource the SKU applies to."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The name of SKU."""
    tier: Optional[str] = rest_field(visibility=["read"])
    """Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br />
     **Standard**<br /><br /> **Basic**."""
    size: Optional[str] = rest_field(visibility=["read"])
    """The Size of the SKU."""
    family: Optional[str] = rest_field(visibility=["read"])
    """The Family of this particular SKU."""
    kind: Optional[str] = rest_field(visibility=["read"])
    """The Kind of resources that are supported in this SKU."""
    capacity: Optional["_models.ResourceSkuCapacity"] = rest_field(visibility=["read"])
    """Specifies the number of virtual machines in the scale set."""
    locations: Optional[list[str]] = rest_field(visibility=["read"])
    """The set of locations that the SKU is available."""
    location_info: Optional[list["_models.ResourceSkuLocationInfo"]] = rest_field(
        name="locationInfo", visibility=["read"]
    )
    """A list of locations and availability zones in those locations where the SKU is available."""
    api_versions: Optional[list[str]] = rest_field(name="apiVersions", visibility=["read"])
    """The api versions that support this SKU."""
    costs: Optional[list["_models.ResourceSkuCosts"]] = rest_field(visibility=["read"])
    """Metadata for retrieving price info."""
    capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"])
    """A name value pair to describe the capability."""
    restrictions: Optional[list["_models.ResourceSkuRestrictions"]] = rest_field(visibility=["read"])
    """The restrictions because of which SKU cannot be used. This is empty if there are no
     restrictions."""


class ResourceSkuCapabilities(_Model):
    """Describes The SKU capabilities object.

    :ivar name: An invariant to describe the feature.
    :vartype name: str
    :ivar value: An invariant if the feature is measured by quantity.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """An invariant to describe the feature."""
    value: Optional[str] = rest_field(visibility=["read"])
    """An invariant if the feature is measured by quantity."""


class ResourceSkuCapacity(_Model):
    """Describes scaling information of a SKU.

    :ivar minimum: The minimum capacity.
    :vartype minimum: int
    :ivar maximum: The maximum capacity that can be set.
    :vartype maximum: int
    :ivar default: The default capacity.
    :vartype default: int
    :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic",
     "Manual", and "None".
    :vartype scale_type: str or ~azure.mgmt.compute.models.ResourceSkuCapacityScaleType
    """

    minimum: Optional[int] = rest_field(visibility=["read"])
    """The minimum capacity."""
    maximum: Optional[int] = rest_field(visibility=["read"])
    """The maximum capacity that can be set."""
    default: Optional[int] = rest_field(visibility=["read"])
    """The default capacity."""
    scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = rest_field(
        name="scaleType", visibility=["read"]
    )
    """The scale type applicable to the sku. Known values are: \"Automatic\", \"Manual\", and
     \"None\"."""


class ResourceSkuCosts(_Model):
    """Describes metadata for retrieving price info.

    :ivar meter_id: Used for querying price from commerce.
    :vartype meter_id: str
    :ivar quantity: The multiplier is needed to extend the base metered cost.
    :vartype quantity: int
    :ivar extended_unit: An invariant to show the extended unit.
    :vartype extended_unit: str
    """

    meter_id: Optional[str] = rest_field(name="meterID", visibility=["read"])
    """Used for querying price from commerce."""
    quantity: Optional[int] = rest_field(visibility=["read"])
    """The multiplier is needed to extend the base metered cost."""
    extended_unit: Optional[str] = rest_field(name="extendedUnit", visibility=["read"])
    """An invariant to show the extended unit."""


class ResourceSkuLocationInfo(_Model):
    """Describes an available Compute SKU Location Information.

    :ivar location: Location of the SKU.
    :vartype location: str
    :ivar zones: List of availability zones where the SKU is supported.
    :vartype zones: list[str]
    :ivar zone_details: Details of capabilities available to a SKU in specific zones.
    :vartype zone_details: list[~azure.mgmt.compute.models.ResourceSkuZoneDetails]
    :ivar extended_locations: The names of extended locations.
    :vartype extended_locations: list[str]
    :ivar type: The type of the extended location. "EdgeZone"
    :vartype type: str or ~azure.mgmt.compute.models.ExtendedLocationType
    """

    location: Optional[str] = rest_field(visibility=["read"])
    """Location of the SKU."""
    zones: Optional[list[str]] = rest_field(visibility=["read"])
    """List of availability zones where the SKU is supported."""
    zone_details: Optional[list["_models.ResourceSkuZoneDetails"]] = rest_field(name="zoneDetails", visibility=["read"])
    """Details of capabilities available to a SKU in specific zones."""
    extended_locations: Optional[list[str]] = rest_field(name="extendedLocations", visibility=["read"])
    """The names of extended locations."""
    type: Optional[Union[str, "_models.ExtendedLocationType"]] = rest_field(visibility=["read"])
    """The type of the extended location. \"EdgeZone\""""


class ResourceSkuRestrictionInfo(_Model):
    """Describes an available Compute SKU Restriction Information.

    :ivar locations: Locations where the SKU is restricted.
    :vartype locations: list[str]
    :ivar zones: List of availability zones where the SKU is restricted.
    :vartype zones: list[str]
    """

    locations: Optional[list[str]] = rest_field(visibility=["read"])
    """Locations where the SKU is restricted."""
    zones: Optional[list[str]] = rest_field(visibility=["read"])
    """List of availability zones where the SKU is restricted."""


class ResourceSkuRestrictions(_Model):
    """Describes scaling information of a SKU.

    :ivar type: The type of restrictions. Known values are: "Location" and "Zone".
    :vartype type: str or ~azure.mgmt.compute.models.ResourceSkuRestrictionsType
    :ivar values_property: The value of restrictions. If the restriction type is set to location.
     This would be different locations where the SKU is restricted.
    :vartype values_property: list[str]
    :ivar restriction_info: The information about the restriction where the SKU cannot be used.
    :vartype restriction_info: ~azure.mgmt.compute.models.ResourceSkuRestrictionInfo
    :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and
     "NotAvailableForSubscription".
    :vartype reason_code: str or ~azure.mgmt.compute.models.ResourceSkuRestrictionsReasonCode
    """

    type: Optional[Union[str, "_models.ResourceSkuRestrictionsType"]] = rest_field(visibility=["read"])
    """The type of restrictions. Known values are: \"Location\" and \"Zone\"."""
    values_property: Optional[list[str]] = rest_field(name="values", visibility=["read"], original_tsp_name="values")
    """The value of restrictions. If the restriction type is set to location. This would be different
     locations where the SKU is restricted."""
    restriction_info: Optional["_models.ResourceSkuRestrictionInfo"] = rest_field(
        name="restrictionInfo", visibility=["read"]
    )
    """The information about the restriction where the SKU cannot be used."""
    reason_code: Optional[Union[str, "_models.ResourceSkuRestrictionsReasonCode"]] = rest_field(
        name="reasonCode", visibility=["read"]
    )
    """The reason for restriction. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\"."""


class ResourceSkuZoneDetails(_Model):
    """Describes The zonal capabilities of a SKU.

    :ivar name: The set of zones that the SKU is available in with the specified capabilities.
    :vartype name: list[str]
    :ivar capabilities: A list of capabilities that are available for the SKU in the specified list
     of zones.
    :vartype capabilities: list[~azure.mgmt.compute.models.ResourceSkuCapabilities]
    """

    name: Optional[list[str]] = rest_field(visibility=["read"])
    """The set of zones that the SKU is available in with the specified capabilities."""
    capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"])
    """A list of capabilities that are available for the SKU in the specified list of zones."""


class RestartRecoveryPolicy(_Model):
    """The configuration parameters used while performing restart recovery.

    :ivar enabled: Specifies whether restart recovery should be enabled. The default value is
     false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether restart recovery should be enabled. The default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 RestorePoint(ProxyResource):
    """Restore Point details.

    :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.compute.models.SystemData
    :ivar properties: The restore point properties.
    :vartype properties: ~azure.mgmt.compute.models.RestorePointProperties
    """

    properties: Optional["_models.RestorePointProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The restore point properties."""

    __flattened_items = [
        "exclude_disks",
        "source_metadata",
        "provisioning_state",
        "consistency_mode",
        "time_created",
        "source_restore_point",
        "instance_view",
        "instant_access_duration_minutes",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.RestorePointProperties"] = 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 RestorePointCollection(TrackedResource):
    """Create or update Restore Point collection parameters.

    :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.compute.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: The restore point collection properties.
    :vartype properties: ~azure.mgmt.compute.models.RestorePointCollectionProperties
    """

    properties: Optional["_models.RestorePointCollectionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The restore point collection properties."""

    __flattened_items = [
        "source",
        "provisioning_state",
        "restore_point_collection_id",
        "restore_points",
        "instant_access",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.RestorePointCollectionProperties"] = 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 RestorePointCollectionProperties(_Model):
    """The restore point collection properties.

    :ivar source: The properties of the source resource that this restore point collection is
     created from.
    :vartype source: ~azure.mgmt.compute.models.RestorePointCollectionSourceProperties
    :ivar provisioning_state: The provisioning state of the restore point collection.
    :vartype provisioning_state: str
    :ivar restore_point_collection_id: The unique id of the restore point collection.
    :vartype restore_point_collection_id: str
    :ivar restore_points: A list containing all restore points created under this restore point
     collection.
    :vartype restore_points: list[~azure.mgmt.compute.models.RestorePoint]
    :ivar instant_access: This property determines whether instant access snapshot is enabled for
     restore points created under this restore point collection for Premium SSD v2 or Ultra disk.
     Instant access snapshot for Premium SSD v2 or Ultra disk is instantaneously available for
     restoring disk with fast restore performance.
    :vartype instant_access: bool
    """

    source: Optional["_models.RestorePointCollectionSourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the source resource that this restore point collection is created from."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state of the restore point collection."""
    restore_point_collection_id: Optional[str] = rest_field(name="restorePointCollectionId", visibility=["read"])
    """The unique id of the restore point collection."""
    restore_points: Optional[list["_models.RestorePoint"]] = rest_field(name="restorePoints", visibility=["read"])
    """A list containing all restore points created under this restore point collection."""
    instant_access: Optional[bool] = rest_field(
        name="instantAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property determines whether instant access snapshot is enabled for restore points created
     under this restore point collection for Premium SSD v2 or Ultra disk. Instant access snapshot
     for Premium SSD v2 or Ultra disk is instantaneously available for restoring disk with fast
     restore performance."""

    @overload
    def __init__(
        self,
        *,
        source: Optional["_models.RestorePointCollectionSourceProperties"] = None,
        instant_access: 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 RestorePointCollectionSourceProperties(_Model):
    """The properties of the source resource that this restore point collection is created from.

    :ivar location: Location of the source resource used to create this restore point collection.
    :vartype location: str
    :ivar id: Resource Id of the source resource used to create this restore point collection.
    :vartype id: str
    """

    location: Optional[str] = rest_field(visibility=["read"])
    """Location of the source resource used to create this restore point collection."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource Id of the source resource used to create this restore point collection."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 RestorePointCollectionUpdate(UpdateResource):
    """Update Restore Point collection parameters.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The restore point collection properties.
    :vartype properties: ~azure.mgmt.compute.models.RestorePointCollectionProperties
    """

    properties: Optional["_models.RestorePointCollectionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The restore point collection properties."""

    __flattened_items = [
        "source",
        "provisioning_state",
        "restore_point_collection_id",
        "restore_points",
        "instant_access",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.RestorePointCollectionProperties"] = 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 RestorePointEncryption(_Model):
    """Encryption at rest settings for disk restore point. It is an optional property that can be
    specified in the input while creating a restore point.

    :ivar disk_encryption_set: Describes the parameter of customer managed disk encryption set
     resource id that can be specified for disk. **Note:** The disk encryption set resource id can
     only be specified for managed disk. Please refer `https://aka.ms/mdssewithcmkoverview
     <https://aka.ms/mdssewithcmkoverview>`_ for more details.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar type: The type of key used to encrypt the data of the disk restore point. Known values
     are: "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey", and
     "EncryptionAtRestWithPlatformAndCustomerKeys".
    :vartype type: str or ~azure.mgmt.compute.models.RestorePointEncryptionType
    """

    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the parameter of customer managed disk encryption set resource id that can be
     specified for disk. **Note:** The disk encryption set resource id can only be specified for
     managed disk. Please refer `https://aka.ms/mdssewithcmkoverview
     <https://aka.ms/mdssewithcmkoverview>`_ for more details."""
    type: Optional[Union[str, "_models.RestorePointEncryptionType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of key used to encrypt the data of the disk restore point. Known values are:
     \"EncryptionAtRestWithPlatformKey\", \"EncryptionAtRestWithCustomerKey\", and
     \"EncryptionAtRestWithPlatformAndCustomerKeys\"."""

    @overload
    def __init__(
        self,
        *,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None,
        type: Optional[Union[str, "_models.RestorePointEncryptionType"]] = 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 RestorePointInstanceView(_Model):
    """The instance view of a restore point.

    :ivar disk_restore_points: The disk restore points information.
    :vartype disk_restore_points: list[~azure.mgmt.compute.models.DiskRestorePointInstanceView]
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    disk_restore_points: Optional[list["_models.DiskRestorePointInstanceView"]] = rest_field(
        name="diskRestorePoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """The disk restore points information."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        disk_restore_points: Optional[list["_models.DiskRestorePointInstanceView"]] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 RestorePointProperties(_Model):
    """The restore point properties.

    :ivar exclude_disks: List of disk resource ids that the customer wishes to exclude from the
     restore point. If no disks are specified, all disks will be included.
    :vartype exclude_disks: list[~azure.mgmt.compute.models.ApiEntityReference]
    :ivar source_metadata: Gets the details of the VM captured at the time of the restore point
     creation.
    :vartype source_metadata: ~azure.mgmt.compute.models.RestorePointSourceMetadata
    :ivar provisioning_state: Gets the provisioning state of the restore point.
    :vartype provisioning_state: str
    :ivar consistency_mode: ConsistencyMode of the RestorePoint. Can be specified in the input
     while creating a restore point. For now, only CrashConsistent is accepted as a valid input.
     Please refer to `https://aka.ms/RestorePoints <https://aka.ms/RestorePoints>`_ for more
     details. Known values are: "CrashConsistent", "FileSystemConsistent", and
     "ApplicationConsistent".
    :vartype consistency_mode: str or ~azure.mgmt.compute.models.ConsistencyModeTypes
    :ivar time_created: Gets the creation time of the restore point.
    :vartype time_created: ~datetime.datetime
    :ivar source_restore_point: Resource Id of the source restore point from which a copy needs to
     be created.
    :vartype source_restore_point: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar instance_view: The restore point instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.RestorePointInstanceView
    :ivar instant_access_duration_minutes: This property determines the time in minutes the
     snapshot is retained as instant access for restoring Premium SSD v2 or Ultra disk with fast
     restore performance in this restore point.
    :vartype instant_access_duration_minutes: int
    """

    exclude_disks: Optional[list["_models.ApiEntityReference"]] = rest_field(
        name="excludeDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of disk resource ids that the customer wishes to exclude from the restore point. If no
     disks are specified, all disks will be included."""
    source_metadata: Optional["_models.RestorePointSourceMetadata"] = rest_field(
        name="sourceMetadata", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the details of the VM captured at the time of the restore point creation."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Gets the provisioning state of the restore point."""
    consistency_mode: Optional[Union[str, "_models.ConsistencyModeTypes"]] = rest_field(
        name="consistencyMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore
     point. For now, only CrashConsistent is accepted as a valid input. Please refer to
     `https://aka.ms/RestorePoints <https://aka.ms/RestorePoints>`_ for more details. Known values
     are: \"CrashConsistent\", \"FileSystemConsistent\", and \"ApplicationConsistent\"."""
    time_created: Optional[datetime.datetime] = rest_field(
        name="timeCreated", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Gets the creation time of the restore point."""
    source_restore_point: Optional["_models.ApiEntityReference"] = rest_field(
        name="sourceRestorePoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Id of the source restore point from which a copy needs to be created."""
    instance_view: Optional["_models.RestorePointInstanceView"] = rest_field(name="instanceView", visibility=["read"])
    """The restore point instance view."""
    instant_access_duration_minutes: Optional[int] = rest_field(
        name="instantAccessDurationMinutes", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property determines the time in minutes the snapshot is retained as instant access for
     restoring Premium SSD v2 or Ultra disk with fast restore performance in this restore point."""

    @overload
    def __init__(
        self,
        *,
        exclude_disks: Optional[list["_models.ApiEntityReference"]] = None,
        source_metadata: Optional["_models.RestorePointSourceMetadata"] = None,
        consistency_mode: Optional[Union[str, "_models.ConsistencyModeTypes"]] = None,
        time_created: Optional[datetime.datetime] = None,
        source_restore_point: Optional["_models.ApiEntityReference"] = None,
        instant_access_duration_minutes: 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 RestorePointSourceMetadata(_Model):
    """Describes the properties of the Virtual Machine for which the restore point was created. The
    properties provided are a subset and the snapshot of the overall Virtual Machine properties
    captured at the time of the restore point creation.

    :ivar hardware_profile: Gets the hardware profile.
    :vartype hardware_profile: ~azure.mgmt.compute.models.HardwareProfile
    :ivar storage_profile: Gets the storage profile.
    :vartype storage_profile: ~azure.mgmt.compute.models.RestorePointSourceVMStorageProfile
    :ivar os_profile: Gets the OS profile.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfile
    :ivar diagnostics_profile: Gets the diagnostics profile.
    :vartype diagnostics_profile: ~azure.mgmt.compute.models.DiagnosticsProfile
    :ivar license_type: Gets the license type, which is for bring your own license scenario.
    :vartype license_type: str
    :ivar vm_id: Gets the virtual machine unique id.
    :vartype vm_id: str
    :ivar security_profile: Gets the security profile.
    :vartype security_profile: ~azure.mgmt.compute.models.SecurityProfile
    :ivar location: Location of the VM from which the restore point was created.
    :vartype location: str
    :ivar user_data: UserData associated with the source VM for which restore point is captured,
     which is a base-64 encoded value.
    :vartype user_data: str
    :ivar hyper_v_generation: HyperVGeneration of the source VM for which restore point is
     captured. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGenerationTypes
    """

    hardware_profile: Optional["_models.HardwareProfile"] = rest_field(name="hardwareProfile", visibility=["read"])
    """Gets the hardware profile."""
    storage_profile: Optional["_models.RestorePointSourceVMStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the storage profile."""
    os_profile: Optional["_models.OSProfile"] = rest_field(name="osProfile", visibility=["read"])
    """Gets the OS profile."""
    diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(
        name="diagnosticsProfile", visibility=["read"]
    )
    """Gets the diagnostics profile."""
    license_type: Optional[str] = rest_field(name="licenseType", visibility=["read"])
    """Gets the license type, which is for bring your own license scenario."""
    vm_id: Optional[str] = rest_field(name="vmId", visibility=["read"])
    """Gets the virtual machine unique id."""
    security_profile: Optional["_models.SecurityProfile"] = rest_field(name="securityProfile", visibility=["read"])
    """Gets the security profile."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Location of the VM from which the restore point was created."""
    user_data: Optional[str] = rest_field(name="userData", visibility=["read"])
    """UserData associated with the source VM for which restore point is captured, which is a base-64
     encoded value."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationTypes"]] = rest_field(
        name="hyperVGeneration", visibility=["read"]
    )
    """HyperVGeneration of the source VM for which restore point is captured. Known values are: \"V1\"
     and \"V2\"."""

    @overload
    def __init__(
        self,
        *,
        storage_profile: Optional["_models.RestorePointSourceVMStorageProfile"] = 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 RestorePointSourceVMDataDisk(_Model):
    """Describes a data disk.

    :ivar lun: Gets the logical unit number.
    :vartype lun: int
    :ivar name: Gets the disk name.
    :vartype name: str
    :ivar caching: Gets the caching type. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar disk_size_gb: Gets the initial disk size in GB for blank data disks, and the new desired
     size for existing OS and Data disks.
    :vartype disk_size_gb: int
    :ivar managed_disk: Contains the managed disk details.
    :vartype managed_disk: ~azure.mgmt.compute.models.ManagedDiskParameters
    :ivar disk_restore_point: Contains Disk Restore Point properties.
    :vartype disk_restore_point: ~azure.mgmt.compute.models.DiskRestorePointAttributes
    :ivar write_accelerator_enabled: Shows true if the disk is write-accelerator enabled.
    :vartype write_accelerator_enabled: bool
    """

    lun: Optional[int] = rest_field(visibility=["read"])
    """Gets the logical unit number."""
    name: Optional[str] = rest_field(visibility=["read"])
    """Gets the disk name."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(visibility=["read"])
    """Gets the caching type. Known values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    disk_size_gb: Optional[int] = rest_field(name="diskSizeGB", visibility=["read"])
    """Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS
     and Data disks."""
    managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the managed disk details."""
    disk_restore_point: Optional["_models.DiskRestorePointAttributes"] = rest_field(
        name="diskRestorePoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains Disk Restore Point properties."""
    write_accelerator_enabled: Optional[bool] = rest_field(name="writeAcceleratorEnabled", visibility=["read"])
    """Shows true if the disk is write-accelerator enabled."""

    @overload
    def __init__(
        self,
        *,
        managed_disk: Optional["_models.ManagedDiskParameters"] = None,
        disk_restore_point: Optional["_models.DiskRestorePointAttributes"] = 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 RestorePointSourceVMOSDisk(_Model):
    """Describes an Operating System disk.

    :ivar os_type: Gets the Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemType
    :ivar encryption_settings: Gets the disk encryption settings.
    :vartype encryption_settings: ~azure.mgmt.compute.models.DiskEncryptionSettings
    :ivar name: Gets the disk name.
    :vartype name: str
    :ivar caching: Gets the caching type. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar disk_size_gb: Gets the disk size in GB.
    :vartype disk_size_gb: int
    :ivar managed_disk: Gets the managed disk details.
    :vartype managed_disk: ~azure.mgmt.compute.models.ManagedDiskParameters
    :ivar disk_restore_point: Contains Disk Restore Point properties.
    :vartype disk_restore_point: ~azure.mgmt.compute.models.DiskRestorePointAttributes
    :ivar write_accelerator_enabled: Shows true if the disk is write-accelerator enabled.
    :vartype write_accelerator_enabled: bool
    """

    os_type: Optional[Union[str, "_models.OperatingSystemType"]] = rest_field(name="osType", visibility=["read"])
    """Gets the Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    encryption_settings: Optional["_models.DiskEncryptionSettings"] = rest_field(
        name="encryptionSettings", visibility=["read"]
    )
    """Gets the disk encryption settings."""
    name: Optional[str] = rest_field(visibility=["read"])
    """Gets the disk name."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(visibility=["read"])
    """Gets the caching type. Known values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    disk_size_gb: Optional[int] = rest_field(name="diskSizeGB", visibility=["read"])
    """Gets the disk size in GB."""
    managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the managed disk details."""
    disk_restore_point: Optional["_models.DiskRestorePointAttributes"] = rest_field(
        name="diskRestorePoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains Disk Restore Point properties."""
    write_accelerator_enabled: Optional[bool] = rest_field(name="writeAcceleratorEnabled", visibility=["read"])
    """Shows true if the disk is write-accelerator enabled."""

    @overload
    def __init__(
        self,
        *,
        managed_disk: Optional["_models.ManagedDiskParameters"] = None,
        disk_restore_point: Optional["_models.DiskRestorePointAttributes"] = 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 RestorePointSourceVMStorageProfile(_Model):
    """Describes the storage profile.

    :ivar os_disk: Gets the OS disk of the VM captured at the time of the restore point creation.
    :vartype os_disk: ~azure.mgmt.compute.models.RestorePointSourceVMOSDisk
    :ivar data_disks: Gets the data disks of the VM captured at the time of the restore point
     creation.
    :vartype data_disks: list[~azure.mgmt.compute.models.RestorePointSourceVMDataDisk]
    :ivar disk_controller_type: Gets the disk controller type of the VM captured at the time of the
     restore point creation. Known values are: "SCSI" and "NVMe".
    :vartype disk_controller_type: str or ~azure.mgmt.compute.models.DiskControllerTypes
    """

    os_disk: Optional["_models.RestorePointSourceVMOSDisk"] = rest_field(
        name="osDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the OS disk of the VM captured at the time of the restore point creation."""
    data_disks: Optional[list["_models.RestorePointSourceVMDataDisk"]] = rest_field(
        name="dataDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the data disks of the VM captured at the time of the restore point creation."""
    disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field(
        name="diskControllerType", visibility=["read"]
    )
    """Gets the disk controller type of the VM captured at the time of the restore point creation.
     Known values are: \"SCSI\" and \"NVMe\"."""

    @overload
    def __init__(
        self,
        *,
        os_disk: Optional["_models.RestorePointSourceVMOSDisk"] = None,
        data_disks: Optional[list["_models.RestorePointSourceVMDataDisk"]] = 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 RetrieveBootDiagnosticsDataResult(_Model):
    """The SAS URIs of the console screenshot and serial log blobs.

    :ivar console_screenshot_blob_uri: The console screenshot blob URI.
    :vartype console_screenshot_blob_uri: str
    :ivar serial_console_log_blob_uri: The serial console log blob URI.
    :vartype serial_console_log_blob_uri: str
    """

    console_screenshot_blob_uri: Optional[str] = rest_field(name="consoleScreenshotBlobUri", visibility=["read"])
    """The console screenshot blob URI."""
    serial_console_log_blob_uri: Optional[str] = rest_field(name="serialConsoleLogBlobUri", visibility=["read"])
    """The serial console log blob URI."""


class RollbackStatusInfo(_Model):
    """Information about rollback on failed VM instances after a OS Upgrade operation.

    :ivar successfully_rolledback_instance_count: The number of instances which have been
     successfully rolled back.
    :vartype successfully_rolledback_instance_count: int
    :ivar failed_rolledback_instance_count: The number of instances which failed to rollback.
    :vartype failed_rolledback_instance_count: int
    :ivar rollback_error: Error details if OS rollback failed.
    :vartype rollback_error: ~azure.mgmt.compute.models.ApiError
    """

    successfully_rolledback_instance_count: Optional[int] = rest_field(
        name="successfullyRolledbackInstanceCount", visibility=["read"]
    )
    """The number of instances which have been successfully rolled back."""
    failed_rolledback_instance_count: Optional[int] = rest_field(
        name="failedRolledbackInstanceCount", visibility=["read"]
    )
    """The number of instances which failed to rollback."""
    rollback_error: Optional["_models.ApiError"] = rest_field(name="rollbackError", visibility=["read"])
    """Error details if OS rollback failed."""


class RollingUpgradePolicy(_Model):
    """The configuration parameters used while performing a rolling upgrade.

    :ivar max_batch_instance_percent: The maximum percent of total virtual machine instances that
     will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum,
     unhealthy instances in previous or future batches can cause the percentage of instances in a
     batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
    :vartype max_batch_instance_percent: int
    :ivar max_unhealthy_instance_percent: The maximum percentage of the total virtual machine
     instances in the scale set that can be simultaneously unhealthy, either as a result of being
     upgraded, or by being found in an unhealthy state by the virtual machine health checks before
     the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The
     default value for this parameter is 20%.
    :vartype max_unhealthy_instance_percent: int
    :ivar max_unhealthy_upgraded_instance_percent: The maximum percentage of upgraded virtual
     machine instances that can be found to be in an unhealthy state. This check will happen after
     each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The
     default value for this parameter is 20%.
    :vartype max_unhealthy_upgraded_instance_percent: int
    :ivar pause_time_between_batches: The wait time between completing the update for all virtual
     machines in one batch and starting the next batch. The time duration should be specified in ISO
     8601 format. The default value is 0 seconds (PT0S).
    :vartype pause_time_between_batches: str
    :ivar enable_cross_zone_upgrade: Allow VMSS to ignore AZ boundaries when constructing upgrade
     batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the
     batch size.
    :vartype enable_cross_zone_upgrade: bool
    :ivar prioritize_unhealthy_instances: Upgrade all unhealthy instances in a scale set before any
     healthy instances.
    :vartype prioritize_unhealthy_instances: bool
    :ivar rollback_failed_instances_on_policy_breach: Rollback failed instances to previous model
     if the Rolling Upgrade policy is violated.
    :vartype rollback_failed_instances_on_policy_breach: bool
    :ivar max_surge: Create new virtual machines to upgrade the scale set, rather than updating the
     existing virtual machines. Existing virtual machines will be deleted once the new virtual
     machines are created for each batch.
    :vartype max_surge: bool
    """

    max_batch_instance_percent: Optional[int] = rest_field(
        name="maxBatchInstancePercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum percent of total virtual machine instances that will be upgraded simultaneously by
     the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or
     future batches can cause the percentage of instances in a batch to decrease to ensure higher
     reliability. The default value for this parameter is 20%."""
    max_unhealthy_instance_percent: Optional[int] = rest_field(
        name="maxUnhealthyInstancePercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum percentage of the total virtual machine instances in the scale set that can be
     simultaneously unhealthy, either as a result of being upgraded, or by being found in an
     unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This
     constraint will be checked prior to starting any batch. The default value for this parameter is
     20%."""
    max_unhealthy_upgraded_instance_percent: Optional[int] = rest_field(
        name="maxUnhealthyUpgradedInstancePercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum percentage of upgraded virtual machine instances that can be found to be in an
     unhealthy state. This check will happen after each batch is upgraded. If this percentage is
     ever exceeded, the rolling update aborts. The default value for this parameter is 20%."""
    pause_time_between_batches: Optional[str] = rest_field(
        name="pauseTimeBetweenBatches", visibility=["read", "create", "update", "delete", "query"]
    )
    """The wait time between completing the update for all virtual machines in one batch and starting
     the next batch. The time duration should be specified in ISO 8601 format. The default value is
     0 seconds (PT0S)."""
    enable_cross_zone_upgrade: Optional[bool] = rest_field(
        name="enableCrossZoneUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration
     the Update Domain and maxBatchInstancePercent to determine the batch size."""
    prioritize_unhealthy_instances: Optional[bool] = rest_field(
        name="prioritizeUnhealthyInstances", visibility=["read", "create", "update", "delete", "query"]
    )
    """Upgrade all unhealthy instances in a scale set before any healthy instances."""
    rollback_failed_instances_on_policy_breach: Optional[bool] = rest_field(
        name="rollbackFailedInstancesOnPolicyBreach", visibility=["read", "create", "update", "delete", "query"]
    )
    """Rollback failed instances to previous model if the Rolling Upgrade policy is violated."""
    max_surge: Optional[bool] = rest_field(name="maxSurge", visibility=["read", "create", "update", "delete", "query"])
    """Create new virtual machines to upgrade the scale set, rather than updating the existing virtual
     machines. Existing virtual machines will be deleted once the new virtual machines are created
     for each batch."""

    @overload
    def __init__(
        self,
        *,
        max_batch_instance_percent: Optional[int] = None,
        max_unhealthy_instance_percent: Optional[int] = None,
        max_unhealthy_upgraded_instance_percent: Optional[int] = None,
        pause_time_between_batches: Optional[str] = None,
        enable_cross_zone_upgrade: Optional[bool] = None,
        prioritize_unhealthy_instances: Optional[bool] = None,
        rollback_failed_instances_on_policy_breach: Optional[bool] = None,
        max_surge: 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 RollingUpgradeProgressInfo(_Model):
    """Information about the number of virtual machine instances in each upgrade state.

    :ivar successful_instance_count: The number of instances that have been successfully upgraded.
    :vartype successful_instance_count: int
    :ivar failed_instance_count: The number of instances that have failed to be upgraded
     successfully.
    :vartype failed_instance_count: int
    :ivar in_progress_instance_count: The number of instances that are currently being upgraded.
    :vartype in_progress_instance_count: int
    :ivar pending_instance_count: The number of instances that have not yet begun to be upgraded.
    :vartype pending_instance_count: int
    """

    successful_instance_count: Optional[int] = rest_field(name="successfulInstanceCount", visibility=["read"])
    """The number of instances that have been successfully upgraded."""
    failed_instance_count: Optional[int] = rest_field(name="failedInstanceCount", visibility=["read"])
    """The number of instances that have failed to be upgraded successfully."""
    in_progress_instance_count: Optional[int] = rest_field(name="inProgressInstanceCount", visibility=["read"])
    """The number of instances that are currently being upgraded."""
    pending_instance_count: Optional[int] = rest_field(name="pendingInstanceCount", visibility=["read"])
    """The number of instances that have not yet begun to be upgraded."""


class RollingUpgradeRunningStatus(_Model):
    """Information about the current running state of the overall upgrade.

    :ivar code: Code indicating the current status of the upgrade. Known values are:
     "RollingForward", "Cancelled", "Completed", and "Faulted".
    :vartype code: str or ~azure.mgmt.compute.models.RollingUpgradeStatusCode
    :ivar start_time: Start time of the upgrade.
    :vartype start_time: ~datetime.datetime
    :ivar last_action: The last action performed on the rolling upgrade. Known values are: "Start"
     and "Cancel".
    :vartype last_action: str or ~azure.mgmt.compute.models.RollingUpgradeActionType
    :ivar last_action_time: Last action time of the upgrade.
    :vartype last_action_time: ~datetime.datetime
    """

    code: Optional[Union[str, "_models.RollingUpgradeStatusCode"]] = rest_field(visibility=["read"])
    """Code indicating the current status of the upgrade. Known values are: \"RollingForward\",
     \"Cancelled\", \"Completed\", and \"Faulted\"."""
    start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
    """Start time of the upgrade."""
    last_action: Optional[Union[str, "_models.RollingUpgradeActionType"]] = rest_field(
        name="lastAction", visibility=["read"]
    )
    """The last action performed on the rolling upgrade. Known values are: \"Start\" and \"Cancel\"."""
    last_action_time: Optional[datetime.datetime] = rest_field(
        name="lastActionTime", visibility=["read"], format="rfc3339"
    )
    """Last action time of the upgrade."""


class RollingUpgradeStatusInfo(TrackedResource):
    """The status of the latest virtual machine scale set rolling upgrade.

    :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.compute.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: The status of the latest virtual machine scale set rolling upgrade.
    :vartype properties: ~azure.mgmt.compute.models.RollingUpgradeStatusInfoProperties
    """

    properties: Optional["_models.RollingUpgradeStatusInfoProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the latest virtual machine scale set rolling upgrade."""

    __flattened_items = ["policy", "running_status", "progress", "error"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.RollingUpgradeStatusInfoProperties"] = 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 RollingUpgradeStatusInfoProperties(_Model):
    """The status of the latest virtual machine scale set rolling upgrade.

    :ivar policy: The rolling upgrade policies applied for this upgrade.
    :vartype policy: ~azure.mgmt.compute.models.RollingUpgradePolicy
    :ivar running_status: Information about the current running state of the overall upgrade.
    :vartype running_status: ~azure.mgmt.compute.models.RollingUpgradeRunningStatus
    :ivar progress: Information about the number of virtual machine instances in each upgrade
     state.
    :vartype progress: ~azure.mgmt.compute.models.RollingUpgradeProgressInfo
    :ivar error: Error details for this upgrade, if there are any.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    policy: Optional["_models.RollingUpgradePolicy"] = rest_field(visibility=["read"])
    """The rolling upgrade policies applied for this upgrade."""
    running_status: Optional["_models.RollingUpgradeRunningStatus"] = rest_field(
        name="runningStatus", visibility=["read"]
    )
    """Information about the current running state of the overall upgrade."""
    progress: Optional["_models.RollingUpgradeProgressInfo"] = rest_field(visibility=["read"])
    """Information about the number of virtual machine instances in each upgrade state."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """Error details for this upgrade, if there are any."""


class RunCommandDocumentBase(_Model):
    """Describes the properties of a Run Command metadata.

    :ivar schema: The VM run command schema. Required.
    :vartype schema: str
    :ivar id: The VM run command id. Required.
    :vartype id: str
    :ivar os_type: The Operating System type. Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar label: The VM run command label. Required.
    :vartype label: str
    :ivar description: The VM run command description. Required.
    :vartype description: str
    """

    schema: str = rest_field(name="$schema", visibility=["read", "create", "update", "delete", "query"])
    """The VM run command schema. Required."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The VM run command id. Required."""
    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Operating System type. Required. Known values are: \"Windows\" and \"Linux\"."""
    label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The VM run command label. Required."""
    description: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The VM run command description. Required."""

    @overload
    def __init__(
        self,
        *,
        schema: str,
        id: str,  # pylint: disable=redefined-builtin
        os_type: Union[str, "_models.OperatingSystemTypes"],
        label: str,
        description: 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 RunCommandDocument(RunCommandDocumentBase):
    """Describes the properties of a Run Command.

    :ivar schema: The VM run command schema. Required.
    :vartype schema: str
    :ivar id: The VM run command id. Required.
    :vartype id: str
    :ivar os_type: The Operating System type. Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar label: The VM run command label. Required.
    :vartype label: str
    :ivar description: The VM run command description. Required.
    :vartype description: str
    :ivar script: The script to be executed. Required.
    :vartype script: list[str]
    :ivar parameters: The parameters used by the script.
    :vartype parameters: list[~azure.mgmt.compute.models.RunCommandParameterDefinition]
    """

    script: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The script to be executed. Required."""
    parameters: Optional[list["_models.RunCommandParameterDefinition"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters used by the script."""

    @overload
    def __init__(
        self,
        *,
        schema: str,
        id: str,  # pylint: disable=redefined-builtin
        os_type: Union[str, "_models.OperatingSystemTypes"],
        label: str,
        description: str,
        script: list[str],
        parameters: Optional[list["_models.RunCommandParameterDefinition"]] = 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 RunCommandInput(_Model):
    """Capture Virtual Machine parameters.

    :ivar command_id: Specifies a commandId of predefined built-in script. Command IDs available
     for Linux are listed at `https://aka.ms/RunCommandManagedLinux#available-commands
     <https://aka.ms/RunCommandManagedLinux#available-commands>`_, Windows at
     `https://aka.ms/RunCommandManagedWindows#available-commands
     <https://aka.ms/RunCommandManagedWindows#available-commands>`_. Required.
    :vartype command_id: str
    :ivar script: Optional. The script to be executed.  When this value is given, the given script
     will override the default script of the command.
    :vartype script: list[str]
    :ivar parameters: The run command parameters.
    :vartype parameters: list[~azure.mgmt.compute.models.RunCommandInputParameter]
    """

    command_id: str = rest_field(name="commandId", visibility=["read", "create", "update", "delete", "query"])
    """Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed
     at `https://aka.ms/RunCommandManagedLinux#available-commands
     <https://aka.ms/RunCommandManagedLinux#available-commands>`_, Windows at
     `https://aka.ms/RunCommandManagedWindows#available-commands
     <https://aka.ms/RunCommandManagedWindows#available-commands>`_. Required."""
    script: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. The script to be executed.  When this value is given, the given script will override
     the default script of the command."""
    parameters: Optional[list["_models.RunCommandInputParameter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The run command parameters."""

    @overload
    def __init__(
        self,
        *,
        command_id: str,
        script: Optional[list[str]] = None,
        parameters: Optional[list["_models.RunCommandInputParameter"]] = 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 RunCommandInputParameter(_Model):
    """Describes the properties of a run command parameter.

    :ivar name: The run command parameter name. Required.
    :vartype name: str
    :ivar value: The run command parameter value. Required.
    :vartype value: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The run command parameter name. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The run command parameter value. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        value: 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 RunCommandManagedIdentity(_Model):
    """Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that
    has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object
    in case of system-assigned identity. Make sure the Azure storage blob exists in case of
    scriptUri, and managed identity has been given access to blob's container with 'Storage Blob
    Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append
    blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it
    under VM's identity. For more info on managed identity and Run Command, refer
    `https://aka.ms/ManagedIdentity <https://aka.ms/ManagedIdentity>`_ and
    `https://aka.ms/RunCommandManaged <https://aka.ms/RunCommandManaged>`_.

    :ivar client_id: Client Id (GUID value) of the user-assigned managed identity. ObjectId should
     not be used if this is provided.
    :vartype client_id: str
    :ivar object_id: Object Id (GUID value) of the user-assigned managed identity. ClientId should
     not be used if this is provided.
    :vartype object_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if
     this is provided."""
    object_id: Optional[str] = rest_field(name="objectId", visibility=["read", "create", "update", "delete", "query"])
    """Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if
     this is provided."""

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
        object_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 RunCommandParameterDefinition(_Model):
    """Describes the properties of a run command parameter.

    :ivar name: The run command parameter name. Required.
    :vartype name: str
    :ivar type: The run command parameter type. Required.
    :vartype type: str
    :ivar default_value: The run command parameter default value.
    :vartype default_value: str
    :ivar required: The run command parameter required.
    :vartype required: bool
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The run command parameter name. Required."""
    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The run command parameter type. Required."""
    default_value: Optional[str] = rest_field(
        name="defaultValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The run command parameter default value."""
    required: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The run command parameter required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        type: str,
        default_value: Optional[str] = None,
        required: 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 RunCommandResult(_Model):
    """RunCommandResult.

    :ivar value: Run command operation response.
    :vartype value: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    value: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Run command operation response."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[list["_models.InstanceViewStatus"]] = 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 ScaleInPolicy(_Model):
    """Describes a scale-in policy for a virtual machine scale set.

    :ivar rules: The rules to be followed when scaling-in a virtual machine scale set. <br><br>
     Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the
     scale set will first be balanced across zones if it is a zonal scale set. Then, it will be
     balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual
     machines chosen for removal will be the newest ones that are not protected from scale-in.
     <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual
     machines that are not protected from scale-in will be chosen for removal. For zonal virtual
     machine scale sets, the scale set will first be balanced across zones. Within each zone, the
     oldest virtual machines that are not protected will be chosen for removal. <br><br>
     **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines
     that are not protected from scale-in will be chosen for removal. For zonal virtual machine
     scale sets, the scale set will first be balanced across zones. Within each zone, the newest
     virtual machines that are not protected will be chosen for removal. <br><br>.
    :vartype rules: list[str or ~azure.mgmt.compute.models.VirtualMachineScaleSetScaleInRules]
    :ivar force_deletion: This property allows you to specify if virtual machines chosen for
     removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature
     in Preview).
    :vartype force_deletion: bool
    :ivar prioritize_unhealthy_v_ms: This property allows you to prioritize the deletion of
     unhealthy and inactive VMs when a virtual machine scale set is being scaled-in.(Feature in
     Preview).
    :vartype prioritize_unhealthy_v_ms: bool
    """

    rules: Optional[list[Union[str, "_models.VirtualMachineScaleSetScaleInRules"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values
     are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will
     first be balanced across zones if it is a zonal scale set. Then, it will be balanced across
     Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for
     removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM**
     When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not
     protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the
     scale set will first be balanced across zones. Within each zone, the oldest virtual machines
     that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine
     scale set is being scaled-in, the newest virtual machines that are not protected from scale-in
     will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be
     balanced across zones. Within each zone, the newest virtual machines that are not protected
     will be chosen for removal. <br><br>."""
    force_deletion: Optional[bool] = rest_field(
        name="forceDeletion", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify if virtual machines chosen for removal have to be force
     deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)."""
    prioritize_unhealthy_v_ms: Optional[bool] = rest_field(
        name="prioritizeUnhealthyVMs", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to prioritize the deletion of unhealthy and inactive VMs when a
     virtual machine scale set is being scaled-in.(Feature in Preview)."""

    @overload
    def __init__(
        self,
        *,
        rules: Optional[list[Union[str, "_models.VirtualMachineScaleSetScaleInRules"]]] = None,
        force_deletion: Optional[bool] = None,
        prioritize_unhealthy_v_ms: 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 ScheduledEventsAdditionalPublishingTargets(_Model):  # pylint: disable=name-too-long
    """ScheduledEventsAdditionalPublishingTargets.

    :ivar event_grid_and_resource_graph: The configuration parameters used while creating
     eventGridAndResourceGraph Scheduled Event setting.
    :vartype event_grid_and_resource_graph: ~azure.mgmt.compute.models.EventGridAndResourceGraph
    """

    event_grid_and_resource_graph: Optional["_models.EventGridAndResourceGraph"] = rest_field(
        name="eventGridAndResourceGraph", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event
     setting."""

    @overload
    def __init__(
        self,
        *,
        event_grid_and_resource_graph: Optional["_models.EventGridAndResourceGraph"] = 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 ScheduledEventsPolicy(_Model):
    """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event
    related configurations.

    :ivar user_initiated_redeploy: The configuration parameters used while creating
     userInitiatedRedeploy scheduled event setting creation.
    :vartype user_initiated_redeploy: ~azure.mgmt.compute.models.UserInitiatedRedeploy
    :ivar user_initiated_reboot: The configuration parameters used while creating
     userInitiatedReboot scheduled event setting creation.
    :vartype user_initiated_reboot: ~azure.mgmt.compute.models.UserInitiatedReboot
    :ivar scheduled_events_additional_publishing_targets: The configuration parameters used while
     publishing scheduledEventsAdditionalPublishingTargets.
    :vartype scheduled_events_additional_publishing_targets:
     ~azure.mgmt.compute.models.ScheduledEventsAdditionalPublishingTargets
    :ivar all_instances_down: The configuration parameters used while creating AllInstancesDown
     scheduled event setting creation.
    :vartype all_instances_down: ~azure.mgmt.compute.models.AllInstancesDown
    """

    user_initiated_redeploy: Optional["_models.UserInitiatedRedeploy"] = rest_field(
        name="userInitiatedRedeploy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while creating userInitiatedRedeploy scheduled event setting
     creation."""
    user_initiated_reboot: Optional["_models.UserInitiatedReboot"] = rest_field(
        name="userInitiatedReboot", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while creating userInitiatedReboot scheduled event setting
     creation."""
    scheduled_events_additional_publishing_targets: Optional["_models.ScheduledEventsAdditionalPublishingTargets"] = (
        rest_field(
            name="scheduledEventsAdditionalPublishingTargets",
            visibility=["read", "create", "update", "delete", "query"],
        )
    )
    """The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets."""
    all_instances_down: Optional["_models.AllInstancesDown"] = rest_field(
        name="allInstancesDown", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while creating AllInstancesDown scheduled event setting
     creation."""

    @overload
    def __init__(
        self,
        *,
        user_initiated_redeploy: Optional["_models.UserInitiatedRedeploy"] = None,
        user_initiated_reboot: Optional["_models.UserInitiatedReboot"] = None,
        scheduled_events_additional_publishing_targets: Optional[
            "_models.ScheduledEventsAdditionalPublishingTargets"
        ] = None,
        all_instances_down: Optional["_models.AllInstancesDown"] = 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 ScheduledEventsProfile(_Model):
    """ScheduledEventsProfile.

    :ivar terminate_notification_profile: Specifies Terminate Scheduled Event related
     configurations.
    :vartype terminate_notification_profile:
     ~azure.mgmt.compute.models.TerminateNotificationProfile
    :ivar os_image_notification_profile: Specifies OS Image Scheduled Event related configurations.
    :vartype os_image_notification_profile: ~azure.mgmt.compute.models.OSImageNotificationProfile
    """

    terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = rest_field(
        name="terminateNotificationProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Terminate Scheduled Event related configurations."""
    os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = rest_field(
        name="osImageNotificationProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies OS Image Scheduled Event related configurations."""

    @overload
    def __init__(
        self,
        *,
        terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = None,
        os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = 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 ScheduleProfile(_Model):
    """Defines the schedule for Block-type capacity reservations. Specifies the schedule during which
    capacity reservation is active and VM or VMSS resource can be allocated using reservation. This
    property is required and only supported when the capacity reservation group type is 'Block'.
    The scheduleProfile, start, and end fields are immutable after creation. Minimum API version:
    2025-04-01. Please refer to `https://aka.ms/blockcapacityreservation
    <https://aka.ms/blockcapacityreservation>`_ for more details.

    :ivar start: The required start date for block capacity reservations. Must be today or within
     56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC.
     Example: 2025-06-27.
    :vartype start: str
    :ivar end: The required end date for block capacity reservations. Must be after the start date,
     with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.
    :vartype end: str
    """

    start: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The required start date for block capacity reservations. Must be today or within 56 days in the
     future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Example:
     2025-06-27."""
    end: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The required end date for block capacity reservations. Must be after the start date, with a
     duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28."""

    @overload
    def __init__(
        self,
        *,
        start: Optional[str] = None,
        end: 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 ScriptSource(_Model):
    """The source script from which the Script Version is going to be created.

    :ivar script_link: Required. The link of the source script, it must be a readable storage blob
     with SAS URI or publicly accessible URI or managed identity enabled. Required.
    :vartype script_link: str
    :ivar parameters: Optional. Any input parameters that needs to passed to the script and are
     accessed within the script for its execution.
    :vartype parameters: list[~azure.mgmt.compute.models.GalleryScriptParameter]
    """

    script_link: str = rest_field(name="scriptLink", visibility=["read", "create", "update", "delete", "query"])
    """Required. The link of the source script, it must be a readable storage blob with SAS URI or
     publicly accessible URI or managed identity enabled. Required."""
    parameters: Optional[list["_models.GalleryScriptParameter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Any input parameters that needs to passed to the script and are accessed within the
     script for its execution."""

    @overload
    def __init__(
        self,
        *,
        script_link: str,
        parameters: Optional[list["_models.GalleryScriptParameter"]] = 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 SecurityPostureReference(_Model):
    """Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01.

    :ivar id: The security posture reference id in the form of
     /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
     Required.
    :vartype id: str
    :ivar exclude_extensions: The list of virtual machine extension names to exclude when applying
     the security posture.
    :vartype exclude_extensions: list[str]
    :ivar is_overridable: Whether the security posture can be overridden by the user.
    :vartype is_overridable: bool
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security posture reference id in the form of
     /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
     Required."""
    exclude_extensions: Optional[list[str]] = rest_field(
        name="excludeExtensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of virtual machine extension names to exclude when applying the security posture."""
    is_overridable: Optional[bool] = rest_field(
        name="isOverridable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether the security posture can be overridden by the user."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        exclude_extensions: Optional[list[str]] = None,
        is_overridable: 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 SecurityPostureReferenceUpdate(_Model):
    """Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01.

    :ivar id: The security posture reference id in the form of
     /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
    :vartype id: str
    :ivar exclude_extensions: The list of virtual machine extension names to exclude when applying
     the security posture.
    :vartype exclude_extensions: list[str]
    :ivar is_overridable: Whether the security posture can be overridden by the user.
    :vartype is_overridable: bool
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security posture reference id in the form of
     /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest."""
    exclude_extensions: Optional[list[str]] = rest_field(
        name="excludeExtensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of virtual machine extension names to exclude when applying the security posture."""
    is_overridable: Optional[bool] = rest_field(
        name="isOverridable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether the security posture can be overridden by the user."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        exclude_extensions: Optional[list[str]] = None,
        is_overridable: 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 SecurityProfile(_Model):
    """Specifies the Security profile settings for the virtual machine or virtual machine scale set.

    :ivar uefi_settings: Specifies the security settings like secure boot and vTPM used while
     creating the virtual machine. Minimum api-version: 2020-12-01.
    :vartype uefi_settings: ~azure.mgmt.compute.models.UefiSettings
    :ivar encryption_at_host: This property can be used by user in the request to enable or disable
     the Host Encryption for the virtual machine or virtual machine scale set. This will enable the
     encryption for all the disks including Resource/Temp disk at host itself. The default behavior
     is: The Encryption at host will be disabled unless this property is set to true for the
     resource.
    :vartype encryption_at_host: bool
    :ivar security_type: Specifies the SecurityType of the virtual machine. It has to be set to any
     specified value to enable UefiSettings. The default behavior is: UefiSettings will not be
     enabled unless this property is set and is not Standard. If not specified, Standard will be
     returned starting api version 2025-11-01. Known values are: "Standard", "TrustedLaunch", and
     "ConfidentialVM".
    :vartype security_type: str or ~azure.mgmt.compute.models.SecurityTypes
    :ivar encryption_identity: Specifies the Managed Identity used by ADE to get access token for
     keyvault operations.
    :vartype encryption_identity: ~azure.mgmt.compute.models.EncryptionIdentity
    :ivar proxy_agent_settings: Specifies ProxyAgent settings while creating the virtual machine.
     Minimum api-version: 2023-09-01.
    :vartype proxy_agent_settings: ~azure.mgmt.compute.models.ProxyAgentSettings
    """

    uefi_settings: Optional["_models.UefiSettings"] = rest_field(
        name="uefiSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the security settings like secure boot and vTPM used while creating the virtual
     machine. Minimum api-version: 2020-12-01."""
    encryption_at_host: Optional[bool] = rest_field(
        name="encryptionAtHost", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can be used by user in the request to enable or disable the Host Encryption for
     the virtual machine or virtual machine scale set. This will enable the encryption for all the
     disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at
     host will be disabled unless this property is set to true for the resource."""
    security_type: Optional[Union[str, "_models.SecurityTypes"]] = rest_field(
        name="securityType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the SecurityType of the virtual machine. It has to be set to any specified value to
     enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this
     property is set and is not Standard. If not specified, Standard will be returned starting api
     version 2025-11-01. Known values are: \"Standard\", \"TrustedLaunch\", and \"ConfidentialVM\"."""
    encryption_identity: Optional["_models.EncryptionIdentity"] = rest_field(
        name="encryptionIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Managed Identity used by ADE to get access token for keyvault operations."""
    proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = rest_field(
        name="proxyAgentSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version:
     2023-09-01."""

    @overload
    def __init__(
        self,
        *,
        uefi_settings: Optional["_models.UefiSettings"] = None,
        encryption_at_host: Optional[bool] = None,
        security_type: Optional[Union[str, "_models.SecurityTypes"]] = None,
        encryption_identity: Optional["_models.EncryptionIdentity"] = None,
        proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = 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 ServiceArtifactReference(_Model):
    """Specifies the service artifact reference id used to set same image version for all virtual
    machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01.

    :ivar id: The service artifact reference id in the form of
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The service artifact reference id in the form of
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 SharedGallery(PirSharedGalleryResource):
    """Specifies information about the Shared Gallery that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar identifier: The identifier information of shared gallery.
    :vartype identifier: ~azure.mgmt.compute.models.SharedGalleryIdentifier
    :ivar properties: Specifies the properties of a shared gallery.
    :vartype properties: ~azure.mgmt.compute.models.SharedGalleryProperties
    """

    properties: Optional["_models.SharedGalleryProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the properties of a shared gallery."""

    __flattened_items = ["unique_id", "artifact_tags"]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.SharedGalleryIdentifier"] = None,
        properties: Optional["_models.SharedGalleryProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class SharedGalleryDiskImage(_Model):
    """This is the disk image base class.

    :ivar disk_size_gb: This property indicates the size of the VHD to be created.
    :vartype disk_size_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.SharedGalleryHostCaching
    """

    disk_size_gb: Optional[int] = rest_field(name="diskSizeGB", visibility=["read"])
    """This property indicates the size of the VHD to be created."""
    host_caching: Optional[Union[str, "_models.SharedGalleryHostCaching"]] = rest_field(
        name="hostCaching", visibility=["read", "create", "update", "delete", "query"]
    )
    """The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""

    @overload
    def __init__(
        self,
        *,
        host_caching: Optional[Union[str, "_models.SharedGalleryHostCaching"]] = 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 SharedGalleryDataDiskImage(SharedGalleryDiskImage):
    """This is the data disk image.

    :ivar disk_size_gb: This property indicates the size of the VHD to be created.
    :vartype disk_size_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.SharedGalleryHostCaching
    :ivar lun: This property specifies the logical unit number of the data disk. This value is used
     to identify data disks within the Virtual Machine and therefore must be unique for each data
     disk attached to the Virtual Machine. Required.
    :vartype lun: int
    """

    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This property specifies the logical unit number of the data disk. This value is used to
     identify data disks within the Virtual Machine and therefore must be unique for each data disk
     attached to the Virtual Machine. Required."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        host_caching: Optional[Union[str, "_models.SharedGalleryHostCaching"]] = 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 SharedGalleryIdentifier(_Model):
    """The identifier information of shared gallery.

    :ivar unique_id: The unique id of this shared gallery.
    :vartype unique_id: str
    """

    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read", "create", "update", "delete", "query"])
    """The unique id of this shared gallery."""

    @overload
    def __init__(
        self,
        *,
        unique_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 SharedGalleryImage(PirSharedGalleryResource):
    """Specifies information about the gallery image definition that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar identifier: The identifier information of shared gallery.
    :vartype identifier: ~azure.mgmt.compute.models.SharedGalleryIdentifier
    :ivar properties: Describes the properties of a gallery image definition.
    :vartype properties: ~azure.mgmt.compute.models.SharedGalleryImageProperties
    """

    properties: Optional["_models.SharedGalleryImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image definition."""

    __flattened_items = [
        "unique_id",
        "os_type",
        "os_state",
        "end_of_life_date",
        "identifier",
        "recommended",
        "disallowed",
        "hyper_v_generation",
        "features",
        "purchase_plan",
        "architecture",
        "privacy_statement_uri",
        "eula",
        "artifact_tags",
    ]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.SharedGalleryIdentifier"] = None,
        properties: Optional["_models.SharedGalleryImageProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class SharedGalleryImageProperties(_Model):
    """Describes the properties of a gallery image definition.

    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk when creating a VM from a managed image. Possible values are: **Windows,** **Linux.**.
     Required. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar os_state: This property allows the user to specify whether the virtual machines created
     under this image are 'Generalized' or 'Specialized'. Required. Known values are: "Generalized"
     and "Specialized".
    :vartype os_state: str or ~azure.mgmt.compute.models.OperatingSystemStateTypes
    :ivar end_of_life_date: The end of life date of the gallery image definition. This property can
     be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar identifier: This is the gallery image definition identifier. Required.
    :vartype identifier: ~azure.mgmt.compute.models.GalleryImageIdentifier
    :ivar recommended: The properties describe the recommended machine configuration for this Image
     Definition. These properties are updatable.
    :vartype recommended: ~azure.mgmt.compute.models.RecommendedMachineConfiguration
    :ivar disallowed: Describes the disallowed disk types.
    :vartype disallowed: ~azure.mgmt.compute.models.Disallowed
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar features: A list of gallery image features.
    :vartype features: list[~azure.mgmt.compute.models.GalleryImageFeature]
    :ivar purchase_plan: Describes the gallery image definition purchase plan. This is used by
     marketplace images.
    :vartype purchase_plan: ~azure.mgmt.compute.models.ImagePurchasePlan
    :ivar architecture: The architecture of the image. Applicable to OS disks only. Known values
     are: "x64" and "Arm64".
    :vartype architecture: str or ~azure.mgmt.compute.models.Architecture
    :ivar privacy_statement_uri: Privacy statement uri for the current community gallery image.
    :vartype privacy_statement_uri: str
    :ivar eula: End-user license agreement for the current community gallery image.
    :vartype eula: str
    :ivar artifact_tags: The artifact tags of a shared gallery resource.
    :vartype artifact_tags: dict[str, str]
    """

    os_type: Union[str, "_models.OperatingSystemTypes"] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk when
     creating a VM from a managed image. Possible values are: **Windows,** **Linux.**. Required.
     Known values are: \"Windows\" and \"Linux\"."""
    os_state: Union[str, "_models.OperatingSystemStateTypes"] = rest_field(
        name="osState", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows the user to specify whether the virtual machines created under this image
     are 'Generalized' or 'Specialized'. Required. Known values are: \"Generalized\" and
     \"Specialized\"."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    identifier: "_models.GalleryImageIdentifier" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the gallery image definition identifier. Required."""
    recommended: Optional["_models.RecommendedMachineConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties describe the recommended machine configuration for this Image Definition. These
     properties are updatable."""
    disallowed: Optional["_models.Disallowed"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the disallowed disk types."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    features: Optional[list["_models.GalleryImageFeature"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of gallery image features."""
    purchase_plan: Optional["_models.ImagePurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the gallery image definition purchase plan. This is used by marketplace images."""
    architecture: Optional[Union[str, "_models.Architecture"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The architecture of the image. Applicable to OS disks only. Known values are: \"x64\" and
     \"Arm64\"."""
    privacy_statement_uri: Optional[str] = rest_field(
        name="privacyStatementUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Privacy statement uri for the current community gallery image."""
    eula: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """End-user license agreement for the current community gallery image."""
    artifact_tags: Optional[dict[str, str]] = rest_field(
        name="artifactTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact tags of a shared gallery resource."""

    @overload
    def __init__(
        self,
        *,
        os_type: Union[str, "_models.OperatingSystemTypes"],
        os_state: Union[str, "_models.OperatingSystemStateTypes"],
        identifier: "_models.GalleryImageIdentifier",
        end_of_life_date: Optional[datetime.datetime] = None,
        recommended: Optional["_models.RecommendedMachineConfiguration"] = None,
        disallowed: Optional["_models.Disallowed"] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        features: Optional[list["_models.GalleryImageFeature"]] = None,
        purchase_plan: Optional["_models.ImagePurchasePlan"] = None,
        architecture: Optional[Union[str, "_models.Architecture"]] = None,
        privacy_statement_uri: Optional[str] = None,
        eula: Optional[str] = None,
        artifact_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 SharedGalleryImageVersion(PirSharedGalleryResource):
    """Specifies information about the gallery image version that you want to create or update.

    :ivar name: Resource name.
    :vartype name: str
    :ivar location: Resource location.
    :vartype location: str
    :ivar identifier: The identifier information of shared gallery.
    :vartype identifier: ~azure.mgmt.compute.models.SharedGalleryIdentifier
    :ivar properties: Describes the properties of a gallery image version.
    :vartype properties: ~azure.mgmt.compute.models.SharedGalleryImageVersionProperties
    """

    properties: Optional["_models.SharedGalleryImageVersionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a gallery image version."""

    __flattened_items = [
        "unique_id",
        "published_date",
        "end_of_life_date",
        "exclude_from_latest",
        "storage_profile",
        "artifact_tags",
    ]

    @overload
    def __init__(
        self,
        *,
        identifier: Optional["_models.SharedGalleryIdentifier"] = None,
        properties: Optional["_models.SharedGalleryImageVersionProperties"] = 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.identifier is None:
                return None
            return getattr(self.identifier, 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.identifier is None:
                self.identifier = self._attr_to_rest_field["identifier"]._class_type()
            setattr(self.identifier, key, value)
        else:
            super().__setattr__(key, value)


class SharedGalleryImageVersionProperties(_Model):
    """Describes the properties of a gallery image version.

    :ivar published_date: The published date of the gallery image version Definition. This property
     can be used for decommissioning purposes. This property is updatable.
    :vartype published_date: ~datetime.datetime
    :ivar end_of_life_date: The end of life date of the gallery image version Definition. This
     property can be used for decommissioning purposes. This property is updatable.
    :vartype end_of_life_date: ~datetime.datetime
    :ivar exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of
     the Image Definition won't use this Image Version.
    :vartype exclude_from_latest: bool
    :ivar storage_profile: Describes the storage profile of the image version.
    :vartype storage_profile: ~azure.mgmt.compute.models.SharedGalleryImageVersionStorageProfile
    :ivar artifact_tags: The artifact tags of a shared gallery resource.
    :vartype artifact_tags: dict[str, str]
    """

    published_date: Optional[datetime.datetime] = rest_field(
        name="publishedDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The published date of the gallery image version Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    end_of_life_date: Optional[datetime.datetime] = rest_field(
        name="endOfLifeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end of life date of the gallery image version Definition. This property can be used for
     decommissioning purposes. This property is updatable."""
    exclude_from_latest: Optional[bool] = rest_field(
        name="excludeFromLatest", visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to true, Virtual Machines deployed from the latest version of the Image Definition won't
     use this Image Version."""
    storage_profile: Optional["_models.SharedGalleryImageVersionStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the storage profile of the image version."""
    artifact_tags: Optional[dict[str, str]] = rest_field(
        name="artifactTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact tags of a shared gallery resource."""

    @overload
    def __init__(
        self,
        *,
        published_date: Optional[datetime.datetime] = None,
        end_of_life_date: Optional[datetime.datetime] = None,
        exclude_from_latest: Optional[bool] = None,
        storage_profile: Optional["_models.SharedGalleryImageVersionStorageProfile"] = None,
        artifact_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 SharedGalleryImageVersionStorageProfile(_Model):
    """This is the storage profile of a Gallery Image Version.

    :ivar os_disk_image: This is the OS disk image.
    :vartype os_disk_image: ~azure.mgmt.compute.models.SharedGalleryOSDiskImage
    :ivar data_disk_images: A list of data disk images.
    :vartype data_disk_images: list[~azure.mgmt.compute.models.SharedGalleryDataDiskImage]
    """

    os_disk_image: Optional["_models.SharedGalleryOSDiskImage"] = rest_field(
        name="osDiskImage", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the OS disk image."""
    data_disk_images: Optional[list["_models.SharedGalleryDataDiskImage"]] = rest_field(
        name="dataDiskImages", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of data disk images."""

    @overload
    def __init__(
        self,
        *,
        os_disk_image: Optional["_models.SharedGalleryOSDiskImage"] = None,
        data_disk_images: Optional[list["_models.SharedGalleryDataDiskImage"]] = 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 SharedGalleryOSDiskImage(SharedGalleryDiskImage):
    """This is the OS disk image.

    :ivar disk_size_gb: This property indicates the size of the VHD to be created.
    :vartype disk_size_gb: int
    :ivar host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and
     'ReadWrite'. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype host_caching: str or ~azure.mgmt.compute.models.SharedGalleryHostCaching
    """

    @overload
    def __init__(
        self,
        *,
        host_caching: Optional[Union[str, "_models.SharedGalleryHostCaching"]] = 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 SharedGalleryProperties(_Model):
    """Specifies the properties of a shared gallery.

    :ivar artifact_tags: The artifact tags of a shared gallery resource.
    :vartype artifact_tags: dict[str, str]
    """

    artifact_tags: Optional[dict[str, str]] = rest_field(name="artifactTags", visibility=["read"])
    """The artifact tags of a shared gallery resource."""


class ShareInfoElement(_Model):
    """ShareInfoElement.

    :ivar vm_uri: A relative URI containing the ID of the VM that has the disk attached.
    :vartype vm_uri: str
    """

    vm_uri: Optional[str] = rest_field(name="vmUri", visibility=["read"])
    """A relative URI containing the ID of the VM that has the disk attached."""


class SharingProfile(_Model):
    """Profile for gallery sharing to subscription or tenant.

    :ivar permissions: This property allows you to specify the permission of sharing gallery.
     Possible values are: **Private,** **Groups,** **Community.**. Known values are: "Private",
     "Groups", and "Community".
    :vartype permissions: str or ~azure.mgmt.compute.models.GallerySharingPermissionTypes
    :ivar groups: A list of sharing profile groups.
    :vartype groups: list[~azure.mgmt.compute.models.SharingProfileGroup]
    :ivar community_gallery_info: Information of community gallery if current gallery is shared to
     community.
    :vartype community_gallery_info: ~azure.mgmt.compute.models.CommunityGalleryInfo
    """

    permissions: Optional[Union[str, "_models.GallerySharingPermissionTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the permission of sharing gallery. Possible values are:
     **Private,** **Groups,** **Community.**. Known values are: \"Private\", \"Groups\", and
     \"Community\"."""
    groups: Optional[list["_models.SharingProfileGroup"]] = rest_field(visibility=["read"])
    """A list of sharing profile groups."""
    community_gallery_info: Optional["_models.CommunityGalleryInfo"] = rest_field(
        name="communityGalleryInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """Information of community gallery if current gallery is shared to community."""

    @overload
    def __init__(
        self,
        *,
        permissions: Optional[Union[str, "_models.GallerySharingPermissionTypes"]] = None,
        community_gallery_info: Optional["_models.CommunityGalleryInfo"] = 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 SharingProfileGroup(_Model):
    """Group of the gallery sharing profile.

    :ivar type: This property allows you to specify the type of sharing group. Possible values are:
     **Subscriptions,** **AADTenants.**. Known values are: "Subscriptions" and "AADTenants".
    :vartype type: str or ~azure.mgmt.compute.models.SharingProfileGroupTypes
    :ivar ids: A list of subscription/tenant ids the gallery is aimed to be shared to.
    :vartype ids: list[str]
    """

    type: Optional[Union[str, "_models.SharingProfileGroupTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of sharing group. Possible values are:
     **Subscriptions,** **AADTenants.**. Known values are: \"Subscriptions\" and \"AADTenants\"."""
    ids: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of subscription/tenant ids the gallery is aimed to be shared to."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.SharingProfileGroupTypes"]] = None,
        ids: 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 SharingStatus(_Model):
    """Sharing status of current gallery.

    :ivar aggregated_state: Aggregated sharing state of current gallery. Known values are:
     "Succeeded", "InProgress", "Failed", and "Unknown".
    :vartype aggregated_state: str or ~azure.mgmt.compute.models.SharingState
    :ivar summary: Summary of all regional sharing status.
    :vartype summary: list[~azure.mgmt.compute.models.RegionalSharingStatus]
    """

    aggregated_state: Optional[Union[str, "_models.SharingState"]] = rest_field(
        name="aggregatedState", visibility=["read"]
    )
    """Aggregated sharing state of current gallery. Known values are: \"Succeeded\", \"InProgress\",
     \"Failed\", and \"Unknown\"."""
    summary: Optional[list["_models.RegionalSharingStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Summary of all regional sharing status."""

    @overload
    def __init__(
        self,
        *,
        summary: Optional[list["_models.RegionalSharingStatus"]] = 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 SharingUpdate(_Model):
    """Specifies information about the gallery sharing profile update.

    :ivar operation_type: This property allows you to specify the operation type of gallery sharing
     update. Possible values are: **Add,** **Remove,** **Reset.**. Required. Known values are:
     "Add", "Remove", "Reset", and "EnableCommunity".
    :vartype operation_type: str or ~azure.mgmt.compute.models.SharingUpdateOperationTypes
    :ivar groups: A list of sharing profile groups.
    :vartype groups: list[~azure.mgmt.compute.models.SharingProfileGroup]
    """

    operation_type: Union[str, "_models.SharingUpdateOperationTypes"] = rest_field(
        name="operationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the operation type of gallery sharing update. Possible
     values are: **Add,** **Remove,** **Reset.**. Required. Known values are: \"Add\", \"Remove\",
     \"Reset\", and \"EnableCommunity\"."""
    groups: Optional[list["_models.SharingProfileGroup"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of sharing profile groups."""

    @overload
    def __init__(
        self,
        *,
        operation_type: Union[str, "_models.SharingUpdateOperationTypes"],
        groups: Optional[list["_models.SharingProfileGroup"]] = 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 Sku(_Model):
    """Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the
    hardware the scale set is currently on, you need to deallocate the VMs in the scale set before
    you modify the SKU name.

    :ivar name: The sku name.
    :vartype name: str
    :ivar tier: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible
     Values:<br /><br /> **Standard**<br /><br /> **Basic**.
    :vartype tier: str
    :ivar capacity: Specifies the number of virtual machines in the scale set.
    :vartype capacity: int
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The sku name."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br />
     **Standard**<br /><br /> **Basic**."""
    capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the number of virtual machines in the scale set."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        tier: Optional[str] = None,
        capacity: 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 SkuProfile(_Model):
    """Specifies the sku profile for the virtual machine scale set. With this property the customer is
    able to specify a list of VM sizes and an allocation strategy.

    :ivar vm_sizes: Specifies the VM sizes for the virtual machine scale set.
    :vartype vm_sizes: list[~azure.mgmt.compute.models.SkuProfileVMSize]
    :ivar allocation_strategy: Specifies the allocation strategy for the virtual machine scale set
     based on which the VMs will be allocated. Known values are: "LowestPrice", "CapacityOptimized",
     and "Prioritized".
    :vartype allocation_strategy: str or ~azure.mgmt.compute.models.AllocationStrategy
    :ivar automatic_sku_migration_policy: Specifies the policy that controls whether the platform
     may automatically migrate scale set instances to a different VM size from the SKU profile
     depending on platform demands. When omitted, automatic SKU migration is disabled.
    :vartype automatic_sku_migration_policy: ~azure.mgmt.compute.models.AutomaticSkuMigrationPolicy
    """

    vm_sizes: Optional[list["_models.SkuProfileVMSize"]] = rest_field(
        name="vmSizes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the VM sizes for the virtual machine scale set."""
    allocation_strategy: Optional[Union[str, "_models.AllocationStrategy"]] = rest_field(
        name="allocationStrategy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the allocation strategy for the virtual machine scale set based on which the VMs will
     be allocated. Known values are: \"LowestPrice\", \"CapacityOptimized\", and \"Prioritized\"."""
    automatic_sku_migration_policy: Optional["_models.AutomaticSkuMigrationPolicy"] = rest_field(
        name="automaticSkuMigrationPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the policy that controls whether the platform may automatically migrate scale set
     instances to a different VM size from the SKU profile depending on platform demands. When
     omitted, automatic SKU migration is disabled."""

    @overload
    def __init__(
        self,
        *,
        vm_sizes: Optional[list["_models.SkuProfileVMSize"]] = None,
        allocation_strategy: Optional[Union[str, "_models.AllocationStrategy"]] = None,
        automatic_sku_migration_policy: Optional["_models.AutomaticSkuMigrationPolicy"] = 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 SkuProfileVMSize(_Model):
    """Specifies the VM Size.

    :ivar name: Specifies the name of the VM Size.
    :vartype name: str
    :ivar rank: Specifies the rank (a.k.a priority) associated with the VM Size.
    :vartype rank: int
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the name of the VM Size."""
    rank: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the rank (a.k.a priority) associated with the VM Size."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        rank: 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 Snapshot(TrackedResource):
    """Snapshot 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.compute.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: Snapshot resource properties.
    :vartype properties: ~azure.mgmt.compute.models.SnapshotProperties
    :ivar managed_by: Unused. Always Null.
    :vartype managed_by: str
    :ivar sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is
     an optional parameter for incremental snapshot and the default behavior is the SKU will be set
     to the same sku as the previous snapshot.
    :vartype sku: ~azure.mgmt.compute.models.SnapshotSku
    :ivar extended_location: The extended location where the snapshot will be created. Extended
     location cannot be changed.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    """

    properties: Optional["_models.SnapshotProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Snapshot resource properties."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read"])
    """Unused. Always Null."""
    sku: Optional["_models.SnapshotSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional
     parameter for incremental snapshot and the default behavior is the SKU will be set to the same
     sku as the previous snapshot."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location where the snapshot will be created. Extended location cannot be changed."""

    __flattened_items = [
        "time_created",
        "os_type",
        "hyper_v_generation",
        "purchase_plan",
        "supported_capabilities",
        "creation_data",
        "disk_size_gb",
        "disk_size_bytes",
        "disk_state",
        "unique_id",
        "encryption_settings_collection",
        "provisioning_state",
        "incremental",
        "incremental_snapshot_family_id",
        "encryption",
        "network_access_policy",
        "disk_access_id",
        "security_profile",
        "supports_hibernation",
        "public_network_access",
        "completion_percent",
        "copy_completion_error",
        "data_access_auth_mode",
        "snapshot_access_state",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.SnapshotProperties"] = None,
        sku: Optional["_models.SnapshotSku"] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 SnapshotProperties(_Model):
    """Snapshot resource properties.

    :ivar time_created: The time when the snapshot was created.
    :vartype time_created: ~datetime.datetime
    :ivar os_type: The Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
     disks only. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar purchase_plan: Purchase plan information for the image from which the source disk for the
     snapshot was originally created.
    :vartype purchase_plan: ~azure.mgmt.compute.models.DiskPurchasePlan
    :ivar supported_capabilities: List of supported capabilities for the image from which the
     source disk from the snapshot was originally created.
    :vartype supported_capabilities: ~azure.mgmt.compute.models.SupportedCapabilities
    :ivar creation_data: Disk source information. CreationData information cannot be changed after
     the disk has been created. Required.
    :vartype creation_data: ~azure.mgmt.compute.models.CreationData
    :ivar disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
     indicates the size of the disk to create. If this field is present for updates or creation with
     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
     running VM, and can only increase the disk's size.
    :vartype disk_size_gb: int
    :ivar disk_size_bytes: The size of the disk in bytes. This field is read only.
    :vartype disk_size_bytes: int
    :ivar disk_state: The state of the snapshot. Known values are: "Unattached", "Attached",
     "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", and "ActiveUpload".
    :vartype disk_state: str or ~azure.mgmt.compute.models.DiskState
    :ivar unique_id: Unique Guid identifying the resource.
    :vartype unique_id: str
    :ivar encryption_settings_collection: Encryption settings collection used be Azure Disk
     Encryption, can contain multiple encryption settings per disk or snapshot.
    :vartype encryption_settings_collection:
     ~azure.mgmt.compute.models.EncryptionSettingsCollection
    :ivar provisioning_state: The disk provisioning state.
    :vartype provisioning_state: str
    :ivar incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk
     occupy less space than full snapshots and can be diffed.
    :vartype incremental: bool
    :ivar incremental_snapshot_family_id: Incremental snapshots for a disk share an incremental
     snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots
     with the same family id.
    :vartype incremental_snapshot_family_id: str
    :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed
     keys or platform managed keys.
    :vartype encryption: ~azure.mgmt.compute.models.Encryption
    :ivar network_access_policy: Policy for accessing the disk via network. Known values are:
     "AllowAll", "AllowPrivate", and "DenyAll".
    :vartype network_access_policy: str or ~azure.mgmt.compute.models.NetworkAccessPolicy
    :ivar disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
    :vartype disk_access_id: str
    :ivar security_profile: Contains the security related information for the resource.
    :vartype security_profile: ~azure.mgmt.compute.models.DiskSecurityProfile
    :ivar supports_hibernation: Indicates the OS on a snapshot supports hibernation.
    :vartype supports_hibernation: bool
    :ivar public_network_access: Policy for controlling export on the disk. Known values are:
     "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.compute.models.PublicNetworkAccess
    :ivar completion_percent: Percentage complete for the background copy when a resource is
     created via the CopyStart operation.
    :vartype completion_percent: float
    :ivar copy_completion_error: Indicates the error details if the background copy of a resource
     created via the CopyStart operation fails.
    :vartype copy_completion_error: ~azure.mgmt.compute.models.CopyCompletionError
    :ivar data_access_auth_mode: Additional authentication requirements when exporting or uploading
     to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None".
    :vartype data_access_auth_mode: str or ~azure.mgmt.compute.models.DataAccessAuthMode
    :ivar snapshot_access_state: The state of snapshot which determines the access availability of
     the snapshot. Known values are: "Unknown", "Pending", "Available", "InstantAccess", and
     "AvailableWithInstantAccess".
    :vartype snapshot_access_state: str or ~azure.mgmt.compute.models.SnapshotAccessState
    """

    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """The time when the snapshot was created."""
    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values
     are: \"V1\" and \"V2\"."""
    purchase_plan: Optional["_models.DiskPurchasePlan"] = rest_field(
        name="purchasePlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Purchase plan information for the image from which the source disk for the snapshot was
     originally created."""
    supported_capabilities: Optional["_models.SupportedCapabilities"] = rest_field(
        name="supportedCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of supported capabilities for the image from which the source disk from the snapshot was
     originally created."""
    creation_data: "_models.CreationData" = rest_field(
        name="creationData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disk source information. CreationData information cannot be changed after the disk has been
     created. Required."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """If creationData.createOption is Empty, this field is mandatory and it indicates the size of the
     disk to create. If this field is present for updates or creation with other options, it
     indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and
     can only increase the disk's size."""
    disk_size_bytes: Optional[int] = rest_field(name="diskSizeBytes", visibility=["read"])
    """The size of the disk in bytes. This field is read only."""
    disk_state: Optional[Union[str, "_models.DiskState"]] = rest_field(name="diskState", visibility=["read"])
    """The state of the snapshot. Known values are: \"Unattached\", \"Attached\", \"Reserved\",
     \"Frozen\", \"ActiveSAS\", \"ActiveSASFrozen\", \"ReadyToUpload\", and \"ActiveUpload\"."""
    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read"])
    """Unique Guid identifying the resource."""
    encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = rest_field(
        name="encryptionSettingsCollection", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption
     settings per disk or snapshot."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The disk provisioning state."""
    incremental: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space
     than full snapshots and can be diffed."""
    incremental_snapshot_family_id: Optional[str] = rest_field(name="incrementalSnapshotFamilyId", visibility=["read"])
    """Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range
     Diff API can only be called on incremental snapshots with the same family id."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Encryption property can be used to encrypt data at rest with customer managed keys or platform
     managed keys."""
    network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = rest_field(
        name="networkAccessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for accessing the disk via network. Known values are: \"AllowAll\", \"AllowPrivate\",
     and \"DenyAll\"."""
    disk_access_id: Optional[str] = rest_field(
        name="diskAccessId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM id of the DiskAccess resource for using private endpoints on disks."""
    security_profile: Optional["_models.DiskSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the security related information for the resource."""
    supports_hibernation: Optional[bool] = rest_field(
        name="supportsHibernation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the OS on a snapshot supports hibernation."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for controlling export on the disk. Known values are: \"Enabled\" and \"Disabled\"."""
    completion_percent: Optional[float] = rest_field(
        name="completionPercent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Percentage complete for the background copy when a resource is created via the CopyStart
     operation."""
    copy_completion_error: Optional["_models.CopyCompletionError"] = rest_field(
        name="copyCompletionError", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the error details if the background copy of a resource created via the CopyStart
     operation fails."""
    data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = rest_field(
        name="dataAccessAuthMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional authentication requirements when exporting or uploading to a disk or snapshot. Known
     values are: \"AzureActiveDirectory\" and \"None\"."""
    snapshot_access_state: Optional[Union[str, "_models.SnapshotAccessState"]] = rest_field(
        name="snapshotAccessState", visibility=["read"]
    )
    """The state of snapshot which determines the access availability of the snapshot. Known values
     are: \"Unknown\", \"Pending\", \"Available\", \"InstantAccess\", and
     \"AvailableWithInstantAccess\"."""

    @overload
    def __init__(
        self,
        *,
        creation_data: "_models.CreationData",
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = None,
        purchase_plan: Optional["_models.DiskPurchasePlan"] = None,
        supported_capabilities: Optional["_models.SupportedCapabilities"] = None,
        disk_size_gb: Optional[int] = None,
        encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = None,
        incremental: Optional[bool] = None,
        encryption: Optional["_models.Encryption"] = None,
        network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = None,
        disk_access_id: Optional[str] = None,
        security_profile: Optional["_models.DiskSecurityProfile"] = None,
        supports_hibernation: Optional[bool] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        completion_percent: Optional[float] = None,
        copy_completion_error: Optional["_models.CopyCompletionError"] = None,
        data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = 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 SnapshotSku(_Model):
    """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional
    parameter for incremental snapshot and the default behavior is the SKU will be set to the same
    sku as the previous snapshot.

    :ivar name: The sku name. Known values are: "Standard_LRS", "Premium_LRS", and "Standard_ZRS".
    :vartype name: str or ~azure.mgmt.compute.models.SnapshotStorageAccountTypes
    :ivar tier: The sku tier.
    :vartype tier: str
    """

    name: Optional[Union[str, "_models.SnapshotStorageAccountTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The sku name. Known values are: \"Standard_LRS\", \"Premium_LRS\", and \"Standard_ZRS\"."""
    tier: Optional[str] = rest_field(visibility=["read"])
    """The sku tier."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[Union[str, "_models.SnapshotStorageAccountTypes"]] = 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 SnapshotUpdate(_Model):
    """Snapshot update resource.

    :ivar properties: Snapshot resource update properties.
    :vartype properties: ~azure.mgmt.compute.models.SnapshotUpdateProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is
     an optional parameter for incremental snapshot and the default behavior is the SKU will be set
     to the same sku as the previous snapshot.
    :vartype sku: ~azure.mgmt.compute.models.SnapshotSku
    """

    properties: Optional["_models.SnapshotUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Snapshot resource update properties."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    sku: Optional["_models.SnapshotSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional
     parameter for incremental snapshot and the default behavior is the SKU will be set to the same
     sku as the previous snapshot."""

    __flattened_items = [
        "os_type",
        "disk_size_gb",
        "encryption_settings_collection",
        "encryption",
        "network_access_policy",
        "disk_access_id",
        "supports_hibernation",
        "public_network_access",
        "data_access_auth_mode",
        "supported_capabilities",
        "snapshot_access_state",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.SnapshotUpdateProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        sku: Optional["_models.SnapshotSku"] = 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 SnapshotUpdateProperties(_Model):
    """Snapshot resource update properties.

    :ivar os_type: the Operating System type. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
     indicates the size of the disk to create. If this field is present for updates or creation with
     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
     running VM, and can only increase the disk's size.
    :vartype disk_size_gb: int
    :ivar encryption_settings_collection: Encryption settings collection used be Azure Disk
     Encryption, can contain multiple encryption settings per disk or snapshot.
    :vartype encryption_settings_collection:
     ~azure.mgmt.compute.models.EncryptionSettingsCollection
    :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed
     keys or platform managed keys.
    :vartype encryption: ~azure.mgmt.compute.models.Encryption
    :ivar network_access_policy: Policy for accessing the disk via network. Known values are:
     "AllowAll", "AllowPrivate", and "DenyAll".
    :vartype network_access_policy: str or ~azure.mgmt.compute.models.NetworkAccessPolicy
    :ivar disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
    :vartype disk_access_id: str
    :ivar supports_hibernation: Indicates the OS on a snapshot supports hibernation.
    :vartype supports_hibernation: bool
    :ivar public_network_access: Policy for controlling export on the disk. Known values are:
     "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.compute.models.PublicNetworkAccess
    :ivar data_access_auth_mode: Additional authentication requirements when exporting or uploading
     to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None".
    :vartype data_access_auth_mode: str or ~azure.mgmt.compute.models.DataAccessAuthMode
    :ivar supported_capabilities: List of supported capabilities for the image from which the OS
     disk was created.
    :vartype supported_capabilities: ~azure.mgmt.compute.models.SupportedCapabilities
    :ivar snapshot_access_state: The state of snapshot which determines the access availability of
     the snapshot. Known values are: "Unknown", "Pending", "Available", "InstantAccess", and
     "AvailableWithInstantAccess".
    :vartype snapshot_access_state: str or ~azure.mgmt.compute.models.SnapshotAccessState
    """

    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """the Operating System type. Known values are: \"Windows\" and \"Linux\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """If creationData.createOption is Empty, this field is mandatory and it indicates the size of the
     disk to create. If this field is present for updates or creation with other options, it
     indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and
     can only increase the disk's size."""
    encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = rest_field(
        name="encryptionSettingsCollection", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption
     settings per disk or snapshot."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Encryption property can be used to encrypt data at rest with customer managed keys or platform
     managed keys."""
    network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = rest_field(
        name="networkAccessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for accessing the disk via network. Known values are: \"AllowAll\", \"AllowPrivate\",
     and \"DenyAll\"."""
    disk_access_id: Optional[str] = rest_field(
        name="diskAccessId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM id of the DiskAccess resource for using private endpoints on disks."""
    supports_hibernation: Optional[bool] = rest_field(
        name="supportsHibernation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the OS on a snapshot supports hibernation."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for controlling export on the disk. Known values are: \"Enabled\" and \"Disabled\"."""
    data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = rest_field(
        name="dataAccessAuthMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional authentication requirements when exporting or uploading to a disk or snapshot. Known
     values are: \"AzureActiveDirectory\" and \"None\"."""
    supported_capabilities: Optional["_models.SupportedCapabilities"] = rest_field(
        name="supportedCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of supported capabilities for the image from which the OS disk was created."""
    snapshot_access_state: Optional[Union[str, "_models.SnapshotAccessState"]] = rest_field(
        name="snapshotAccessState", visibility=["read"]
    )
    """The state of snapshot which determines the access availability of the snapshot. Known values
     are: \"Unknown\", \"Pending\", \"Available\", \"InstantAccess\", and
     \"AvailableWithInstantAccess\"."""

    @overload
    def __init__(
        self,
        *,
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        disk_size_gb: Optional[int] = None,
        encryption_settings_collection: Optional["_models.EncryptionSettingsCollection"] = None,
        encryption: Optional["_models.Encryption"] = None,
        network_access_policy: Optional[Union[str, "_models.NetworkAccessPolicy"]] = None,
        disk_access_id: Optional[str] = None,
        supports_hibernation: Optional[bool] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        data_access_auth_mode: Optional[Union[str, "_models.DataAccessAuthMode"]] = None,
        supported_capabilities: Optional["_models.SupportedCapabilities"] = 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 SoftDeletePolicy(_Model):
    """Contains information about the soft deletion policy of the gallery.

    :ivar is_soft_delete_enabled: Enables soft-deletion for resources in this gallery, allowing
     them to be recovered within retention time.
    :vartype is_soft_delete_enabled: bool
    """

    is_soft_delete_enabled: Optional[bool] = rest_field(
        name="isSoftDeleteEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables soft-deletion for resources in this gallery, allowing them to be recovered within
     retention time."""

    @overload
    def __init__(
        self,
        *,
        is_soft_delete_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 SourceVault(_Model):
    """The vault id is an Azure Resource Manager Resource id in the form
    /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}.

    :ivar id: Resource Id.
    :vartype id: str
    """

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

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 SpotRestorePolicy(_Model):
    """Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property
    customer can enable or disable automatic restore of the evicted Spot VMSS VM instances
    opportunistically based on capacity availability and pricing constraint.

    :ivar enabled: Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be
     tried to be restored opportunistically based on capacity availability and pricing constraints.
    :vartype enabled: bool
    :ivar restore_timeout: Timeout value expressed as an ISO 8601 time duration after which the
     platform will not try to restore the VMSS SPOT instances.
    :vartype restore_timeout: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be
     restored opportunistically based on capacity availability and pricing constraints."""
    restore_timeout: Optional[str] = rest_field(
        name="restoreTimeout", visibility=["read", "create", "update", "delete", "query"]
    )
    """Timeout value expressed as an ISO 8601 time duration after which the platform will not try to
     restore the VMSS SPOT instances."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        restore_timeout: 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 SshConfiguration(_Model):
    """SSH configuration for Linux based VMs running on Azure.

    :ivar public_keys: The list of SSH public keys used to authenticate with linux based VMs.
    :vartype public_keys: list[~azure.mgmt.compute.models.SshPublicKey]
    """

    public_keys: Optional[list["_models.SshPublicKey"]] = rest_field(
        name="publicKeys", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of SSH public keys used to authenticate with linux based VMs."""

    @overload
    def __init__(
        self,
        *,
        public_keys: Optional[list["_models.SshPublicKey"]] = 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 SshGenerateKeyPairInputParameters(_Model):
    """Parameters for GenerateSshKeyPair.

    :ivar encryption_type: The encryption type of the SSH keys to be generated. See
     SshEncryptionTypes for possible set of values. If not provided, will default to RSA. Known
     values are: "RSA" and "Ed25519".
    :vartype encryption_type: str or ~azure.mgmt.compute.models.SshEncryptionTypes
    """

    encryption_type: Optional[Union[str, "_models.SshEncryptionTypes"]] = rest_field(
        name="encryptionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of
     values. If not provided, will default to RSA. Known values are: \"RSA\" and \"Ed25519\"."""

    @overload
    def __init__(
        self,
        *,
        encryption_type: Optional[Union[str, "_models.SshEncryptionTypes"]] = 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 SshPublicKey(_Model):
    """Contains information about SSH certificate public key and the path on the Linux VM where the
    public key is placed.

    :ivar path: Specifies the full path on the created VM where ssh public key is stored. If the
     file already exists, the specified key is appended to the file. Example:
     /home/user/.ssh/authorized_keys.
    :vartype path: str
    :ivar key_data: SSH public key certificate used to authenticate with the VM through ssh. The
     key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH
     keys on Linux and Mac for Linux VMs in
     Azure]`https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed
     <https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed>`_).
    :vartype key_data: str
    """

    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the full path on the created VM where ssh public key is stored. If the file already
     exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys."""
    key_data: Optional[str] = rest_field(name="keyData", visibility=["read", "create", "update", "delete", "query"])
    """SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at
     least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and
     Mac for Linux VMs in
     Azure]`https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed
     <https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed>`_)."""

    @overload
    def __init__(
        self,
        *,
        path: Optional[str] = None,
        key_data: 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 SshPublicKeyGenerateKeyPairResult(_Model):
    """Response from generation of an SSH key pair.

    :ivar private_key: Private key portion of the key pair used to authenticate to a virtual
     machine through ssh. The private key is returned in RFC3447 format and should be treated as a
     secret. Required.
    :vartype private_key: str
    :ivar public_key: Public key portion of the key pair used to authenticate to a virtual machine
     through ssh. The public key is in ssh-rsa format. Required.
    :vartype public_key: str
    :ivar id: The ARM resource id in the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}.
     Required.
    :vartype id: str
    """

    private_key: str = rest_field(name="privateKey", visibility=["read", "create", "update", "delete", "query"])
    """Private key portion of the key pair used to authenticate to a virtual machine through ssh. The
     private key is returned in RFC3447 format and should be treated as a secret. Required."""
    public_key: str = rest_field(name="publicKey", visibility=["read", "create", "update", "delete", "query"])
    """Public key portion of the key pair used to authenticate to a virtual machine through ssh. The
     public key is in ssh-rsa format. Required."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ARM resource id in the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}.
     Required."""

    @overload
    def __init__(
        self,
        *,
        private_key: str,
        public_key: str,
        id: str,  # pylint: disable=redefined-builtin
    ) -> 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 SshPublicKeyResource(TrackedResource):
    """Specifies information about the SSH public key.

    :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.compute.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: Properties of the SSH public key.
    :vartype properties: ~azure.mgmt.compute.models.SshPublicKeyResourceProperties
    """

    properties: Optional["_models.SshPublicKeyResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the SSH public key."""

    __flattened_items = ["public_key"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.SshPublicKeyResourceProperties"] = 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 SshPublicKeyResourceProperties(_Model):
    """Properties of the SSH public key.

    :ivar public_key: SSH public key used to authenticate to a virtual machine through ssh. If this
     property is not initially provided when the resource is created, the publicKey property will be
     populated when generateKeyPair is called. If the public key is provided upon resource creation,
     the provided public key needs to be at least 2048-bit and in ssh-rsa format.
    :vartype public_key: str
    """

    public_key: Optional[str] = rest_field(name="publicKey", visibility=["read", "create", "update", "delete", "query"])
    """SSH public key used to authenticate to a virtual machine through ssh. If this property is not
     initially provided when the resource is created, the publicKey property will be populated when
     generateKeyPair is called. If the public key is provided upon resource creation, the provided
     public key needs to be at least 2048-bit and in ssh-rsa format."""

    @overload
    def __init__(
        self,
        *,
        public_key: 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 SshPublicKeyUpdateResource(UpdateResource):
    """Specifies information about the SSH public key.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Properties of the SSH public key.
    :vartype properties: ~azure.mgmt.compute.models.SshPublicKeyResourceProperties
    """

    properties: Optional["_models.SshPublicKeyResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the SSH public key."""

    __flattened_items = ["public_key"]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.SshPublicKeyResourceProperties"] = 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 StartRecoveryPolicy(_Model):
    """The configuration parameters used while performing start recovery.

    :ivar enabled: Specifies whether start recovery should be enabled. The default value is false.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether start recovery should be enabled. The default value is false."""

    @overload
    def __init__(
        self,
        *,
        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 StorageProfile(_Model):
    """Specifies the storage settings for the virtual machine disks.

    :ivar image_reference: Specifies information about the image to use. You can specify
     information about platform images, marketplace images, or virtual machine images. This element
     is required when you want to use a platform image, marketplace image, or virtual machine image,
     but is not used in other creation operations.
    :vartype image_reference: ~azure.mgmt.compute.models.ImageReference
    :ivar os_disk: Specifies information about the operating system disk used by the virtual
     machine. For more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype os_disk: ~azure.mgmt.compute.models.OSDisk
    :ivar data_disks: Specifies the parameters that are used to add a data disk to a virtual
     machine. For more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype data_disks: list[~azure.mgmt.compute.models.DataDisk]
    :ivar disk_controller_type: Specifies the disk controller type configured for the VM. **Note:**
     This property will be set to the default disk controller type if not specified provided virtual
     machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the
     operating system disk and VM size from the the specified minimum api version. You need to
     deallocate the VM before updating its disk controller type unless you are updating the VM size
     in the VM configuration which implicitly deallocates and reallocates the VM. Minimum
     api-version: 2022-08-01. Known values are: "SCSI" and "NVMe".
    :vartype disk_controller_type: str or ~azure.mgmt.compute.models.DiskControllerTypes
    :ivar align_regional_disks_to_vm_zone: Specifies whether the regional disks should be
     aligned/moved to the VM zone. This is applicable only for VMs with placement property set.
     Please note that this change is irreversible. Minimum api-version: 2024-11-01.
    :vartype align_regional_disks_to_vm_zone: bool
    """

    image_reference: Optional["_models.ImageReference"] = rest_field(
        name="imageReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the image to use. You can specify information about platform
     images, marketplace images, or virtual machine images. This element is required when you want
     to use a platform image, marketplace image, or virtual machine image, but is not used in other
     creation operations."""
    os_disk: Optional["_models.OSDisk"] = rest_field(
        name="osDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the operating system disk used by the virtual machine. For more
     information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    data_disks: Optional[list["_models.DataDisk"]] = rest_field(
        name="dataDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the parameters that are used to add a data disk to a virtual machine. For more
     information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field(
        name="diskControllerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the disk controller type configured for the VM. **Note:** This property will be set
     to the default disk controller type if not specified provided virtual machine is being created
     with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM
     size from the the specified minimum api version. You need to deallocate the VM before updating
     its disk controller type unless you are updating the VM size in the VM configuration which
     implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. Known values
     are: \"SCSI\" and \"NVMe\"."""
    align_regional_disks_to_vm_zone: Optional[bool] = rest_field(
        name="alignRegionalDisksToVMZone", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the regional disks should be aligned/moved to the VM zone. This is applicable
     only for VMs with placement property set. Please note that this change is irreversible. Minimum
     api-version: 2024-11-01."""

    @overload
    def __init__(
        self,
        *,
        image_reference: Optional["_models.ImageReference"] = None,
        os_disk: Optional["_models.OSDisk"] = None,
        data_disks: Optional[list["_models.DataDisk"]] = None,
        disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = None,
        align_regional_disks_to_vm_zone: 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 SubResourceWithColocationStatus(SubResource):
    """SubResourceWithColocationStatus.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar colocation_status: Describes colocation status of a resource in the Proximity Placement
     Group.
    :vartype colocation_status: ~azure.mgmt.compute.models.InstanceViewStatus
    """

    colocation_status: Optional["_models.InstanceViewStatus"] = rest_field(
        name="colocationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes colocation status of a resource in the Proximity Placement Group."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        colocation_status: Optional["_models.InstanceViewStatus"] = 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 SupportedCapabilities(_Model):
    """List of supported capabilities persisted on the disk resource for VM use.

    :ivar disk_controller_types: The disk controllers that an OS disk supports. If set it can be
     SCSI or SCSI, NVME or NVME, SCSI.
    :vartype disk_controller_types: str
    :ivar accelerated_network: True if the image from which the OS disk is created supports
     accelerated networking.
    :vartype accelerated_network: bool
    :ivar architecture: CPU architecture supported by an OS disk. Known values are: "x64" and
     "Arm64".
    :vartype architecture: str or ~azure.mgmt.compute.models.Architecture
    :ivar supported_security_option: Refers to the security capability of the disk supported to
     create a Trusted launch or Confidential VM. Known values are: "TrustedLaunchSupported" and
     "TrustedLaunchAndConfidentialVMSupported".
    :vartype supported_security_option: str or ~azure.mgmt.compute.models.SupportedSecurityOption
    """

    disk_controller_types: Optional[str] = rest_field(
        name="diskControllerTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME,
     SCSI."""
    accelerated_network: Optional[bool] = rest_field(
        name="acceleratedNetwork", visibility=["read", "create", "update", "delete", "query"]
    )
    """True if the image from which the OS disk is created supports accelerated networking."""
    architecture: Optional[Union[str, "_models.Architecture"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """CPU architecture supported by an OS disk. Known values are: \"x64\" and \"Arm64\"."""
    supported_security_option: Optional[Union[str, "_models.SupportedSecurityOption"]] = rest_field(
        name="supportedSecurityOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Refers to the security capability of the disk supported to create a Trusted launch or
     Confidential VM. Known values are: \"TrustedLaunchSupported\" and
     \"TrustedLaunchAndConfidentialVMSupported\"."""

    @overload
    def __init__(
        self,
        *,
        disk_controller_types: Optional[str] = None,
        accelerated_network: Optional[bool] = None,
        architecture: Optional[Union[str, "_models.Architecture"]] = None,
        supported_security_option: Optional[Union[str, "_models.SupportedSecurityOption"]] = 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.compute.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.compute.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 TargetRegion(_Model):
    """Describes the target region information.

    :ivar name: The name of the region. Required.
    :vartype name: str
    :ivar regional_replica_count: The number of replicas of the Image Version to be created per
     region. This property is updatable.
    :vartype regional_replica_count: int
    :ivar storage_account_type: Specifies the storage account type to be used to store the image.
     This property is not updatable. Known values are: "Standard_LRS", "Standard_ZRS",
     "Premium_LRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountType
    :ivar encryption: Optional. Allows users to provide customer managed keys for encrypting the OS
     and data disks in the gallery artifact.
    :vartype encryption: ~azure.mgmt.compute.models.EncryptionImages
    :ivar exclude_from_latest: Contains the flag setting to hide an image when users specify
     version='latest'.
    :vartype exclude_from_latest: bool
    :ivar additional_replica_sets: List of storage sku with replica count to create direct drive
     replicas.
    :vartype additional_replica_sets: list[~azure.mgmt.compute.models.AdditionalReplicaSet]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the region. Required."""
    regional_replica_count: Optional[int] = rest_field(
        name="regionalReplicaCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of replicas of the Image Version to be created per region. This property is
     updatable."""
    storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type to be used to store the image. This property is not
     updatable. Known values are: \"Standard_LRS\", \"Standard_ZRS\", \"Premium_LRS\", and
     \"PremiumV2_LRS\"."""
    encryption: Optional["_models.EncryptionImages"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in
     the gallery artifact."""
    exclude_from_latest: Optional[bool] = rest_field(
        name="excludeFromLatest", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the flag setting to hide an image when users specify version='latest'."""
    additional_replica_sets: Optional[list["_models.AdditionalReplicaSet"]] = rest_field(
        name="additionalReplicaSets", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of storage sku with replica count to create direct drive replicas."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        regional_replica_count: Optional[int] = None,
        storage_account_type: Optional[Union[str, "_models.StorageAccountType"]] = None,
        encryption: Optional["_models.EncryptionImages"] = None,
        exclude_from_latest: Optional[bool] = None,
        additional_replica_sets: Optional[list["_models.AdditionalReplicaSet"]] = 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 TerminateNotificationProfile(_Model):
    """TerminateNotificationProfile.

    :ivar not_before_timeout: Configurable length of time a Virtual Machine being deleted will have
     to potentially approve the Terminate Scheduled Event before the event is auto approved (timed
     out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes
     (PT5M).
    :vartype not_before_timeout: str
    :ivar enable: Specifies whether the Terminate Scheduled event is enabled or disabled.
    :vartype enable: bool
    """

    not_before_timeout: Optional[str] = rest_field(
        name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configurable length of time a Virtual Machine being deleted will have to potentially approve
     the Terminate Scheduled Event before the event is auto approved (timed out). The configuration
     must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)."""
    enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether the Terminate Scheduled event is enabled or disabled."""

    @overload
    def __init__(
        self,
        *,
        not_before_timeout: Optional[str] = None,
        enable: 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 ThrottledRequestsInput(LogAnalyticsInputBase):
    """Api request input for LogAnalytics getThrottledRequests Api.

    :ivar blob_container_sas_uri: SAS Uri of the logging blob container to which LogAnalytics Api
     writes output logs to. Required.
    :vartype blob_container_sas_uri: str
    :ivar from_time: From time of the query. Required.
    :vartype from_time: ~datetime.datetime
    :ivar to_time: To time of the query. Required.
    :vartype to_time: ~datetime.datetime
    :ivar group_by_throttle_policy: Group query result by Throttle Policy applied.
    :vartype group_by_throttle_policy: bool
    :ivar group_by_operation_name: Group query result by Operation Name.
    :vartype group_by_operation_name: bool
    :ivar group_by_resource_name: Group query result by Resource Name.
    :vartype group_by_resource_name: bool
    :ivar group_by_client_application_id: Group query result by Client Application ID.
    :vartype group_by_client_application_id: bool
    :ivar group_by_user_agent: Group query result by User Agent.
    :vartype group_by_user_agent: bool
    """

    @overload
    def __init__(
        self,
        *,
        blob_container_sas_uri: str,
        from_time: datetime.datetime,
        to_time: datetime.datetime,
        group_by_throttle_policy: Optional[bool] = None,
        group_by_operation_name: Optional[bool] = None,
        group_by_resource_name: Optional[bool] = None,
        group_by_client_application_id: Optional[bool] = None,
        group_by_user_agent: 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 UefiKey(_Model):
    """A UEFI key signature.

    :ivar type: The type of key signature. Known values are: "sha256" and "x509".
    :vartype type: str or ~azure.mgmt.compute.models.UefiKeyType
    :ivar value: The value of the key signature.
    :vartype value: list[str]
    """

    type: Optional[Union[str, "_models.UefiKeyType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of key signature. Known values are: \"sha256\" and \"x509\"."""
    value: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the key signature."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.UefiKeyType"]] = None,
        value: 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 UefiKeySignatures(_Model):
    """Additional UEFI key signatures that will be added to the image in addition to the signature
    templates.

    :ivar pk: The Platform Key of this image version.
    :vartype pk: ~azure.mgmt.compute.models.UefiKey
    :ivar kek: The Key Encryption Keys of this image version.
    :vartype kek: list[~azure.mgmt.compute.models.UefiKey]
    :ivar db: The database of UEFI keys for this image version.
    :vartype db: list[~azure.mgmt.compute.models.UefiKey]
    :ivar dbx: The database of revoked UEFI keys for this image version.
    :vartype dbx: list[~azure.mgmt.compute.models.UefiKey]
    """

    pk: Optional["_models.UefiKey"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Platform Key of this image version."""
    kek: Optional[list["_models.UefiKey"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Key Encryption Keys of this image version."""
    db: Optional[list["_models.UefiKey"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The database of UEFI keys for this image version."""
    dbx: Optional[list["_models.UefiKey"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The database of revoked UEFI keys for this image version."""

    @overload
    def __init__(
        self,
        *,
        pk: Optional["_models.UefiKey"] = None,
        kek: Optional[list["_models.UefiKey"]] = None,
        db: Optional[list["_models.UefiKey"]] = None,
        dbx: Optional[list["_models.UefiKey"]] = 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 UefiSettings(_Model):
    """Specifies the security settings like secure boot and vTPM used while creating the virtual
    machine. Minimum api-version: 2020-12-01.

    :ivar secure_boot_enabled: Specifies whether secure boot should be enabled on the virtual
     machine. Minimum api-version: 2020-12-01.
    :vartype secure_boot_enabled: bool
    :ivar v_tpm_enabled: Specifies whether vTPM should be enabled on the virtual machine. Minimum
     api-version: 2020-12-01.
    :vartype v_tpm_enabled: bool
    """

    secure_boot_enabled: Optional[bool] = rest_field(
        name="secureBootEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version:
     2020-12-01."""
    v_tpm_enabled: Optional[bool] = rest_field(
        name="vTpmEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version:
     2020-12-01."""

    @overload
    def __init__(
        self,
        *,
        secure_boot_enabled: Optional[bool] = None,
        v_tpm_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 UpgradeOperationHistoricalStatusInfo(_Model):
    """Virtual Machine Scale Set OS Upgrade History operation response.

    :ivar properties: Information about the properties of the upgrade operation.
    :vartype properties: ~azure.mgmt.compute.models.UpgradeOperationHistoricalStatusInfoProperties
    :ivar type: Resource type.
    :vartype type: str
    :ivar location: Resource location.
    :vartype location: str
    """

    properties: Optional["_models.UpgradeOperationHistoricalStatusInfoProperties"] = rest_field(visibility=["read"])
    """Information about the properties of the upgrade operation."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Resource location."""


class UpgradeOperationHistoricalStatusInfoProperties(_Model):  # pylint: disable=name-too-long
    """Describes each OS upgrade on the Virtual Machine Scale Set.

    :ivar running_status: Information about the overall status of the upgrade operation.
    :vartype running_status: ~azure.mgmt.compute.models.UpgradeOperationHistoryStatus
    :ivar progress: Counts of the VMs in each state.
    :vartype progress: ~azure.mgmt.compute.models.RollingUpgradeProgressInfo
    :ivar error: Error Details for this upgrade if there are any.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    :ivar started_by: Invoker of the Upgrade Operation. Known values are: "Unknown", "User", and
     "Platform".
    :vartype started_by: str or ~azure.mgmt.compute.models.UpgradeOperationInvoker
    :ivar target_image_reference: Image Reference details.
    :vartype target_image_reference: ~azure.mgmt.compute.models.ImageReference
    :ivar rollback_info: Information about OS rollback if performed.
    :vartype rollback_info: ~azure.mgmt.compute.models.RollbackStatusInfo
    """

    running_status: Optional["_models.UpgradeOperationHistoryStatus"] = rest_field(
        name="runningStatus", visibility=["read"]
    )
    """Information about the overall status of the upgrade operation."""
    progress: Optional["_models.RollingUpgradeProgressInfo"] = rest_field(visibility=["read"])
    """Counts of the VMs in each state."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """Error Details for this upgrade if there are any."""
    started_by: Optional[Union[str, "_models.UpgradeOperationInvoker"]] = rest_field(
        name="startedBy", visibility=["read"]
    )
    """Invoker of the Upgrade Operation. Known values are: \"Unknown\", \"User\", and \"Platform\"."""
    target_image_reference: Optional["_models.ImageReference"] = rest_field(
        name="targetImageReference", visibility=["read"]
    )
    """Image Reference details."""
    rollback_info: Optional["_models.RollbackStatusInfo"] = rest_field(name="rollbackInfo", visibility=["read"])
    """Information about OS rollback if performed."""


class UpgradeOperationHistoryStatus(_Model):
    """Information about the current running state of the overall upgrade.

    :ivar code: Code indicating the current status of the upgrade. Known values are:
     "RollingForward", "Cancelled", "Completed", and "Faulted".
    :vartype code: str or ~azure.mgmt.compute.models.UpgradeState
    :ivar start_time: Start time of the upgrade.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: End time of the upgrade.
    :vartype end_time: ~datetime.datetime
    """

    code: Optional[Union[str, "_models.UpgradeState"]] = rest_field(visibility=["read"])
    """Code indicating the current status of the upgrade. Known values are: \"RollingForward\",
     \"Cancelled\", \"Completed\", and \"Faulted\"."""
    start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
    """Start time of the upgrade."""
    end_time: Optional[datetime.datetime] = rest_field(name="endTime", visibility=["read"], format="rfc3339")
    """End time of the upgrade."""


class UpgradePolicy(_Model):
    """Describes an upgrade policy - automatic, manual, or rolling.

    :ivar mode: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br />
     Possible values are:<br /><br /> **Manual** - You  control the application of updates to
     virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br />
     **Automatic** - All virtual machines in the scale set are  automatically updated at the same
     time. Known values are: "Automatic", "Manual", and "Rolling".
    :vartype mode: str or ~azure.mgmt.compute.models.UpgradeMode
    :ivar rolling_upgrade_policy: The configuration parameters used while performing a rolling
     upgrade.
    :vartype rolling_upgrade_policy: ~azure.mgmt.compute.models.RollingUpgradePolicy
    :ivar automatic_os_upgrade_policy: Configuration parameters used for performing automatic OS
     Upgrade.
    :vartype automatic_os_upgrade_policy: ~azure.mgmt.compute.models.AutomaticOSUpgradePolicy
    """

    mode: Optional[Union[str, "_models.UpgradeMode"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible
     values are:<br /><br /> **Manual** - You  control the application of updates to virtual
     machines in the scale set. You do this by using the manualUpgrade action.<br /><br />
     **Automatic** - All virtual machines in the scale set are  automatically updated at the same
     time. Known values are: \"Automatic\", \"Manual\", and \"Rolling\"."""
    rolling_upgrade_policy: Optional["_models.RollingUpgradePolicy"] = rest_field(
        name="rollingUpgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used while performing a rolling upgrade."""
    automatic_os_upgrade_policy: Optional["_models.AutomaticOSUpgradePolicy"] = rest_field(
        name="automaticOSUpgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration parameters used for performing automatic OS Upgrade."""

    @overload
    def __init__(
        self,
        *,
        mode: Optional[Union[str, "_models.UpgradeMode"]] = None,
        rolling_upgrade_policy: Optional["_models.RollingUpgradePolicy"] = None,
        automatic_os_upgrade_policy: Optional["_models.AutomaticOSUpgradePolicy"] = 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 Usage(_Model):
    """Describes Compute Resource Usage.

    :ivar unit: An enum describing the unit of usage measurement. Required. Default value is
     "Count".
    :vartype unit: str
    :ivar current_value: The current usage of the resource. Required.
    :vartype current_value: int
    :ivar limit: The maximum permitted usage of the resource. Required.
    :vartype limit: int
    :ivar name: The name of the type of usage. Required.
    :vartype name: ~azure.mgmt.compute.models.UsageName
    """

    unit: Literal["Count"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An enum describing the unit of usage measurement. Required. Default value is \"Count\"."""
    current_value: int = rest_field(name="currentValue", visibility=["read", "create", "update", "delete", "query"])
    """The current usage of the resource. Required."""
    limit: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum permitted usage of the resource. Required."""
    name: "_models.UsageName" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the type of usage. Required."""

    @overload
    def __init__(
        self,
        *,
        current_value: int,
        limit: int,
        name: "_models.UsageName",
    ) -> 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)
        self.unit: Literal["Count"] = "Count"


class UsageName(_Model):
    """The Usage Names.

    :ivar value: The name of the resource.
    :vartype value: str
    :ivar localized_value: The localized name of the resource.
    :vartype localized_value: str
    """

    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the resource."""
    localized_value: Optional[str] = rest_field(
        name="localizedValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The localized name of the resource."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[str] = None,
        localized_value: 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 UserArtifactManage(_Model):
    """UserArtifactManage.

    :ivar install: Required. The path and arguments to install the gallery application. This is
     limited to 4096 characters. Required.
    :vartype install: str
    :ivar remove: Required. The path and arguments to remove the gallery application. This is
     limited to 4096 characters. Required.
    :vartype remove: str
    :ivar update_property: Optional. The path and arguments to update the gallery application. If
     not present, then update operation will invoke remove command on the previous version and
     install command on the current version of the gallery application. This is limited to 4096
     characters.
    :vartype update_property: str
    """

    install: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. The path and arguments to install the gallery application. This is limited to 4096
     characters. Required."""
    remove: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. The path and arguments to remove the gallery application. This is limited to 4096
     characters. Required."""
    update_property: Optional[str] = rest_field(
        name="update", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="update"
    )
    """Optional. The path and arguments to update the gallery application. If not present, then update
     operation will invoke remove command on the previous version and install command on the current
     version of the gallery application. This is limited to 4096 characters."""

    @overload
    def __init__(
        self,
        *,
        install: str,
        remove: str,
        update_property: 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 UserArtifactSettings(_Model):
    """Additional settings for the VM app that contains the target package and config file name when
    it is deployed to target VM or VM scale set.

    :ivar package_file_name: Optional. The name to assign the downloaded package file on the VM.
     This is limited to 4096 characters. If not specified, the package file will be named the same
     as the Gallery Application name.
    :vartype package_file_name: str
    :ivar config_file_name: Optional. The name to assign the downloaded config file on the VM. This
     is limited to 4096 characters. If not specified, the config file will be named the Gallery
     Application name appended with "_config".
    :vartype config_file_name: str
    :ivar script_behavior_after_reboot: Optional. The action to be taken with regards to
     install/update/remove of the gallery application in the event of a reboot. Known values are:
     "None" and "Rerun".
    :vartype script_behavior_after_reboot: str or
     ~azure.mgmt.compute.models.GalleryApplicationScriptRebootBehavior
    """

    package_file_name: Optional[str] = rest_field(
        name="packageFileName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The name to assign the downloaded package file on the VM. This is limited to 4096
     characters. If not specified, the package file will be named the same as the Gallery
     Application name."""
    config_file_name: Optional[str] = rest_field(
        name="configFileName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The name to assign the downloaded config file on the VM. This is limited to 4096
     characters. If not specified, the config file will be named the Gallery Application name
     appended with \"_config\"."""
    script_behavior_after_reboot: Optional[Union[str, "_models.GalleryApplicationScriptRebootBehavior"]] = rest_field(
        name="scriptBehaviorAfterReboot", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The action to be taken with regards to install/update/remove of the gallery
     application in the event of a reboot. Known values are: \"None\" and \"Rerun\"."""

    @overload
    def __init__(
        self,
        *,
        package_file_name: Optional[str] = None,
        config_file_name: Optional[str] = None,
        script_behavior_after_reboot: Optional[Union[str, "_models.GalleryApplicationScriptRebootBehavior"]] = 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 UserArtifactSource(_Model):
    """The source image from which the Image Version is going to be created.

    :ivar media_link: Required. The mediaLink of the artifact, must be a readable storage page
     blob. Required.
    :vartype media_link: str
    :ivar default_configuration_link: Optional. The defaultConfigurationLink of the artifact, must
     be a readable storage page blob.
    :vartype default_configuration_link: str
    """

    media_link: str = rest_field(name="mediaLink", visibility=["read", "create", "update", "delete", "query"])
    """Required. The mediaLink of the artifact, must be a readable storage page blob. Required."""
    default_configuration_link: Optional[str] = rest_field(
        name="defaultConfigurationLink", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob."""

    @overload
    def __init__(
        self,
        *,
        media_link: str,
        default_configuration_link: 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 UserAssignedIdentitiesValue(_Model):
    """UserAssignedIdentitiesValue.

    :ivar principal_id: The principal id of user assigned identity.
    :vartype principal_id: str
    :ivar client_id: The client id of user assigned identity.
    :vartype client_id: str
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal id of user assigned identity."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read"])
    """The client id of user assigned identity."""


class UserInitiatedReboot(_Model):
    """Specifies Reboot related Scheduled Event related configurations.

    :ivar automatically_approve: Specifies Reboot Scheduled Event related configurations.
    :vartype automatically_approve: bool
    """

    automatically_approve: Optional[bool] = rest_field(
        name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Reboot Scheduled Event related configurations."""

    @overload
    def __init__(
        self,
        *,
        automatically_approve: 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 UserInitiatedRedeploy(_Model):
    """Specifies Redeploy related Scheduled Event related configurations.

    :ivar automatically_approve: Specifies Redeploy Scheduled Event related configurations.
    :vartype automatically_approve: bool
    """

    automatically_approve: Optional[bool] = rest_field(
        name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Redeploy Scheduled Event related configurations."""

    @overload
    def __init__(
        self,
        *,
        automatically_approve: 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 ValidationsProfile(_Model):
    """This is the validations profile of a Gallery Image Version.

    :ivar validation_etag: The published time of the image version.
    :vartype validation_etag: str
    :ivar executed_validations:
    :vartype executed_validations: list[~azure.mgmt.compute.models.ExecutedValidation]
    :ivar platform_attributes: This specifies the pub, offer, sku and version of the image version
     metadata.
    :vartype platform_attributes: list[~azure.mgmt.compute.models.PlatformAttribute]
    """

    validation_etag: Optional[str] = rest_field(
        name="validationEtag", visibility=["read", "create", "update", "delete", "query"]
    )
    """The published time of the image version."""
    executed_validations: Optional[list["_models.ExecutedValidation"]] = rest_field(
        name="executedValidations", visibility=["read", "create", "update", "delete", "query"]
    )
    platform_attributes: Optional[list["_models.PlatformAttribute"]] = rest_field(
        name="platformAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """This specifies the pub, offer, sku and version of the image version metadata."""

    @overload
    def __init__(
        self,
        *,
        validation_etag: Optional[str] = None,
        executed_validations: Optional[list["_models.ExecutedValidation"]] = None,
        platform_attributes: Optional[list["_models.PlatformAttribute"]] = 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 VaultCertificate(_Model):
    """Describes a single certificate reference in a Key Vault, and where the certificate should
    reside on the VM.

    :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as
     a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault
     <https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add>`_. In this case, your
     certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded
     in UTF-8: <br><br> {<br>  "data":"<Base64-encoded-certificate>",<br>  "dataType":"pfx",<br>
     "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is
     recommended to use the `Azure Key Vault virtual machine extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_.
    :vartype certificate_url: str
    :ivar certificate_store: For Windows VMs, specifies the certificate store on the Virtual
     Machine to which the certificate should be added. The specified certificate store is implicitly
     in the LocalMachine account. For Linux VMs, the certificate file is placed under the
     /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509
     certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are
     .pem formatted.
    :vartype certificate_store: str
    """

    certificate_url: Optional[str] = rest_field(
        name="certificateUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a
     secret to the Key Vault, see `Add a key or secret to the key vault
     <https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add>`_. In this case, your
     certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded
     in UTF-8: <br><br> {<br>  \"data\":\"<Base64-encoded-certificate>\",<br>
     \"dataType\":\"pfx\",<br>  \"password\":\"<pfx-file-password>\"<br>} <br> To install
     certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine
     extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_."""
    certificate_store: Optional[str] = rest_field(
        name="certificateStore", visibility=["read", "create", "update", "delete", "query"]
    )
    """For Windows VMs, specifies the certificate store on the Virtual Machine to which the
     certificate should be added. The specified certificate store is implicitly in the LocalMachine
     account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory,
     with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and
     &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted."""

    @overload
    def __init__(
        self,
        *,
        certificate_url: Optional[str] = None,
        certificate_store: 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 VaultSecretGroup(_Model):
    """Describes a set of certificates which are all in the same Key Vault.

    :ivar source_vault: The relative URL of the Key Vault containing all of the certificates in
     VaultCertificates.
    :vartype source_vault: ~azure.mgmt.compute.models.SubResource
    :ivar vault_certificates: The list of key vault references in SourceVault which contain
     certificates.
    :vartype vault_certificates: list[~azure.mgmt.compute.models.VaultCertificate]
    """

    source_vault: Optional["_models.SubResource"] = rest_field(
        name="sourceVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The relative URL of the Key Vault containing all of the certificates in VaultCertificates."""
    vault_certificates: Optional[list["_models.VaultCertificate"]] = rest_field(
        name="vaultCertificates", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of key vault references in SourceVault which contain certificates."""

    @overload
    def __init__(
        self,
        *,
        source_vault: Optional["_models.SubResource"] = None,
        vault_certificates: Optional[list["_models.VaultCertificate"]] = 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 VirtualHardDisk(_Model):
    """Describes the uri of a disk.

    :ivar uri: Specifies the virtual hard disk's uri.
    :vartype uri: str
    """

    uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the virtual hard disk's uri."""

    @overload
    def __init__(
        self,
        *,
        uri: 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 VirtualMachine(TrackedResource):
    """Describes a 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.compute.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: Describes the properties of a Virtual Machine.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineProperties
    :ivar plan: Specifies information about the marketplace image used to create the virtual
     machine. This element is only used for marketplace images. Before you can use a marketplace
     image from an API, you must enable the image for programmatic use.  In the Azure portal, find
     the marketplace image that you want to use and then click **Want to deploy programmatically,
     Get Started ->**. Enter any required information and then click **Save**.
    :vartype plan: ~azure.mgmt.compute.models.Plan
    :ivar resources: The virtual machine child extension resources.
    :vartype resources: list[~azure.mgmt.compute.models.VirtualMachineExtension]
    :ivar identity: The identity of the virtual machine, if configured.
    :vartype identity: ~azure.mgmt.compute.models.VirtualMachineIdentity
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    :ivar extended_location: The extended location of the Virtual Machine.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    :ivar managed_by: ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if
     the VM is part of the VMSS. This property is used by platform for internal resource group
     delete optimization.
    :vartype managed_by: str
    :ivar etag: Etag is property returned in Create/Update/Get response of the VM, so that customer
     can supply it in the header to ensure optimistic updates.
    :vartype etag: str
    :ivar placement: Placement section specifies the user-defined constraints for virtual machine
     hardware placement. This property cannot be changed once VM is provisioned. Minimum
     api-version: 2024-11-01.
    :vartype placement: ~azure.mgmt.compute.models.Placement
    """

    properties: Optional["_models.VirtualMachineProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine."""
    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the marketplace image used to create the virtual machine. This
     element is only used for marketplace images. Before you can use a marketplace image from an
     API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace
     image that you want to use and then click **Want to deploy programmatically, Get Started ->**.
     Enter any required information and then click **Save**."""
    resources: Optional[list["_models.VirtualMachineExtension"]] = rest_field(visibility=["read"])
    """The virtual machine child extension resources."""
    identity: Optional["_models.VirtualMachineIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the virtual machine, if configured."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location of the Virtual Machine."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read"])
    """ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of
     the VMSS. This property is used by platform for internal resource group delete optimization."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Etag is property returned in Create/Update/Get response of the VM, so that customer can supply
     it in the header to ensure optimistic updates."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Placement section specifies the user-defined constraints for virtual machine hardware
     placement. This property cannot be changed once VM is provisioned. Minimum api-version:
     2024-11-01."""

    __flattened_items = [
        "hardware_profile",
        "scheduled_events_policy",
        "storage_profile",
        "additional_capabilities",
        "os_profile",
        "network_profile",
        "security_profile",
        "diagnostics_profile",
        "availability_set",
        "virtual_machine_scale_set",
        "proximity_placement_group",
        "priority",
        "eviction_policy",
        "billing_profile",
        "host",
        "host_group",
        "provisioning_state",
        "instance_view",
        "license_type",
        "vm_id",
        "extensions_time_budget",
        "platform_fault_domain",
        "scheduled_events_profile",
        "user_data",
        "capacity_reservation",
        "interconnect_block_profile",
        "application_profile",
        "time_created",
        "resiliency_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineProperties"] = None,
        plan: Optional["_models.Plan"] = None,
        identity: Optional["_models.VirtualMachineIdentity"] = None,
        zones: Optional[list[str]] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        placement: Optional["_models.Placement"] = 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 VirtualMachineAgentInstanceView(_Model):
    """The instance view of the VM Agent running on the virtual machine.

    :ivar vm_agent_version: The VM Agent full version.
    :vartype vm_agent_version: str
    :ivar extension_handlers: The virtual machine extension handler instance view.
    :vartype extension_handlers:
     list[~azure.mgmt.compute.models.VirtualMachineExtensionHandlerInstanceView]
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    vm_agent_version: Optional[str] = rest_field(
        name="vmAgentVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The VM Agent full version."""
    extension_handlers: Optional[list["_models.VirtualMachineExtensionHandlerInstanceView"]] = rest_field(
        name="extensionHandlers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine extension handler instance view."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        vm_agent_version: Optional[str] = None,
        extension_handlers: Optional[list["_models.VirtualMachineExtensionHandlerInstanceView"]] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 VirtualMachineAssessPatchesResult(_Model):
    """Describes the properties of an AssessPatches result.

    :ivar status: The overall success or failure status of the operation. It remains "InProgress"
     until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded",
     or "CompletedWithWarnings.". Known values are: "Unknown", "InProgress", "Failed", "Succeeded",
     and "CompletedWithWarnings".
    :vartype status: str or ~azure.mgmt.compute.models.PatchOperationStatus
    :ivar assessment_activity_id: The activity ID of the operation that produced this result. It is
     used to correlate across CRP and extension logs.
    :vartype assessment_activity_id: str
    :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially
     installed patches require a reboot to complete installation but the reboot has not yet
     occurred.
    :vartype reboot_pending: bool
    :ivar critical_and_security_patch_count: The number of critical or security patches that have
     been detected as available and not yet installed.
    :vartype critical_and_security_patch_count: int
    :ivar other_patch_count: The number of all available patches excluding critical and security.
    :vartype other_patch_count: int
    :ivar start_date_time: The UTC timestamp when the operation began.
    :vartype start_date_time: ~datetime.datetime
    :ivar available_patches: The list of patches that have been detected as available for
     installation.
    :vartype available_patches:
     list[~azure.mgmt.compute.models.VirtualMachineSoftwarePatchProperties]
    :ivar error: The errors that were encountered during execution of the operation. The details
     array contains the list of them.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    status: Optional[Union[str, "_models.PatchOperationStatus"]] = rest_field(visibility=["read"])
    """The overall success or failure status of the operation. It remains \"InProgress\" until the
     operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or
     \"CompletedWithWarnings.\". Known values are: \"Unknown\", \"InProgress\", \"Failed\",
     \"Succeeded\", and \"CompletedWithWarnings\"."""
    assessment_activity_id: Optional[str] = rest_field(name="assessmentActivityId", visibility=["read"])
    """The activity ID of the operation that produced this result. It is used to correlate across CRP
     and extension logs."""
    reboot_pending: Optional[bool] = rest_field(name="rebootPending", visibility=["read"])
    """The overall reboot status of the VM. It will be true when partially installed patches require a
     reboot to complete installation but the reboot has not yet occurred."""
    critical_and_security_patch_count: Optional[int] = rest_field(
        name="criticalAndSecurityPatchCount", visibility=["read"]
    )
    """The number of critical or security patches that have been detected as available and not yet
     installed."""
    other_patch_count: Optional[int] = rest_field(name="otherPatchCount", visibility=["read"])
    """The number of all available patches excluding critical and security."""
    start_date_time: Optional[datetime.datetime] = rest_field(
        name="startDateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp when the operation began."""
    available_patches: Optional[list["_models.VirtualMachineSoftwarePatchProperties"]] = rest_field(
        name="availablePatches", visibility=["read"]
    )
    """The list of patches that have been detected as available for installation."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """The errors that were encountered during execution of the operation. The details array contains
     the list of them."""


class VirtualMachineCaptureParameters(_Model):
    """Capture Virtual Machine parameters.

    :ivar vhd_prefix: The captured virtual hard disk's name prefix. Required.
    :vartype vhd_prefix: str
    :ivar destination_container_name: The destination container name. Required.
    :vartype destination_container_name: str
    :ivar overwrite_vhds: Specifies whether to overwrite the destination virtual hard disk, in case
     of conflict. Required.
    :vartype overwrite_vhds: bool
    """

    vhd_prefix: str = rest_field(name="vhdPrefix", visibility=["read", "create", "update", "delete", "query"])
    """The captured virtual hard disk's name prefix. Required."""
    destination_container_name: str = rest_field(
        name="destinationContainerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The destination container name. Required."""
    overwrite_vhds: bool = rest_field(name="overwriteVhds", visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
     Required."""

    @overload
    def __init__(
        self,
        *,
        vhd_prefix: str,
        destination_container_name: str,
        overwrite_vhds: bool,
    ) -> 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 VirtualMachineCaptureResult(SubResource):
    """Output of virtual machine capture operation.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar schema: the schema of the captured virtual machine.
    :vartype schema: str
    :ivar content_version: the version of the content.
    :vartype content_version: str
    :ivar parameters: parameters of the captured virtual machine.
    :vartype parameters: any
    :ivar resources: a list of resource items of the captured virtual machine.
    :vartype resources: list[any]
    """

    schema: Optional[str] = rest_field(name="$schema", visibility=["read"])
    """the schema of the captured virtual machine."""
    content_version: Optional[str] = rest_field(name="contentVersion", visibility=["read"])
    """the version of the content."""
    parameters: Optional[Any] = rest_field(visibility=["read"])
    """parameters of the captured virtual machine."""
    resources: Optional[list[Any]] = rest_field(visibility=["read"])
    """a list of resource items of the captured virtual machine."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> 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 VirtualMachineExtension(TrackedResource):
    """Describes a Virtual Machine Extension.

    :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.compute.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: Describes the properties of a Virtual Machine Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineExtensionProperties
    """

    properties: Optional["_models.VirtualMachineExtensionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Extension."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "provisioning_state",
        "instance_view",
        "suppress_failures",
        "protected_settings_from_key_vault",
        "provision_after_extensions",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineExtensionProperties"] = 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 VirtualMachineExtensionHandlerInstanceView(_Model):  # pylint: disable=name-too-long
    """The instance view of a virtual machine extension handler.

    :ivar type: Specifies the type of the extension; an example is "CustomScriptExtension".
    :vartype type: str
    :ivar type_handler_version: Specifies the version of the script handler.
    :vartype type_handler_version: str
    :ivar status: The extension handler status.
    :vartype status: ~azure.mgmt.compute.models.InstanceViewStatus
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the extension; an example is \"CustomScriptExtension\"."""
    type_handler_version: Optional[str] = rest_field(
        name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the version of the script handler."""
    status: Optional["_models.InstanceViewStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension handler status."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[str] = None,
        type_handler_version: Optional[str] = None,
        status: Optional["_models.InstanceViewStatus"] = 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 VirtualMachineExtensionImage(TrackedResource):
    """Describes a Virtual Machine Extension Image.

    :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.compute.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: Describes the properties of a Virtual Machine Extension Image.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineExtensionImageProperties
    """

    properties: Optional["_models.VirtualMachineExtensionImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Extension Image."""

    __flattened_items = [
        "operating_system",
        "compute_role",
        "handler_schema",
        "vm_scale_set_enabled",
        "supports_multiple_extensions",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineExtensionImageProperties"] = 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 VirtualMachineExtensionImageProperties(_Model):
    """Describes the properties of a Virtual Machine Extension Image.

    :ivar operating_system: The operating system this extension supports. Required.
    :vartype operating_system: str
    :ivar compute_role: The type of role (IaaS or PaaS) this extension supports. Required.
    :vartype compute_role: str
    :ivar handler_schema: The schema defined by publisher, where extension consumers should provide
     settings in a matching schema. Required.
    :vartype handler_schema: str
    :ivar vm_scale_set_enabled: Whether the extension can be used on xRP VMScaleSets. By default
     existing extensions are usable on scalesets, but there might be cases where a publisher wants
     to explicitly indicate the extension is only enabled for CRP VMs but not VMSS.
    :vartype vm_scale_set_enabled: bool
    :ivar supports_multiple_extensions: Whether the handler can support multiple extensions.
    :vartype supports_multiple_extensions: bool
    """

    operating_system: str = rest_field(
        name="operatingSystem", visibility=["read", "create", "update", "delete", "query"]
    )
    """The operating system this extension supports. Required."""
    compute_role: str = rest_field(name="computeRole", visibility=["read", "create", "update", "delete", "query"])
    """The type of role (IaaS or PaaS) this extension supports. Required."""
    handler_schema: str = rest_field(name="handlerSchema", visibility=["read", "create", "update", "delete", "query"])
    """The schema defined by publisher, where extension consumers should provide settings in a
     matching schema. Required."""
    vm_scale_set_enabled: Optional[bool] = rest_field(
        name="vmScaleSetEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable
     on scalesets, but there might be cases where a publisher wants to explicitly indicate the
     extension is only enabled for CRP VMs but not VMSS."""
    supports_multiple_extensions: Optional[bool] = rest_field(
        name="supportsMultipleExtensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether the handler can support multiple extensions."""

    @overload
    def __init__(
        self,
        *,
        operating_system: str,
        compute_role: str,
        handler_schema: str,
        vm_scale_set_enabled: Optional[bool] = None,
        supports_multiple_extensions: 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 VirtualMachineExtensionInstanceView(_Model):
    """The instance view of a virtual machine extension.

    :ivar name: The virtual machine extension name.
    :vartype name: str
    :ivar type: Specifies the type of the extension; an example is "CustomScriptExtension".
    :vartype type: str
    :ivar type_handler_version: Specifies the version of the script handler.
    :vartype type_handler_version: str
    :ivar substatuses: The resource status information.
    :vartype substatuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine extension name."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the extension; an example is \"CustomScriptExtension\"."""
    type_handler_version: Optional[str] = rest_field(
        name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the version of the script handler."""
    substatuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        type: Optional[str] = None,
        type_handler_version: Optional[str] = None,
        substatuses: Optional[list["_models.InstanceViewStatus"]] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 VirtualMachineExtensionProperties(_Model):
    """Describes the properties of a Virtual Machine Extension.

    :ivar force_update_tag: How the extension handler should be forced to update even if the
     extension configuration has not changed.
    :vartype force_update_tag: str
    :ivar publisher: The name of the extension handler publisher.
    :vartype publisher: str
    :ivar type: Specifies the type of the extension; an example is "CustomScriptExtension".
    :vartype type: str
    :ivar type_handler_version: Specifies the version of the script handler.
    :vartype type_handler_version: str
    :ivar auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
     version if one is available at deployment time. Once deployed, however, the extension will not
     upgrade minor versions unless redeployed, even with this property set to true.
    :vartype auto_upgrade_minor_version: bool
    :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically
     upgraded by the platform if there is a newer version of the extension available.
    :vartype enable_automatic_upgrade: bool
    :ivar settings: Json formatted public settings for the extension.
    :vartype settings: any
    :ivar protected_settings: The extension can contain either protectedSettings or
     protectedSettingsFromKeyVault or no protected settings at all.
    :vartype protected_settings: any
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar instance_view: The virtual machine extension instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.VirtualMachineExtensionInstanceView
    :ivar suppress_failures: Indicates whether failures stemming from the extension will be
     suppressed (Operational failures such as not connecting to the VM will not be suppressed
     regardless of this value). The default is false.
    :vartype suppress_failures: bool
    :ivar protected_settings_from_key_vault: The extensions protected settings that are passed by
     reference, and consumed from key vault.
    :vartype protected_settings_from_key_vault: ~azure.mgmt.compute.models.KeyVaultSecretReference
    :ivar provision_after_extensions: Collection of extension names after which this extension
     needs to be provisioned.
    :vartype provision_after_extensions: list[str]
    """

    force_update_tag: Optional[str] = rest_field(
        name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"]
    )
    """How the extension handler should be forced to update even if the extension configuration has
     not changed."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the extension handler publisher."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the extension; an example is \"CustomScriptExtension\"."""
    type_handler_version: Optional[str] = rest_field(
        name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the version of the script handler."""
    auto_upgrade_minor_version: Optional[bool] = rest_field(
        name="autoUpgradeMinorVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should use a newer minor version if one is available at
     deployment time. Once deployed, however, the extension will not upgrade minor versions unless
     redeployed, even with this property set to true."""
    enable_automatic_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should be automatically upgraded by the platform if there is a
     newer version of the extension available."""
    settings: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Json formatted public settings for the extension."""
    protected_settings: Optional[Any] = rest_field(
        name="protectedSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no
     protected settings at all."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    instance_view: Optional["_models.VirtualMachineExtensionInstanceView"] = rest_field(
        name="instanceView", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine extension instance view."""
    suppress_failures: Optional[bool] = rest_field(
        name="suppressFailures", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether failures stemming from the extension will be suppressed (Operational failures
     such as not connecting to the VM will not be suppressed regardless of this value). The default
     is false."""
    protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = rest_field(
        name="protectedSettingsFromKeyVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extensions protected settings that are passed by reference, and consumed from key vault."""
    provision_after_extensions: Optional[list[str]] = rest_field(
        name="provisionAfterExtensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of extension names after which this extension needs to be provisioned."""

    @overload
    def __init__(
        self,
        *,
        force_update_tag: Optional[str] = None,
        publisher: Optional[str] = None,
        type: Optional[str] = None,
        type_handler_version: Optional[str] = None,
        auto_upgrade_minor_version: Optional[bool] = None,
        enable_automatic_upgrade: Optional[bool] = None,
        settings: Optional[Any] = None,
        protected_settings: Optional[Any] = None,
        instance_view: Optional["_models.VirtualMachineExtensionInstanceView"] = None,
        suppress_failures: Optional[bool] = None,
        protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = None,
        provision_after_extensions: 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 VirtualMachineExtensionsListResult(_Model):
    """The List Extension operation response.

    :ivar value: The list of extensions.
    :vartype value: list[~azure.mgmt.compute.models.VirtualMachineExtension]
    """

    value: Optional[list["_models.VirtualMachineExtension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of extensions."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[list["_models.VirtualMachineExtension"]] = 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 VirtualMachineExtensionUpdate(UpdateResource):
    """Describes a Virtual Machine Extension.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a Virtual Machine Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineExtensionUpdateProperties
    """

    properties: Optional["_models.VirtualMachineExtensionUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Extension."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "suppress_failures",
        "protected_settings_from_key_vault",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineExtensionUpdateProperties"] = 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 VirtualMachineExtensionUpdateProperties(_Model):
    """Describes the properties of a Virtual Machine Extension.

    :ivar force_update_tag: How the extension handler should be forced to update even if the
     extension configuration has not changed.
    :vartype force_update_tag: str
    :ivar publisher: The name of the extension handler publisher.
    :vartype publisher: str
    :ivar type: Specifies the type of the extension; an example is "CustomScriptExtension".
    :vartype type: str
    :ivar type_handler_version: Specifies the version of the script handler.
    :vartype type_handler_version: str
    :ivar auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
     version if one is available at deployment time. Once deployed, however, the extension will not
     upgrade minor versions unless redeployed, even with this property set to true.
    :vartype auto_upgrade_minor_version: bool
    :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically
     upgraded by the platform if there is a newer version of the extension available.
    :vartype enable_automatic_upgrade: bool
    :ivar settings: Json formatted public settings for the extension.
    :vartype settings: any
    :ivar protected_settings: The extension can contain either protectedSettings or
     protectedSettingsFromKeyVault or no protected settings at all.
    :vartype protected_settings: any
    :ivar suppress_failures: Indicates whether failures stemming from the extension will be
     suppressed (Operational failures such as not connecting to the VM will not be suppressed
     regardless of this value). The default is false.
    :vartype suppress_failures: bool
    :ivar protected_settings_from_key_vault: The extensions protected settings that are passed by
     reference, and consumed from key vault.
    :vartype protected_settings_from_key_vault: ~azure.mgmt.compute.models.KeyVaultSecretReference
    """

    force_update_tag: Optional[str] = rest_field(
        name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"]
    )
    """How the extension handler should be forced to update even if the extension configuration has
     not changed."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the extension handler publisher."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the extension; an example is \"CustomScriptExtension\"."""
    type_handler_version: Optional[str] = rest_field(
        name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the version of the script handler."""
    auto_upgrade_minor_version: Optional[bool] = rest_field(
        name="autoUpgradeMinorVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should use a newer minor version if one is available at
     deployment time. Once deployed, however, the extension will not upgrade minor versions unless
     redeployed, even with this property set to true."""
    enable_automatic_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should be automatically upgraded by the platform if there is a
     newer version of the extension available."""
    settings: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Json formatted public settings for the extension."""
    protected_settings: Optional[Any] = rest_field(
        name="protectedSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no
     protected settings at all."""
    suppress_failures: Optional[bool] = rest_field(
        name="suppressFailures", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether failures stemming from the extension will be suppressed (Operational failures
     such as not connecting to the VM will not be suppressed regardless of this value). The default
     is false."""
    protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = rest_field(
        name="protectedSettingsFromKeyVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extensions protected settings that are passed by reference, and consumed from key vault."""

    @overload
    def __init__(
        self,
        *,
        force_update_tag: Optional[str] = None,
        publisher: Optional[str] = None,
        type: Optional[str] = None,
        type_handler_version: Optional[str] = None,
        auto_upgrade_minor_version: Optional[bool] = None,
        enable_automatic_upgrade: Optional[bool] = None,
        settings: Optional[Any] = None,
        protected_settings: Optional[Any] = None,
        suppress_failures: Optional[bool] = None,
        protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = 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 VirtualMachineHealthStatus(_Model):
    """The health status of the VM.

    :ivar status: The health status information for the VM.
    :vartype status: ~azure.mgmt.compute.models.InstanceViewStatus
    """

    status: Optional["_models.InstanceViewStatus"] = rest_field(visibility=["read"])
    """The health status information for the VM."""


class VirtualMachineIdentity(_Model):
    """Identity for the virtual machine.

    :ivar principal_id: The principal id of virtual machine identity. This property will only be
     provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant id associated with the virtual machine. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of identity used for the virtual machine. The type 'SystemAssigned,
     UserAssigned' includes both an implicitly created identity and a set of user assigned
     identities. The type 'None' will remove any identities from the virtual machine. Known values
     are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None".
    :vartype type: str or ~azure.mgmt.compute.models.ResourceIdentityType
    :ivar user_assigned_identities: The list of user identities associated with the Virtual
     Machine. The user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.compute.models.UserAssignedIdentitiesValue]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal id of virtual machine identity. This property will only be provided for a system
     assigned identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant id associated with the virtual machine. This property will only be provided for a
     system assigned identity."""
    type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned'
     includes both an implicitly created identity and a set of user assigned identities. The type
     'None' will remove any identities from the virtual machine. Known values are:
     \"SystemAssigned\", \"UserAssigned\", \"SystemAssigned, UserAssigned\", and \"None\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user identities associated with the Virtual Machine. The user identity dictionary
     key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.ResourceIdentityType"]] = None,
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = 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 VirtualMachineImageResource(SubResource):
    """Virtual machine image resource information.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: The name of the resource. Required.
    :vartype name: str
    :ivar location: The supported Azure location of the resource. Required.
    :vartype location: str
    :ivar tags: Specifies the tags that are assigned to the virtual machine. For more information
     about using tags, see `Using tags to organize your Azure resources
     <https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md>`_.
    :vartype tags: dict[str, str]
    :ivar extended_location: The extended location of the Virtual Machine.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the resource. Required."""
    location: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The supported Azure location of the resource. Required."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the tags that are assigned to the virtual machine. For more information about using
     tags, see `Using tags to organize your Azure resources
     <https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md>`_."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location of the Virtual Machine."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        location: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        tags: Optional[dict[str, str]] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 VirtualMachineImage(VirtualMachineImageResource):
    """Describes a Virtual Machine Image.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: The name of the resource. Required.
    :vartype name: str
    :ivar location: The supported Azure location of the resource. Required.
    :vartype location: str
    :ivar tags: Specifies the tags that are assigned to the virtual machine. For more information
     about using tags, see `Using tags to organize your Azure resources
     <https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md>`_.
    :vartype tags: dict[str, str]
    :ivar extended_location: The extended location of the Virtual Machine.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    :ivar properties: Describes the properties of a Virtual Machine Image.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineImageProperties
    """

    properties: Optional["_models.VirtualMachineImageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Image."""

    __flattened_items = [
        "plan",
        "os_disk_image",
        "data_disk_images",
        "automatic_os_upgrade_properties",
        "hyper_v_generation",
        "disallowed",
        "features",
        "architecture",
        "image_deprecation_status",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        location: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        tags: Optional[dict[str, str]] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        properties: Optional["_models.VirtualMachineImageProperties"] = 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 VirtualMachineImageFeature(_Model):
    """Specifies additional capabilities supported by the image.

    :ivar name: The name of the feature.
    :vartype name: str
    :ivar value: The corresponding value for the feature.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the feature."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The corresponding value for the feature."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        value: 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 VirtualMachineImageProperties(_Model):
    """Describes the properties of a Virtual Machine Image.

    :ivar plan: Used for establishing the purchase context of any 3rd Party artifact through
     MarketPlace.
    :vartype plan: ~azure.mgmt.compute.models.PurchasePlan
    :ivar os_disk_image: Contains the os disk image information.
    :vartype os_disk_image: ~azure.mgmt.compute.models.OSDiskImage
    :ivar data_disk_images: The list of data disk images information.
    :vartype data_disk_images: list[~azure.mgmt.compute.models.DataDiskImage]
    :ivar automatic_os_upgrade_properties: Describes automatic OS upgrade properties on the image.
    :vartype automatic_os_upgrade_properties:
     ~azure.mgmt.compute.models.AutomaticOSUpgradeProperties
    :ivar hyper_v_generation: Specifies the HyperVGeneration Type. Known values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGenerationTypes
    :ivar disallowed: Specifies disallowed configuration for the VirtualMachine created from the
     image.
    :vartype disallowed: ~azure.mgmt.compute.models.DisallowedConfiguration
    :ivar features:
    :vartype features: list[~azure.mgmt.compute.models.VirtualMachineImageFeature]
    :ivar architecture: Specifies the Architecture Type. Known values are: "x64" and "Arm64".
    :vartype architecture: str or ~azure.mgmt.compute.models.ArchitectureTypes
    :ivar image_deprecation_status: Describes image deprecation status properties on the image.
    :vartype image_deprecation_status: ~azure.mgmt.compute.models.ImageDeprecationStatus
    """

    plan: Optional["_models.PurchasePlan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Used for establishing the purchase context of any 3rd Party artifact through MarketPlace."""
    os_disk_image: Optional["_models.OSDiskImage"] = rest_field(
        name="osDiskImage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Contains the os disk image information."""
    data_disk_images: Optional[list["_models.DataDiskImage"]] = rest_field(
        name="dataDiskImages", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of data disk images information."""
    automatic_os_upgrade_properties: Optional["_models.AutomaticOSUpgradeProperties"] = rest_field(
        name="automaticOSUpgradeProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes automatic OS upgrade properties on the image."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationTypes"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the HyperVGeneration Type. Known values are: \"V1\" and \"V2\"."""
    disallowed: Optional["_models.DisallowedConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies disallowed configuration for the VirtualMachine created from the image."""
    features: Optional[list["_models.VirtualMachineImageFeature"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    architecture: Optional[Union[str, "_models.ArchitectureTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Architecture Type. Known values are: \"x64\" and \"Arm64\"."""
    image_deprecation_status: Optional["_models.ImageDeprecationStatus"] = rest_field(
        name="imageDeprecationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes image deprecation status properties on the image."""

    @overload
    def __init__(
        self,
        *,
        plan: Optional["_models.PurchasePlan"] = None,
        os_disk_image: Optional["_models.OSDiskImage"] = None,
        data_disk_images: Optional[list["_models.DataDiskImage"]] = None,
        automatic_os_upgrade_properties: Optional["_models.AutomaticOSUpgradeProperties"] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationTypes"]] = None,
        disallowed: Optional["_models.DisallowedConfiguration"] = None,
        features: Optional[list["_models.VirtualMachineImageFeature"]] = None,
        architecture: Optional[Union[str, "_models.ArchitectureTypes"]] = None,
        image_deprecation_status: Optional["_models.ImageDeprecationStatus"] = 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 VirtualMachineInstallPatchesParameters(_Model):
    """Input for InstallPatches as directly received by the API.

    :ivar maximum_duration: Specifies the maximum amount of time that the operation will run. It
     must be an ISO 8601-compliant duration string such as PT4H (4 hours).
    :vartype maximum_duration: ~datetime.timedelta
    :ivar reboot_setting: Defines when it is acceptable to reboot a VM during a software update
     operation. Required. Known values are: "IfRequired", "Never", and "Always".
    :vartype reboot_setting: str or ~azure.mgmt.compute.models.VMGuestPatchRebootSetting
    :ivar windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the
     API.
    :vartype windows_parameters: ~azure.mgmt.compute.models.WindowsParameters
    :ivar linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the
     API.
    :vartype linux_parameters: ~azure.mgmt.compute.models.LinuxParameters
    """

    maximum_duration: Optional[datetime.timedelta] = rest_field(
        name="maximumDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the maximum amount of time that the operation will run. It must be an ISO
     8601-compliant duration string such as PT4H (4 hours)."""
    reboot_setting: Union[str, "_models.VMGuestPatchRebootSetting"] = rest_field(
        name="rebootSetting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines when it is acceptable to reboot a VM during a software update operation. Required.
     Known values are: \"IfRequired\", \"Never\", and \"Always\"."""
    windows_parameters: Optional["_models.WindowsParameters"] = rest_field(
        name="windowsParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """Input for InstallPatches on a Windows VM, as directly received by the API."""
    linux_parameters: Optional["_models.LinuxParameters"] = rest_field(
        name="linuxParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """Input for InstallPatches on a Linux VM, as directly received by the API."""

    @overload
    def __init__(
        self,
        *,
        reboot_setting: Union[str, "_models.VMGuestPatchRebootSetting"],
        maximum_duration: Optional[datetime.timedelta] = None,
        windows_parameters: Optional["_models.WindowsParameters"] = None,
        linux_parameters: Optional["_models.LinuxParameters"] = 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 VirtualMachineInstallPatchesResult(_Model):
    """The result summary of an installation operation.

    :ivar status: The overall success or failure status of the operation. It remains "InProgress"
     until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or
     "CompletedWithWarnings.". Known values are: "Unknown", "InProgress", "Failed", "Succeeded", and
     "CompletedWithWarnings".
    :vartype status: str or ~azure.mgmt.compute.models.PatchOperationStatus
    :ivar installation_activity_id: The activity ID of the operation that produced this result. It
     is used to correlate across CRP and extension logs.
    :vartype installation_activity_id: str
    :ivar reboot_status: The reboot state of the VM following completion of the operation. Known
     values are: "Unknown", "NotNeeded", "Required", "Started", "Failed", and "Completed".
    :vartype reboot_status: str or ~azure.mgmt.compute.models.VMGuestPatchRebootStatus
    :ivar maintenance_window_exceeded: Whether the operation ran out of time before it completed
     all its intended actions.
    :vartype maintenance_window_exceeded: bool
    :ivar excluded_patch_count: The number of patches that were not installed due to the user
     blocking their installation.
    :vartype excluded_patch_count: int
    :ivar not_selected_patch_count: The number of patches that were detected as available for
     install, but did not meet the operation's criteria.
    :vartype not_selected_patch_count: int
    :ivar pending_patch_count: The number of patches that were identified as meeting the
     installation criteria, but were not able to be installed. Typically this happens when
     maintenanceWindowExceeded == true.
    :vartype pending_patch_count: int
    :ivar installed_patch_count: The number of patches successfully installed.
    :vartype installed_patch_count: int
    :ivar failed_patch_count: The number of patches that could not be installed due to some issue.
     See errors for details.
    :vartype failed_patch_count: int
    :ivar patches: The patches that were installed during the operation.
    :vartype patches: list[~azure.mgmt.compute.models.PatchInstallationDetail]
    :ivar start_date_time: The UTC timestamp when the operation began.
    :vartype start_date_time: ~datetime.datetime
    :ivar error: The errors that were encountered during execution of the operation. The details
     array contains the list of them.
    :vartype error: ~azure.mgmt.compute.models.ApiError
    """

    status: Optional[Union[str, "_models.PatchOperationStatus"]] = rest_field(visibility=["read"])
    """The overall success or failure status of the operation. It remains \"InProgress\" until the
     operation completes. At that point it will become \"Failed\", \"Succeeded\", \"Unknown\" or
     \"CompletedWithWarnings.\". Known values are: \"Unknown\", \"InProgress\", \"Failed\",
     \"Succeeded\", and \"CompletedWithWarnings\"."""
    installation_activity_id: Optional[str] = rest_field(name="installationActivityId", visibility=["read"])
    """The activity ID of the operation that produced this result. It is used to correlate across CRP
     and extension logs."""
    reboot_status: Optional[Union[str, "_models.VMGuestPatchRebootStatus"]] = rest_field(
        name="rebootStatus", visibility=["read"]
    )
    """The reboot state of the VM following completion of the operation. Known values are:
     \"Unknown\", \"NotNeeded\", \"Required\", \"Started\", \"Failed\", and \"Completed\"."""
    maintenance_window_exceeded: Optional[bool] = rest_field(name="maintenanceWindowExceeded", visibility=["read"])
    """Whether the operation ran out of time before it completed all its intended actions."""
    excluded_patch_count: Optional[int] = rest_field(name="excludedPatchCount", visibility=["read"])
    """The number of patches that were not installed due to the user blocking their installation."""
    not_selected_patch_count: Optional[int] = rest_field(name="notSelectedPatchCount", visibility=["read"])
    """The number of patches that were detected as available for install, but did not meet the
     operation's criteria."""
    pending_patch_count: Optional[int] = rest_field(name="pendingPatchCount", visibility=["read"])
    """The number of patches that were identified as meeting the installation criteria, but were not
     able to be installed. Typically this happens when maintenanceWindowExceeded == true."""
    installed_patch_count: Optional[int] = rest_field(name="installedPatchCount", visibility=["read"])
    """The number of patches successfully installed."""
    failed_patch_count: Optional[int] = rest_field(name="failedPatchCount", visibility=["read"])
    """The number of patches that could not be installed due to some issue. See errors for details."""
    patches: Optional[list["_models.PatchInstallationDetail"]] = rest_field(visibility=["read"])
    """The patches that were installed during the operation."""
    start_date_time: Optional[datetime.datetime] = rest_field(
        name="startDateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp when the operation began."""
    error: Optional["_models.ApiError"] = rest_field(visibility=["read"])
    """The errors that were encountered during execution of the operation. The details array contains
     the list of them."""


class VirtualMachineInstanceView(_Model):
    """The instance view of a virtual machine.

    :ivar platform_update_domain: Specifies the update domain of the virtual machine.
    :vartype platform_update_domain: int
    :ivar platform_fault_domain: Specifies the fault domain of the virtual machine.
    :vartype platform_fault_domain: int
    :ivar computer_name: The computer name assigned to the virtual machine.
    :vartype computer_name: str
    :ivar os_name: The Operating System running on the virtual machine.
    :vartype os_name: str
    :ivar os_version: The version of Operating System running on the virtual machine.
    :vartype os_version: str
    :ivar hyper_v_generation: Specifies the HyperVGeneration Type associated with a resource. Known
     values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGenerationType
    :ivar rdp_thumb_print: The Remote desktop certificate thumbprint.
    :vartype rdp_thumb_print: str
    :ivar vm_agent: The VM Agent running on the virtual machine.
    :vartype vm_agent: ~azure.mgmt.compute.models.VirtualMachineAgentInstanceView
    :ivar maintenance_redeploy_status: The Maintenance Operation status on the virtual machine.
    :vartype maintenance_redeploy_status: ~azure.mgmt.compute.models.MaintenanceRedeployStatus
    :ivar disks: The virtual machine disk information.
    :vartype disks: list[~azure.mgmt.compute.models.DiskInstanceView]
    :ivar extensions: The extensions information.
    :vartype extensions: list[~azure.mgmt.compute.models.VirtualMachineExtensionInstanceView]
    :ivar vm_health: The health status for the VM.
    :vartype vm_health: ~azure.mgmt.compute.models.VirtualMachineHealthStatus
    :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view
     Console Output and Screenshot to diagnose VM status. You can easily view the output of your
     console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
    :vartype boot_diagnostics: ~azure.mgmt.compute.models.BootDiagnosticsInstanceView
    :ivar assigned_host: Resource id of the dedicated host, on which the virtual machine is
     allocated through automatic placement, when the virtual machine is associated with a dedicated
     host group that has automatic placement enabled. Minimum api-version: 2020-06-01.
    :vartype assigned_host: str
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar patch_status: [Preview Feature] The status of virtual machine patch operations.
    :vartype patch_status: ~azure.mgmt.compute.models.VirtualMachinePatchStatus
    :ivar is_vm_in_standby_pool: [Preview Feature] Specifies whether the VM is currently in or out
     of the Standby Pool.
    :vartype is_vm_in_standby_pool: bool
    :ivar interconnect_instance_view: The Interconnect runtime view of the Virtual Machine. Minimum
     api-version: 2026-03-01.
    :vartype interconnect_instance_view: ~azure.mgmt.compute.models.InterconnectInstanceView
    """

    platform_update_domain: Optional[int] = rest_field(
        name="platformUpdateDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the update domain of the virtual machine."""
    platform_fault_domain: Optional[int] = rest_field(
        name="platformFaultDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the fault domain of the virtual machine."""
    computer_name: Optional[str] = rest_field(
        name="computerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The computer name assigned to the virtual machine."""
    os_name: Optional[str] = rest_field(name="osName", visibility=["read", "create", "update", "delete", "query"])
    """The Operating System running on the virtual machine."""
    os_version: Optional[str] = rest_field(name="osVersion", visibility=["read", "create", "update", "delete", "query"])
    """The version of Operating System running on the virtual machine."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationType"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the HyperVGeneration Type associated with a resource. Known values are: \"V1\" and
     \"V2\"."""
    rdp_thumb_print: Optional[str] = rest_field(
        name="rdpThumbPrint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Remote desktop certificate thumbprint."""
    vm_agent: Optional["_models.VirtualMachineAgentInstanceView"] = rest_field(
        name="vmAgent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The VM Agent running on the virtual machine."""
    maintenance_redeploy_status: Optional["_models.MaintenanceRedeployStatus"] = rest_field(
        name="maintenanceRedeployStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Maintenance Operation status on the virtual machine."""
    disks: Optional[list["_models.DiskInstanceView"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine disk information."""
    extensions: Optional[list["_models.VirtualMachineExtensionInstanceView"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The extensions information."""
    vm_health: Optional["_models.VirtualMachineHealthStatus"] = rest_field(name="vmHealth", visibility=["read"])
    """The health status for the VM."""
    boot_diagnostics: Optional["_models.BootDiagnosticsInstanceView"] = rest_field(
        name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
     to diagnose VM status. You can easily view the output of your console log. Azure also enables
     you to see a screenshot of the VM from the hypervisor."""
    assigned_host: Optional[str] = rest_field(name="assignedHost", visibility=["read"])
    """Resource id of the dedicated host, on which the virtual machine is allocated through automatic
     placement, when the virtual machine is associated with a dedicated host group that has
     automatic placement enabled. Minimum api-version: 2020-06-01."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    patch_status: Optional["_models.VirtualMachinePatchStatus"] = rest_field(
        name="patchStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """[Preview Feature] The status of virtual machine patch operations."""
    is_vm_in_standby_pool: Optional[bool] = rest_field(name="isVMInStandbyPool", visibility=["read"])
    """[Preview Feature] Specifies whether the VM is currently in or out of the Standby Pool."""
    interconnect_instance_view: Optional["_models.InterconnectInstanceView"] = rest_field(
        name="interconnectInstanceView", visibility=["read"]
    )
    """The Interconnect runtime view of the Virtual Machine. Minimum api-version: 2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        platform_update_domain: Optional[int] = None,
        platform_fault_domain: Optional[int] = None,
        computer_name: Optional[str] = None,
        os_name: Optional[str] = None,
        os_version: Optional[str] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGenerationType"]] = None,
        rdp_thumb_print: Optional[str] = None,
        vm_agent: Optional["_models.VirtualMachineAgentInstanceView"] = None,
        maintenance_redeploy_status: Optional["_models.MaintenanceRedeployStatus"] = None,
        disks: Optional[list["_models.DiskInstanceView"]] = None,
        extensions: Optional[list["_models.VirtualMachineExtensionInstanceView"]] = None,
        boot_diagnostics: Optional["_models.BootDiagnosticsInstanceView"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = None,
        patch_status: Optional["_models.VirtualMachinePatchStatus"] = 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 VirtualMachineIpTag(_Model):
    """Contains the IP tag associated with the public IP address.

    :ivar ip_tag_type: IP tag type. Example: FirstPartyUsage.
    :vartype ip_tag_type: str
    :ivar tag: IP tag associated with the public IP. Example: SQL, Storage etc.
    :vartype tag: str
    """

    ip_tag_type: Optional[str] = rest_field(
        name="ipTagType", visibility=["read", "create", "update", "delete", "query"]
    )
    """IP tag type. Example: FirstPartyUsage."""
    tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """IP tag associated with the public IP. Example: SQL, Storage etc."""

    @overload
    def __init__(
        self,
        *,
        ip_tag_type: Optional[str] = None,
        tag: 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 VirtualMachineNetworkInterfaceConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine network interface configurations.

    :ivar name: The network interface configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machine network profile's IP configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineNetworkInterfaceConfigurationProperties
    :ivar tags: Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration.
    :vartype tags: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The network interface configuration name. Required."""
    properties: Optional["_models.VirtualMachineNetworkInterfaceConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine network profile's IP configuration."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration."""

    __flattened_items = [
        "primary",
        "delete_option",
        "enable_accelerated_networking",
        "disable_tcp_state_tracking",
        "enable_fpga",
        "enable_ip_forwarding",
        "network_security_group",
        "dns_settings",
        "ip_configurations",
        "dscp_configuration",
        "auxiliary_mode",
        "auxiliary_sku",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachineNetworkInterfaceConfigurationProperties"] = None,
        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:
        _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 VirtualMachineNetworkInterfaceConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine network profile's IP configuration.

    :ivar primary: Specifies the primary network interface in case the virtual machine has more
     than 1 network interface.
    :vartype primary: bool
    :ivar delete_option: Specify what happens to the network interface when the VM is deleted.
     Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    :ivar enable_accelerated_networking: Specifies whether the network interface is accelerated
     networking-enabled.
    :vartype enable_accelerated_networking: bool
    :ivar disable_tcp_state_tracking: Specifies whether the network interface is disabled for tcp
     state tracking.
    :vartype disable_tcp_state_tracking: bool
    :ivar enable_fpga: Specifies whether the network interface is FPGA networking-enabled.
    :vartype enable_fpga: bool
    :ivar enable_ip_forwarding: Whether IP forwarding enabled on this NIC.
    :vartype enable_ip_forwarding: bool
    :ivar network_security_group: The network security group.
    :vartype network_security_group: ~azure.mgmt.compute.models.SubResource
    :ivar dns_settings: The dns settings to be applied on the network interfaces.
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration
    :ivar ip_configurations: Specifies the IP configurations of the network interface. Required.
    :vartype ip_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineNetworkInterfaceIPConfiguration]
    :ivar dscp_configuration:
    :vartype dscp_configuration: ~azure.mgmt.compute.models.SubResource
    :ivar auxiliary_mode: Specifies whether the Auxiliary mode is enabled for the Network Interface
     resource. Known values are: "None", "AcceleratedConnections", and "Floating".
    :vartype auxiliary_mode: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliaryMode
    :ivar auxiliary_sku: Specifies whether the Auxiliary sku is enabled for the Network Interface
     resource. Known values are: "None", "A1", "A2", "A4", and "A8".
    :vartype auxiliary_sku: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliarySku
    """

    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary network interface in case the virtual machine has more than 1 network
     interface."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the network interface when the VM is deleted. Known values are:
     \"Delete\" and \"Detach\"."""
    enable_accelerated_networking: Optional[bool] = rest_field(
        name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is accelerated networking-enabled."""
    disable_tcp_state_tracking: Optional[bool] = rest_field(
        name="disableTcpStateTracking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is disabled for tcp state tracking."""
    enable_fpga: Optional[bool] = rest_field(
        name="enableFpga", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is FPGA networking-enabled."""
    enable_ip_forwarding: Optional[bool] = rest_field(
        name="enableIPForwarding", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether IP forwarding enabled on this NIC."""
    network_security_group: Optional["_models.SubResource"] = rest_field(
        name="networkSecurityGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """The network security group."""
    dns_settings: Optional["_models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the network interfaces."""
    ip_configurations: list["_models.VirtualMachineNetworkInterfaceIPConfiguration"] = rest_field(
        name="ipConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the IP configurations of the network interface. Required."""
    dscp_configuration: Optional["_models.SubResource"] = rest_field(
        name="dscpConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field(
        name="auxiliaryMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known
     values are: \"None\", \"AcceleratedConnections\", and \"Floating\"."""
    auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field(
        name="auxiliarySku", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values
     are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\"."""

    @overload
    def __init__(
        self,
        *,
        ip_configurations: list["_models.VirtualMachineNetworkInterfaceIPConfiguration"],
        primary: Optional[bool] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None,
        enable_accelerated_networking: Optional[bool] = None,
        disable_tcp_state_tracking: Optional[bool] = None,
        enable_fpga: Optional[bool] = None,
        enable_ip_forwarding: Optional[bool] = None,
        network_security_group: Optional["_models.SubResource"] = None,
        dns_settings: Optional["_models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration"] = None,
        dscp_configuration: Optional["_models.SubResource"] = None,
        auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = None,
        auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = 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 VirtualMachineNetworkInterfaceDnsSettingsConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines network configuration's DNS settings.

    :ivar dns_servers: List of DNS servers IP addresses.
    :vartype dns_servers: list[str]
    """

    dns_servers: Optional[list[str]] = rest_field(
        name="dnsServers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of DNS servers IP addresses."""

    @overload
    def __init__(
        self,
        *,
        dns_servers: 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 VirtualMachineNetworkInterfaceIPConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine network profile's IP configuration.

    :ivar name: The IP configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machine network interface IP configuration properties.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineNetworkInterfaceIPConfigurationProperties
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IP configuration name. Required."""
    properties: Optional["_models.VirtualMachineNetworkInterfaceIPConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine network interface IP configuration properties."""

    __flattened_items = [
        "subnet",
        "primary",
        "public_ip_address_configuration",
        "private_ip_address_version",
        "application_security_groups",
        "application_gateway_backend_address_pools",
        "load_balancer_backend_address_pools",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachineNetworkInterfaceIPConfigurationProperties"] = 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 VirtualMachineNetworkInterfaceIPConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine network interface IP configuration properties.

    :ivar subnet: Specifies the identifier of the subnet.
    :vartype subnet: ~azure.mgmt.compute.models.SubResource
    :ivar primary: Specifies the primary network interface in case the virtual machine has more
     than 1 network interface.
    :vartype primary: bool
    :ivar public_ip_address_configuration: The publicIPAddressConfiguration.
    :vartype public_ip_address_configuration:
     ~azure.mgmt.compute.models.VirtualMachinePublicIPAddressConfiguration
    :ivar private_ip_address_version: Available from Api-Version 2017-03-30 onwards, it represents
     whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible
     values are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6".
    :vartype private_ip_address_version: str or ~azure.mgmt.compute.models.IPVersions
    :ivar application_security_groups: Specifies an array of references to application security
     group.
    :vartype application_security_groups: list[~azure.mgmt.compute.models.SubResource]
    :ivar application_gateway_backend_address_pools: Specifies an array of references to backend
     address pools of application gateways. A virtual machine can reference backend address pools of
     multiple application gateways. Multiple virtual machines cannot use the same application
     gateway.
    :vartype application_gateway_backend_address_pools:
     list[~azure.mgmt.compute.models.SubResource]
    :ivar load_balancer_backend_address_pools: Specifies an array of references to backend address
     pools of load balancers. A virtual machine can reference backend address pools of one public
     and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load
     balancer].
    :vartype load_balancer_backend_address_pools: list[~azure.mgmt.compute.models.SubResource]
    """

    subnet: Optional["_models.SubResource"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the identifier of the subnet."""
    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary network interface in case the virtual machine has more than 1 network
     interface."""
    public_ip_address_configuration: Optional["_models.VirtualMachinePublicIPAddressConfiguration"] = rest_field(
        name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The publicIPAddressConfiguration."""
    private_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = rest_field(
        name="privateIPAddressVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Available from Api-Version 2017-03-30 onwards, it represents whether the specific
     ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and
     'IPv6'. Known values are: \"IPv4\" and \"IPv6\"."""
    application_security_groups: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to application security group."""
    application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationGatewayBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to backend address pools of application gateways. A virtual
     machine can reference backend address pools of multiple application gateways. Multiple virtual
     machines cannot use the same application gateway."""
    load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="loadBalancerBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to backend address pools of load balancers. A virtual machine
     can reference backend address pools of one public and one internal load balancer. [Multiple
     virtual machines cannot use the same basic sku load balancer]."""

    @overload
    def __init__(
        self,
        *,
        subnet: Optional["_models.SubResource"] = None,
        primary: Optional[bool] = None,
        public_ip_address_configuration: Optional["_models.VirtualMachinePublicIPAddressConfiguration"] = None,
        private_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = None,
        application_security_groups: Optional[list["_models.SubResource"]] = None,
        application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = None,
        load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = 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 VirtualMachinePatchStatus(_Model):
    """The status of virtual machine patch operations.

    :ivar available_patch_summary: The available patch summary of the latest assessment operation
     for the virtual machine.
    :vartype available_patch_summary: ~azure.mgmt.compute.models.AvailablePatchSummary
    :ivar last_patch_installation_summary: The installation summary of the latest installation
     operation for the virtual machine.
    :vartype last_patch_installation_summary:
     ~azure.mgmt.compute.models.LastPatchInstallationSummary
    :ivar configuration_statuses: The enablement status of the specified patchMode.
    :vartype configuration_statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    available_patch_summary: Optional["_models.AvailablePatchSummary"] = rest_field(
        name="availablePatchSummary", visibility=["read", "create", "update", "delete", "query"]
    )
    """The available patch summary of the latest assessment operation for the virtual machine."""
    last_patch_installation_summary: Optional["_models.LastPatchInstallationSummary"] = rest_field(
        name="lastPatchInstallationSummary", visibility=["read", "create", "update", "delete", "query"]
    )
    """The installation summary of the latest installation operation for the virtual machine."""
    configuration_statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        name="configurationStatuses", visibility=["read"]
    )
    """The enablement status of the specified patchMode."""

    @overload
    def __init__(
        self,
        *,
        available_patch_summary: Optional["_models.AvailablePatchSummary"] = None,
        last_patch_installation_summary: Optional["_models.LastPatchInstallationSummary"] = 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 VirtualMachineProperties(_Model):
    """Describes the properties of a Virtual Machine.

    :ivar hardware_profile: Specifies the hardware settings for the virtual machine.
    :vartype hardware_profile: ~azure.mgmt.compute.models.HardwareProfile
    :ivar scheduled_events_policy: Specifies Redeploy, Reboot and
     ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the
     virtual machine.
    :vartype scheduled_events_policy: ~azure.mgmt.compute.models.ScheduledEventsPolicy
    :ivar storage_profile: Specifies the storage settings for the virtual machine disks.
    :vartype storage_profile: ~azure.mgmt.compute.models.StorageProfile
    :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the
     virtual machine.
    :vartype additional_capabilities: ~azure.mgmt.compute.models.AdditionalCapabilities
    :ivar os_profile: Specifies the operating system settings used while creating the virtual
     machine. Some of the settings cannot be changed once VM is provisioned.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfile
    :ivar network_profile: Specifies the network interfaces of the virtual machine.
    :vartype network_profile: ~azure.mgmt.compute.models.NetworkProfile
    :ivar security_profile: Specifies the Security related profile settings for the virtual
     machine.
    :vartype security_profile: ~azure.mgmt.compute.models.SecurityProfile
    :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum api-version:
     2015-06-15.
    :vartype diagnostics_profile: ~azure.mgmt.compute.models.DiagnosticsProfile
    :ivar availability_set: Specifies information about the availability set that the virtual
     machine should be assigned to. Virtual machines specified in the same availability set are
     allocated to different nodes to maximize availability. For more information about availability
     sets, see `Availability sets overview
     <https://docs.microsoft.com/azure/virtual-machines/availability-set-overview>`_. For more
     information on Azure planned maintenance, see `Maintenance and updates for Virtual Machines in
     Azure <https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates>`_. Currently,
     a VM can only be added to availability set at creation time. The availability set to which the
     VM is being added should be under the same resource group as the availability set resource. An
     existing VM cannot be added to an availability set. This property cannot exist along with a
     non-null properties.virtualMachineScaleSet reference.
    :vartype availability_set: ~azure.mgmt.compute.models.SubResource
    :ivar virtual_machine_scale_set: Specifies information about the virtual machine scale set that
     the virtual machine should be assigned to. Virtual machines specified in the same virtual
     machine scale set are allocated to different nodes to maximize availability. Currently, a VM
     can only be added to virtual machine scale set at creation time. An existing VM cannot be added
     to a virtual machine scale set. This property cannot exist along with a non-null
     properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.
    :vartype virtual_machine_scale_set: ~azure.mgmt.compute.models.SubResource
    :ivar proximity_placement_group: Specifies information about the proximity placement group that
     the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
    :vartype proximity_placement_group: ~azure.mgmt.compute.models.SubResource
    :ivar priority: Specifies the priority for the virtual machine. Minimum api-version:
     2019-03-01. Known values are: "Regular", "Low", and "Spot".
    :vartype priority: str or ~azure.mgmt.compute.models.VirtualMachinePriorityTypes
    :ivar eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and
     Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are
     supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both
     'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
     Known values are: "Deallocate" and "Delete".
    :vartype eviction_policy: str or ~azure.mgmt.compute.models.VirtualMachineEvictionPolicyTypes
    :ivar billing_profile: Specifies the billing related details of a Azure Spot virtual machine.
     Minimum api-version: 2019-03-01.
    :vartype billing_profile: ~azure.mgmt.compute.models.BillingProfile
    :ivar host: Specifies information about the dedicated host that the virtual machine resides in.
     Minimum api-version: 2018-10-01.
    :vartype host: ~azure.mgmt.compute.models.SubResource
    :ivar host_group: Specifies information about the dedicated host group that the virtual machine
     resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum
     api-version: 2020-06-01.
    :vartype host_group: ~azure.mgmt.compute.models.SubResource
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar instance_view: The virtual machine instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.VirtualMachineInstanceView
    :ivar license_type: Specifies that the image or disk that is being used was licensed
     on-premises. <br><br> Possible values for Windows Server operating system are: <br><br>
     Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating
     system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more
     information, see `Azure Hybrid Use Benefit for Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15.
    :vartype license_type: str
    :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier that is encoded and
     stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.
    :vartype vm_id: str
    :ivar extensions_time_budget: Specifies the time alloted for all extensions to start. The time
     duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in
     ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.
    :vartype extensions_time_budget: str
    :ivar platform_fault_domain: Specifies the scale set logical fault domain into which the
     Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned
     to a fault domain that best maintains balance across available fault domains. This is
     applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The
     Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than
     1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment
     can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01.
    :vartype platform_fault_domain: int
    :ivar scheduled_events_profile: Specifies Scheduled Event related configurations.
    :vartype scheduled_events_profile: ~azure.mgmt.compute.models.ScheduledEventsProfile
    :ivar user_data: UserData for the VM, which must be base-64 encoded. Customer should not pass
     any secrets in here. Minimum api-version: 2021-03-01.
    :vartype user_data: str
    :ivar capacity_reservation: Specifies information about the capacity reservation that is used
     to allocate virtual machine. Minimum api-version: 2021-04-01.
    :vartype capacity_reservation: ~azure.mgmt.compute.models.CapacityReservationProfile
    :ivar interconnect_block_profile: Specifies information about the Interconnect Block that is
     used to allocate the Virtual Machine. Minimum api-version: 2026-03-01.
    :vartype interconnect_block_profile: ~azure.mgmt.compute.models.InterconnectBlockProfile
    :ivar application_profile: Specifies the gallery applications that should be made available to
     the VM/VMSS.
    :vartype application_profile: ~azure.mgmt.compute.models.ApplicationProfile
    :ivar time_created: Specifies the time at which the Virtual Machine resource was created.
     Minimum api-version: 2021-11-01.
    :vartype time_created: ~datetime.datetime
    :ivar resiliency_profile: Resiliency profile for the virtual machine.
    :vartype resiliency_profile: ~azure.mgmt.compute.models.ResiliencyProfile
    """

    hardware_profile: Optional["_models.HardwareProfile"] = rest_field(
        name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the hardware settings for the virtual machine."""
    scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = rest_field(
        name="scheduledEventsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event
     related configurations for the virtual machine."""
    storage_profile: Optional["_models.StorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage settings for the virtual machine disks."""
    additional_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field(
        name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional capabilities enabled or disabled on the virtual machine."""
    os_profile: Optional["_models.OSProfile"] = rest_field(
        name="osProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the operating system settings used while creating the virtual machine. Some of the
     settings cannot be changed once VM is provisioned."""
    network_profile: Optional["_models.NetworkProfile"] = rest_field(
        name="networkProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the network interfaces of the virtual machine."""
    security_profile: Optional["_models.SecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Security related profile settings for the virtual machine."""
    diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(
        name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15."""
    availability_set: Optional["_models.SubResource"] = rest_field(
        name="availabilitySet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the availability set that the virtual machine should be assigned
     to. Virtual machines specified in the same availability set are allocated to different nodes to
     maximize availability. For more information about availability sets, see `Availability sets
     overview <https://docs.microsoft.com/azure/virtual-machines/availability-set-overview>`_. For
     more information on Azure planned maintenance, see `Maintenance and updates for Virtual
     Machines in Azure
     <https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates>`_. Currently, a VM
     can only be added to availability set at creation time. The availability set to which the VM is
     being added should be under the same resource group as the availability set resource. An
     existing VM cannot be added to an availability set. This property cannot exist along with a
     non-null properties.virtualMachineScaleSet reference."""
    virtual_machine_scale_set: Optional["_models.SubResource"] = rest_field(
        name="virtualMachineScaleSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the virtual machine scale set that the virtual machine should be
     assigned to. Virtual machines specified in the same virtual machine scale set are allocated to
     different nodes to maximize availability. Currently, a VM can only be added to virtual machine
     scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This
     property cannot exist along with a non-null properties.availabilitySet reference. Minimum
     api‐version: 2019‐03‐01."""
    proximity_placement_group: Optional["_models.SubResource"] = rest_field(
        name="proximityPlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the proximity placement group that the virtual machine should be
     assigned to. Minimum api-version: 2018-04-01."""
    priority: Optional[Union[str, "_models.VirtualMachinePriorityTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01. Known values
     are: \"Regular\", \"Low\", and \"Spot\"."""
    eviction_policy: Optional[Union[str, "_models.VirtualMachineEvictionPolicyTypes"]] = rest_field(
        name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For
     Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum
     api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are
     supported and the minimum api-version is 2017-10-30-preview. Known values are: \"Deallocate\"
     and \"Delete\"."""
    billing_profile: Optional["_models.BillingProfile"] = rest_field(
        name="billingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version:
     2019-03-01."""
    host: Optional["_models.SubResource"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the dedicated host that the virtual machine resides in. Minimum
     api-version: 2018-10-01."""
    host_group: Optional["_models.SubResource"] = rest_field(
        name="hostGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the dedicated host group that the virtual machine resides in.
     **Note:** User cannot specify both host and hostGroup properties. Minimum api-version:
     2020-06-01."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    instance_view: Optional["_models.VirtualMachineInstanceView"] = rest_field(name="instanceView", visibility=["read"])
    """The virtual machine instance view."""
    license_type: Optional[str] = rest_field(
        name="licenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible
     values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server
     <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL)
     <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see `Azure Hybrid Use Benefit for
     Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15."""
    vm_id: Optional[str] = rest_field(name="vmId", visibility=["read"])
    """Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all
     Azure IaaS VMs SMBIOS and can be read using platform BIOS commands."""
    extensions_time_budget: Optional[str] = rest_field(
        name="extensionsTimeBudget", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the time alloted for all extensions to start. The time duration should be between 15
     minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default
     value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01."""
    platform_fault_domain: Optional[int] = rest_field(
        name="platformFaultDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the scale set logical fault domain into which the Virtual Machine will be created. By
     default, the Virtual Machine will by automatically assigned to a fault domain that best
     maintains balance across available fault domains. This is applicable only if the
     'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set
     that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot
     be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the
     Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01."""
    scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field(
        name="scheduledEventsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Scheduled Event related configurations."""
    user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"])
    """UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in
     here. Minimum api-version: 2021-03-01."""
    capacity_reservation: Optional["_models.CapacityReservationProfile"] = rest_field(
        name="capacityReservation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the capacity reservation that is used to allocate virtual machine.
     Minimum api-version: 2021-04-01."""
    interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = rest_field(
        name="interconnectBlockProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the Interconnect Block that is used to allocate the Virtual
     Machine. Minimum api-version: 2026-03-01."""
    application_profile: Optional["_models.ApplicationProfile"] = rest_field(
        name="applicationProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the gallery applications that should be made available to the VM/VMSS."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Virtual Machine resource was created. Minimum api-version:
     2021-11-01."""
    resiliency_profile: Optional["_models.ResiliencyProfile"] = rest_field(
        name="resiliencyProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resiliency profile for the virtual machine."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        hardware_profile: Optional["_models.HardwareProfile"] = None,
        scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = None,
        storage_profile: Optional["_models.StorageProfile"] = None,
        additional_capabilities: Optional["_models.AdditionalCapabilities"] = None,
        os_profile: Optional["_models.OSProfile"] = None,
        network_profile: Optional["_models.NetworkProfile"] = None,
        security_profile: Optional["_models.SecurityProfile"] = None,
        diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None,
        availability_set: Optional["_models.SubResource"] = None,
        virtual_machine_scale_set: Optional["_models.SubResource"] = None,
        proximity_placement_group: Optional["_models.SubResource"] = None,
        priority: Optional[Union[str, "_models.VirtualMachinePriorityTypes"]] = None,
        eviction_policy: Optional[Union[str, "_models.VirtualMachineEvictionPolicyTypes"]] = None,
        billing_profile: Optional["_models.BillingProfile"] = None,
        host: Optional["_models.SubResource"] = None,
        host_group: Optional["_models.SubResource"] = None,
        license_type: Optional[str] = None,
        extensions_time_budget: Optional[str] = None,
        platform_fault_domain: Optional[int] = None,
        scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = None,
        user_data: Optional[str] = None,
        capacity_reservation: Optional["_models.CapacityReservationProfile"] = None,
        interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = None,
        application_profile: Optional["_models.ApplicationProfile"] = None,
        resiliency_profile: Optional["_models.ResiliencyProfile"] = 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 VirtualMachinePublicIPAddressConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines IP Configuration's PublicIPAddress configuration.

    :ivar name: The publicIP address configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machines IP Configuration's PublicIPAddress
     configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachinePublicIPAddressConfigurationProperties
    :ivar sku: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
    :vartype sku: ~azure.mgmt.compute.models.PublicIPAddressSku
    :ivar tags: Resource tags applied to the publicIP address created by this
     PublicIPAddressConfiguration.
    :vartype tags: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publicIP address configuration name. Required."""
    properties: Optional["_models.VirtualMachinePublicIPAddressConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machines IP Configuration's PublicIPAddress configuration."""
    sku: Optional["_models.PublicIPAddressSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration."""

    __flattened_items = [
        "idle_timeout_in_minutes",
        "delete_option",
        "dns_settings",
        "ip_tags",
        "public_ip_prefix",
        "public_ip_address_version",
        "public_ip_allocation_method",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachinePublicIPAddressConfigurationProperties"] = None,
        sku: Optional["_models.PublicIPAddressSku"] = None,
        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:
        _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 VirtualMachinePublicIPAddressConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines IP Configuration's PublicIPAddress configuration.

    :ivar idle_timeout_in_minutes: The idle timeout of the public IP address.
    :vartype idle_timeout_in_minutes: int
    :ivar delete_option: Specify what happens to the public IP address when the VM is deleted.
     Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    :ivar dns_settings: The dns settings to be applied on the publicIP addresses .
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration
    :ivar ip_tags: The list of IP tags associated with the public IP address.
    :vartype ip_tags: list[~azure.mgmt.compute.models.VirtualMachineIpTag]
    :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses.
    :vartype public_ip_prefix: ~azure.mgmt.compute.models.SubResource
    :ivar public_ip_address_version: Available from Api-Version 2019-07-01 onwards, it represents
     whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values
     are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6".
    :vartype public_ip_address_version: str or ~azure.mgmt.compute.models.IPVersions
    :ivar public_ip_allocation_method: Specify the public IP allocation type. Known values are:
     "Dynamic" and "Static".
    :vartype public_ip_allocation_method: str or
     ~azure.mgmt.compute.models.PublicIPAllocationMethod
    """

    idle_timeout_in_minutes: Optional[int] = rest_field(
        name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The idle timeout of the public IP address."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the public IP address when the VM is deleted. Known values are:
     \"Delete\" and \"Detach\"."""
    dns_settings: Optional["_models.VirtualMachinePublicIPAddressDnsSettingsConfiguration"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the publicIP addresses ."""
    ip_tags: Optional[list["_models.VirtualMachineIpTag"]] = rest_field(
        name="ipTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of IP tags associated with the public IP address."""
    public_ip_prefix: Optional["_models.SubResource"] = rest_field(
        name="publicIPPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """The PublicIPPrefix from which to allocate publicIP addresses."""
    public_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = rest_field(
        name="publicIPAddressVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Available from Api-Version 2019-07-01 onwards, it represents whether the specific
     ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and
     'IPv6'. Known values are: \"IPv4\" and \"IPv6\"."""
    public_ip_allocation_method: Optional[Union[str, "_models.PublicIPAllocationMethod"]] = rest_field(
        name="publicIPAllocationMethod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify the public IP allocation type. Known values are: \"Dynamic\" and \"Static\"."""

    @overload
    def __init__(
        self,
        *,
        idle_timeout_in_minutes: Optional[int] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None,
        dns_settings: Optional["_models.VirtualMachinePublicIPAddressDnsSettingsConfiguration"] = None,
        ip_tags: Optional[list["_models.VirtualMachineIpTag"]] = None,
        public_ip_prefix: Optional["_models.SubResource"] = None,
        public_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = None,
        public_ip_allocation_method: Optional[Union[str, "_models.PublicIPAllocationMethod"]] = 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 VirtualMachinePublicIPAddressDnsSettingsConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines network configuration's DNS settings.

    :ivar domain_name_label: The Domain name label prefix of the PublicIPAddress resources that
     will be created. The generated name label is the concatenation of the domain name label and vm
     network profile unique ID. Required.
    :vartype domain_name_label: str
    :ivar domain_name_label_scope: The Domain name label scope of the PublicIPAddress resources
     that will be created. The generated name label is the concatenation of the hashed domain name
     label with policy according to the domain name label scope and vm network profile unique ID.
     Known values are: "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse".
    :vartype domain_name_label_scope: str or ~azure.mgmt.compute.models.DomainNameLabelScopeTypes
    """

    domain_name_label: str = rest_field(
        name="domainNameLabel", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Domain name label prefix of the PublicIPAddress resources that will be created. The
     generated name label is the concatenation of the domain name label and vm network profile
     unique ID. Required."""
    domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = rest_field(
        name="domainNameLabelScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Domain name label scope of the PublicIPAddress resources that will be created. The
     generated name label is the concatenation of the hashed domain name label with policy according
     to the domain name label scope and vm network profile unique ID. Known values are:
     \"TenantReuse\", \"SubscriptionReuse\", \"ResourceGroupReuse\", and \"NoReuse\"."""

    @overload
    def __init__(
        self,
        *,
        domain_name_label: str,
        domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = 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 VirtualMachineReimageParameters(_Model):
    """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be
    reimaged.

    :ivar temp_disk: Specifies whether to reimage temp disk. Default value: false. Note: This temp
     disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
    :vartype temp_disk: bool
    :ivar exact_version: Specifies in decimal number, the version the OS disk should be reimaged
     to. If exact version is not provided, the OS disk is reimaged to the existing version of OS
     Disk.
    :vartype exact_version: str
    :ivar os_profile: Specifies information required for reimaging the non-ephemeral OS disk.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfileProvisioningData
    """

    temp_disk: Optional[bool] = rest_field(name="tempDisk", visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage
     parameter is only supported for VM/VMSS with Ephemeral OS disk."""
    exact_version: Optional[str] = rest_field(
        name="exactVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is
     not provided, the OS disk is reimaged to the existing version of OS Disk."""
    os_profile: Optional["_models.OSProfileProvisioningData"] = rest_field(
        name="osProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information required for reimaging the non-ephemeral OS disk."""

    @overload
    def __init__(
        self,
        *,
        temp_disk: Optional[bool] = None,
        exact_version: Optional[str] = None,
        os_profile: Optional["_models.OSProfileProvisioningData"] = 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 VirtualMachineRunCommand(TrackedResource):
    """Describes a Virtual Machine run command.

    :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.compute.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: Describes the properties of a Virtual Machine run command.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineRunCommandProperties
    """

    properties: Optional["_models.VirtualMachineRunCommandProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine run command."""

    __flattened_items = [
        "source",
        "parameters",
        "protected_parameters",
        "async_execution",
        "run_as_user",
        "run_as_password",
        "timeout_in_seconds",
        "output_blob_uri",
        "error_blob_uri",
        "output_blob_managed_identity",
        "error_blob_managed_identity",
        "provisioning_state",
        "instance_view",
        "treat_failure_as_deployment_failure",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineRunCommandProperties"] = 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 VirtualMachineRunCommandInstanceView(_Model):
    """The instance view of a virtual machine run command.

    :ivar execution_state: Script execution status. Known values are: "Unknown", "Pending",
     "Running", "Failed", "Succeeded", "TimedOut", and "Canceled".
    :vartype execution_state: str or ~azure.mgmt.compute.models.ExecutionState
    :ivar execution_message: Communicate script configuration errors or execution messages.
    :vartype execution_message: str
    :ivar exit_code: Exit code returned from script execution.
    :vartype exit_code: int
    :ivar output: Script output stream.
    :vartype output: str
    :ivar error: Script error stream.
    :vartype error: str
    :ivar start_time: Script start time.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: Script end time.
    :vartype end_time: ~datetime.datetime
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    """

    execution_state: Optional[Union[str, "_models.ExecutionState"]] = rest_field(
        name="executionState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Script execution status. Known values are: \"Unknown\", \"Pending\", \"Running\", \"Failed\",
     \"Succeeded\", \"TimedOut\", and \"Canceled\"."""
    execution_message: Optional[str] = rest_field(
        name="executionMessage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Communicate script configuration errors or execution messages."""
    exit_code: Optional[int] = rest_field(name="exitCode", visibility=["read", "create", "update", "delete", "query"])
    """Exit code returned from script execution."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Script output stream."""
    error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Script error stream."""
    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Script start time."""
    end_time: Optional[datetime.datetime] = rest_field(
        name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Script end time."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""

    @overload
    def __init__(
        self,
        *,
        execution_state: Optional[Union[str, "_models.ExecutionState"]] = None,
        execution_message: Optional[str] = None,
        exit_code: Optional[int] = None,
        output: Optional[str] = None,
        error: Optional[str] = None,
        start_time: Optional[datetime.datetime] = None,
        end_time: Optional[datetime.datetime] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 VirtualMachineRunCommandProperties(_Model):
    """Describes the properties of a Virtual Machine run command.

    :ivar source: The source of the run command script.
    :vartype source: ~azure.mgmt.compute.models.VirtualMachineRunCommandScriptSource
    :ivar parameters: The parameters used by the script.
    :vartype parameters: list[~azure.mgmt.compute.models.RunCommandInputParameter]
    :ivar protected_parameters: The parameters used by the script.
    :vartype protected_parameters: list[~azure.mgmt.compute.models.RunCommandInputParameter]
    :ivar async_execution: Optional. If set to true, provisioning will complete as soon as the
     script starts and will not wait for script to complete.
    :vartype async_execution: bool
    :ivar run_as_user: Specifies the user account on the VM when executing the run command.
    :vartype run_as_user: str
    :ivar run_as_password: Specifies the user account password on the VM when executing the run
     command.
    :vartype run_as_password: str
    :ivar timeout_in_seconds: The timeout in seconds to execute the run command.
    :vartype timeout_in_seconds: int
    :ivar output_blob_uri: Specifies the Azure storage blob where script output stream will be
     uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to
     provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
    :vartype output_blob_uri: str
    :ivar error_blob_uri: Specifies the Azure storage blob where script error stream will be
     uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to
     provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
    :vartype error_blob_uri: str
    :ivar output_blob_managed_identity: User-assigned managed identity that has access to
     outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure
     managed identity has been given access to blob's container with 'Storage Blob Data Contributor'
     role assignment. In case of user-assigned identity, make sure you add it under VM's identity.
     For more info on managed identity and Run Command, refer `https://aka.ms/ManagedIdentity
     <https://aka.ms/ManagedIdentity>`_ and `https://aka.ms/RunCommandManaged
     <https://aka.ms/RunCommandManaged>`_.
    :vartype output_blob_managed_identity: ~azure.mgmt.compute.models.RunCommandManagedIdentity
    :ivar error_blob_managed_identity: User-assigned managed identity that has access to
     errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure
     managed identity has been given access to blob's container with 'Storage Blob Data Contributor'
     role assignment. In case of user-assigned identity, make sure you add it under VM's identity.
     For more info on managed identity and Run Command, refer `https://aka.ms/ManagedIdentity
     <https://aka.ms/ManagedIdentity>`_ and `https://aka.ms/RunCommandManaged
     <https://aka.ms/RunCommandManaged>`_.
    :vartype error_blob_managed_identity: ~azure.mgmt.compute.models.RunCommandManagedIdentity
    :ivar provisioning_state: The provisioning state, which only appears in the response. If
     treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment
     and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to
     false, ProvisioningState would only reflect whether the run command was run or not by the
     extensions platform, it would not indicate whether script failed in case of script failures.
     See instance view of run command in case of script failures to see executionMessage, output,
     error: `https://aka.ms/runcommandmanaged#get-execution-status-and-results
     <https://aka.ms/runcommandmanaged#get-execution-status-and-results>`_.
    :vartype provisioning_state: str
    :ivar instance_view: The virtual machine run command instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.VirtualMachineRunCommandInstanceView
    :ivar treat_failure_as_deployment_failure: Optional. If set to true, any failure in the script
     will fail the deployment and ProvisioningState will be marked as Failed. If set to false,
     ProvisioningState would only reflect whether the run command was run or not by the extensions
     platform, it would not indicate whether script failed in case of script failures. See instance
     view of run command in case of script failures to see executionMessage, output, error:
     `https://aka.ms/runcommandmanaged#get-execution-status-and-results
     <https://aka.ms/runcommandmanaged#get-execution-status-and-results>`_.
    :vartype treat_failure_as_deployment_failure: bool
    """

    source: Optional["_models.VirtualMachineRunCommandScriptSource"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The source of the run command script."""
    parameters: Optional[list["_models.RunCommandInputParameter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters used by the script."""
    protected_parameters: Optional[list["_models.RunCommandInputParameter"]] = rest_field(
        name="protectedParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters used by the script."""
    async_execution: Optional[bool] = rest_field(
        name="asyncExecution", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. If set to true, provisioning will complete as soon as the script starts and will not
     wait for script to complete."""
    run_as_user: Optional[str] = rest_field(
        name="runAsUser", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the user account on the VM when executing the run command."""
    run_as_password: Optional[str] = rest_field(
        name="runAsPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the user account password on the VM when executing the run command."""
    timeout_in_seconds: Optional[int] = rest_field(
        name="timeoutInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The timeout in seconds to execute the run command."""
    output_blob_uri: Optional[str] = rest_field(
        name="outputBlobUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI
     with read, append, create, write access OR use managed identity to provide the VM access to the
     blob. Refer outputBlobManagedIdentity parameter."""
    error_blob_uri: Optional[str] = rest_field(
        name="errorBlobUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with
     read, append, create, write access OR use managed identity to provide the VM access to the
     blob. Refer errorBlobManagedIdentity parameter."""
    output_blob_managed_identity: Optional["_models.RunCommandManagedIdentity"] = rest_field(
        name="outputBlobManagedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty
     object in case of system-assigned identity. Make sure managed identity has been given access to
     blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned
     identity, make sure you add it under VM's identity. For more info on managed identity and Run
     Command, refer `https://aka.ms/ManagedIdentity <https://aka.ms/ManagedIdentity>`_ and
     `https://aka.ms/RunCommandManaged <https://aka.ms/RunCommandManaged>`_."""
    error_blob_managed_identity: Optional["_models.RunCommandManagedIdentity"] = rest_field(
        name="errorBlobManagedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty
     object in case of system-assigned identity. Make sure managed identity has been given access to
     blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned
     identity, make sure you add it under VM's identity. For more info on managed identity and Run
     Command, refer `https://aka.ms/ManagedIdentity <https://aka.ms/ManagedIdentity>`_ and
     `https://aka.ms/RunCommandManaged <https://aka.ms/RunCommandManaged>`_."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure
     set to true, any failure in the script will fail the deployment and ProvisioningState will be
     marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only
     reflect whether the run command was run or not by the extensions platform, it would not
     indicate whether script failed in case of script failures. See instance view of run command in
     case of script failures to see executionMessage, output, error:
     `https://aka.ms/runcommandmanaged#get-execution-status-and-results
     <https://aka.ms/runcommandmanaged#get-execution-status-and-results>`_."""
    instance_view: Optional["_models.VirtualMachineRunCommandInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The virtual machine run command instance view."""
    treat_failure_as_deployment_failure: Optional[bool] = rest_field(
        name="treatFailureAsDeploymentFailure", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. If set to true, any failure in the script will fail the deployment and
     ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only
     reflect whether the run command was run or not by the extensions platform, it would not
     indicate whether script failed in case of script failures. See instance view of run command in
     case of script failures to see executionMessage, output, error:
     `https://aka.ms/runcommandmanaged#get-execution-status-and-results
     <https://aka.ms/runcommandmanaged#get-execution-status-and-results>`_."""

    @overload
    def __init__(
        self,
        *,
        source: Optional["_models.VirtualMachineRunCommandScriptSource"] = None,
        parameters: Optional[list["_models.RunCommandInputParameter"]] = None,
        protected_parameters: Optional[list["_models.RunCommandInputParameter"]] = None,
        async_execution: Optional[bool] = None,
        run_as_user: Optional[str] = None,
        run_as_password: Optional[str] = None,
        timeout_in_seconds: Optional[int] = None,
        output_blob_uri: Optional[str] = None,
        error_blob_uri: Optional[str] = None,
        output_blob_managed_identity: Optional["_models.RunCommandManagedIdentity"] = None,
        error_blob_managed_identity: Optional["_models.RunCommandManagedIdentity"] = None,
        treat_failure_as_deployment_failure: 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 VirtualMachineRunCommandScriptSource(_Model):
    """Describes the script sources for run command. Use only one of these script sources: script,
    scriptUri, commandId, galleryScriptReferenceId.

    :ivar script: Specifies the script content to be executed on the VM.
    :vartype script: str
    :ivar script_uri: Specifies the script download location. It can be either SAS URI of an Azure
     storage blob with read access or public URI.
    :vartype script_uri: str
    :ivar command_id: Specifies a commandId of predefined built-in script. Command IDs available
     for Linux are listed at `https://aka.ms/RunCommandManagedLinux#available-commands
     <https://aka.ms/RunCommandManagedLinux#available-commands>`_, Windows at
     `https://aka.ms/RunCommandManagedWindows#available-commands
     <https://aka.ms/RunCommandManagedWindows#available-commands>`_.
    :vartype command_id: str
    :ivar script_uri_managed_identity: User-assigned managed identity that has access to scriptUri
     in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make
     sure the Azure storage blob exists, and managed identity has been given access to blob's
     container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity,
     make sure you add it under VM's identity. For more info on managed identity and Run Command,
     refer `https://aka.ms/ManagedIdentity <https://aka.ms/ManagedIdentity>`_ and
     `https://aka.ms/RunCommandManaged <https://aka.ms/RunCommandManaged>`_.
    :vartype script_uri_managed_identity: ~azure.mgmt.compute.models.RunCommandManagedIdentity
    :ivar script_shell: Optional. Specify which shell to use for running the script. These values
     must match those expected by the extension. Currently supported only for Windows VMs, script
     uses Powershell 7 when specified. Powershell 7 must be already installed on the machine to use
     Powershell7 parameter value. Known values are: "Default" and "Powershell7".
    :vartype script_shell: str or ~azure.mgmt.compute.models.ScriptShellTypes
    :ivar gallery_script_reference_id: The resource ID of a Gallery Script version that needs to be
     executed. Example ID looks like
     /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{scriptName}/versions/{version}.
    :vartype gallery_script_reference_id: str
    """

    script: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the script content to be executed on the VM."""
    script_uri: Optional[str] = rest_field(name="scriptUri", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the script download location. It can be either SAS URI of an Azure storage blob with
     read access or public URI."""
    command_id: Optional[str] = rest_field(name="commandId", visibility=["read", "create", "update", "delete", "query"])
    """Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed
     at `https://aka.ms/RunCommandManagedLinux#available-commands
     <https://aka.ms/RunCommandManagedLinux#available-commands>`_, Windows at
     `https://aka.ms/RunCommandManagedWindows#available-commands
     <https://aka.ms/RunCommandManagedWindows#available-commands>`_."""
    script_uri_managed_identity: Optional["_models.RunCommandManagedIdentity"] = rest_field(
        name="scriptUriManagedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use
     an empty object in case of system-assigned identity. Make sure the Azure storage blob exists,
     and managed identity has been given access to blob's container with 'Storage Blob Data Reader'
     role assignment. In case of user-assigned identity, make sure you add it under VM's identity.
     For more info on managed identity and Run Command, refer `https://aka.ms/ManagedIdentity
     <https://aka.ms/ManagedIdentity>`_ and `https://aka.ms/RunCommandManaged
     <https://aka.ms/RunCommandManaged>`_."""
    script_shell: Optional[Union[str, "_models.ScriptShellTypes"]] = rest_field(
        name="scriptShell", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Specify which shell to use for running the script. These values must match those
     expected by the extension. Currently supported only for Windows VMs, script uses Powershell 7
     when specified. Powershell 7 must be already installed on the machine to use Powershell7
     parameter value. Known values are: \"Default\" and \"Powershell7\"."""
    gallery_script_reference_id: Optional[str] = rest_field(
        name="galleryScriptReferenceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of a Gallery Script version that needs to be executed. Example ID looks like
     /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{scriptName}/versions/{version}."""

    @overload
    def __init__(
        self,
        *,
        script: Optional[str] = None,
        script_uri: Optional[str] = None,
        command_id: Optional[str] = None,
        script_uri_managed_identity: Optional["_models.RunCommandManagedIdentity"] = None,
        script_shell: Optional[Union[str, "_models.ScriptShellTypes"]] = None,
        gallery_script_reference_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 VirtualMachineRunCommandUpdate(UpdateResource):
    """Describes a Virtual Machine run command.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Describes the properties of a Virtual Machine run command.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineRunCommandProperties
    """

    properties: Optional["_models.VirtualMachineRunCommandProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine run command."""

    __flattened_items = [
        "source",
        "parameters",
        "protected_parameters",
        "async_execution",
        "run_as_user",
        "run_as_password",
        "timeout_in_seconds",
        "output_blob_uri",
        "error_blob_uri",
        "output_blob_managed_identity",
        "error_blob_managed_identity",
        "provisioning_state",
        "instance_view",
        "treat_failure_as_deployment_failure",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineRunCommandProperties"] = 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 VirtualMachineScaleSet(TrackedResource):
    """Describes a Virtual Machine Scale Set.

    :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.compute.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 sku: The virtual machine scale set sku.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar plan: Specifies information about the marketplace image used to create the virtual
     machine. This element is only used for marketplace images. Before you can use a marketplace
     image from an API, you must enable the image for programmatic use.  In the Azure portal, find
     the marketplace image that you want to use and then click **Want to deploy programmatically,
     Get Started ->**. Enter any required information and then click **Save**.
    :vartype plan: ~azure.mgmt.compute.models.Plan
    :ivar properties: Describes the properties of a Virtual Machine Scale Set.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetProperties
    :ivar identity: The identity of the virtual machine scale set, if configured.
    :vartype identity: ~azure.mgmt.compute.models.VirtualMachineScaleSetIdentity
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    :ivar extended_location: The extended location of the Virtual Machine Scale Set.
    :vartype extended_location: ~azure.mgmt.compute.models.ExtendedLocation
    :ivar etag: Etag is property returned in Create/Update/Get response of the VMSS, so that
     customer can supply it in the header to ensure optimistic updates.
    :vartype etag: str
    :ivar placement: Placement section specifies the user-defined constraints for virtual machine
     scale set hardware placement. Minimum api-version: 2025-04-01.
    :vartype placement: ~azure.mgmt.compute.models.Placement
    """

    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine scale set sku."""
    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the marketplace image used to create the virtual machine. This
     element is only used for marketplace images. Before you can use a marketplace image from an
     API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace
     image that you want to use and then click **Want to deploy programmatically, Get Started ->**.
     Enter any required information and then click **Save**."""
    properties: Optional["_models.VirtualMachineScaleSetProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Scale Set."""
    identity: Optional["_models.VirtualMachineScaleSetIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the virtual machine scale set, if configured."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The availability zones."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended location of the Virtual Machine Scale Set."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Etag is property returned in Create/Update/Get response of the VMSS, so that customer can
     supply it in the header to ensure optimistic updates."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Placement section specifies the user-defined constraints for virtual machine scale set hardware
     placement. Minimum api-version: 2025-04-01."""

    __flattened_items = [
        "upgrade_policy",
        "scheduled_events_policy",
        "automatic_repairs_policy",
        "virtual_machine_profile",
        "provisioning_state",
        "overprovision",
        "do_not_run_extensions_on_overprovisioned_v_ms",
        "unique_id",
        "single_placement_group",
        "zone_balance",
        "platform_fault_domain_count",
        "proximity_placement_group",
        "host_group",
        "additional_capabilities",
        "scale_in_policy",
        "orchestration_mode",
        "spot_restore_policy",
        "priority_mix_policy",
        "time_created",
        "constrained_maximum_capacity",
        "resiliency_policy",
        "zonal_platform_fault_domain_align_mode",
        "sku_profile",
        "high_speed_interconnect_placement",
        "lifecycle_hooks_profile",
        "external_health_policy",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        sku: Optional["_models.Sku"] = None,
        plan: Optional["_models.Plan"] = None,
        properties: Optional["_models.VirtualMachineScaleSetProperties"] = None,
        identity: Optional["_models.VirtualMachineScaleSetIdentity"] = None,
        zones: Optional[list[str]] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        placement: Optional["_models.Placement"] = 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 VirtualMachineScaleSetDataDisk(_Model):
    """Describes a virtual machine scale set data disk.

    :ivar name: The disk name.
    :vartype name: str
    :ivar lun: Specifies the logical unit number of the data disk. This value is used to identify
     data disks within the VM and therefore must be unique for each data disk attached to a VM.
     Required.
    :vartype lun: int
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    :ivar create_option: The create option. Required. Known values are: "FromImage", "Empty",
     "Attach", "Copy", and "Restore".
    :vartype create_option: str or ~azure.mgmt.compute.models.DiskCreateOptionTypes
    :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be
     used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is
     the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
    :vartype disk_size_gb: int
    :ivar storage_fault_domain_alignment: Specifies the storage fault domain alignment type for the
     disk. Known values are: "Aligned" and "BestEffortAligned".
    :vartype storage_fault_domain_alignment: str or
     ~azure.mgmt.compute.models.StorageFaultDomainAlignmentType
    :ivar managed_disk: The managed disk parameters.
    :vartype managed_disk: ~azure.mgmt.compute.models.VirtualMachineScaleSetManagedDiskParameters
    :ivar disk_iops_read_write: Specifies the Read-Write IOPS for the managed disk. Should be used
     only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be
     assigned based on diskSizeGB.
    :vartype disk_iops_read_write: int
    :ivar disk_m_bps_read_write: Specifies the bandwidth in MB per second for the managed disk.
     Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value
     would be assigned based on diskSizeGB.
    :vartype disk_m_bps_read_write: int
    :ivar delete_option: Specifies whether data disk should be deleted or detached upon VMSS Flex
     deletion (This feature is available for VMSS with Flexible OrchestrationMode only).<br><br>
     Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when the
     VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained
     after VMSS Flex VM is deleted.<br><br> The default value is set to **Delete**. Known values
     are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disk name."""
    lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the logical unit number of the data disk. This value is used to identify data disks
     within the VM and therefore must be unique for each data disk attached to a VM. Required."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The default values are: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""
    create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(
        name="createOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """The create option. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", \"Copy\",
     and \"Restore\"."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite
     the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes
     x 1024^3 for the disk and the value cannot be larger than 1023."""
    storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = rest_field(
        name="storageFaultDomainAlignment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage fault domain alignment type for the disk. Known values are: \"Aligned\"
     and \"BestEffortAligned\"."""
    managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed disk parameters."""
    disk_iops_read_write: Optional[int] = rest_field(
        name="diskIOPSReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType
     is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB."""
    disk_m_bps_read_write: Optional[int] = rest_field(
        name="diskMBpsReadWrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the bandwidth in MB per second for the managed disk. Should be used only when
     StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based
     on diskSizeGB."""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature
     is available for VMSS with Flexible OrchestrationMode only).<br><br> Possible values: <br><br>
     **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is
     deleted.<br><br> **Detach** If this value is used, the data disk is retained after VMSS Flex VM
     is deleted.<br><br> The default value is set to **Delete**. Known values are: \"Delete\" and
     \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        lun: int,
        create_option: Union[str, "_models.DiskCreateOptionTypes"],
        name: Optional[str] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        write_accelerator_enabled: Optional[bool] = None,
        disk_size_gb: Optional[int] = None,
        storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = None,
        managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = None,
        disk_iops_read_write: Optional[int] = None,
        disk_m_bps_read_write: Optional[int] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = 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 VirtualMachineScaleSetExtension(SubResourceReadOnly):
    """Describes a Virtual Machine Scale Set Extension.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: Resource name.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar properties: Describes the properties of a Virtual Machine Scale Set Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetExtensionProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource name."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Scale Set Extension."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "provisioning_state",
        "provision_after_extensions",
        "suppress_failures",
        "protected_settings_from_key_vault",
    ]

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = 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 VirtualMachineScaleSetExtensionProfile(_Model):
    """Describes a virtual machine scale set extension profile.

    :ivar extensions: The virtual machine scale set child extension resources.
    :vartype extensions: list[~azure.mgmt.compute.models.VirtualMachineScaleSetExtension]
    :ivar extensions_time_budget: Specifies the time alloted for all extensions to start. The time
     duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in
     ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.
    :vartype extensions_time_budget: str
    """

    extensions: Optional[list["_models.VirtualMachineScaleSetExtension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set child extension resources."""
    extensions_time_budget: Optional[str] = rest_field(
        name="extensionsTimeBudget", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the time alloted for all extensions to start. The time duration should be between 15
     minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default
     value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01."""

    @overload
    def __init__(
        self,
        *,
        extensions: Optional[list["_models.VirtualMachineScaleSetExtension"]] = None,
        extensions_time_budget: 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 VirtualMachineScaleSetExtensionProperties(_Model):  # pylint: disable=name-too-long
    """Describes the properties of a Virtual Machine Scale Set Extension.

    :ivar force_update_tag: If a value is provided and is different from the previous value, the
     extension handler will be forced to update even if the extension configuration has not changed.
    :vartype force_update_tag: str
    :ivar publisher: The name of the extension handler publisher.
    :vartype publisher: str
    :ivar type: Specifies the type of the extension; an example is "CustomScriptExtension".
    :vartype type: str
    :ivar type_handler_version: Specifies the version of the script handler.
    :vartype type_handler_version: str
    :ivar auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
     version if one is available at deployment time. Once deployed, however, the extension will not
     upgrade minor versions unless redeployed, even with this property set to true.
    :vartype auto_upgrade_minor_version: bool
    :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically
     upgraded by the platform if there is a newer version of the extension available.
    :vartype enable_automatic_upgrade: bool
    :ivar settings: Json formatted public settings for the extension.
    :vartype settings: any
    :ivar protected_settings: The extension can contain either protectedSettings or
     protectedSettingsFromKeyVault or no protected settings at all.
    :vartype protected_settings: any
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar provision_after_extensions: Collection of extension names after which this extension
     needs to be provisioned.
    :vartype provision_after_extensions: list[str]
    :ivar suppress_failures: Indicates whether failures stemming from the extension will be
     suppressed (Operational failures such as not connecting to the VM will not be suppressed
     regardless of this value). The default is false.
    :vartype suppress_failures: bool
    :ivar protected_settings_from_key_vault: The extensions protected settings that are passed by
     reference, and consumed from key vault.
    :vartype protected_settings_from_key_vault: ~azure.mgmt.compute.models.KeyVaultSecretReference
    """

    force_update_tag: Optional[str] = rest_field(
        name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"]
    )
    """If a value is provided and is different from the previous value, the extension handler will be
     forced to update even if the extension configuration has not changed."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the extension handler publisher."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the extension; an example is \"CustomScriptExtension\"."""
    type_handler_version: Optional[str] = rest_field(
        name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the version of the script handler."""
    auto_upgrade_minor_version: Optional[bool] = rest_field(
        name="autoUpgradeMinorVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should use a newer minor version if one is available at
     deployment time. Once deployed, however, the extension will not upgrade minor versions unless
     redeployed, even with this property set to true."""
    enable_automatic_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension should be automatically upgraded by the platform if there is a
     newer version of the extension available."""
    settings: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Json formatted public settings for the extension."""
    protected_settings: Optional[Any] = rest_field(
        name="protectedSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no
     protected settings at all."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    provision_after_extensions: Optional[list[str]] = rest_field(
        name="provisionAfterExtensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of extension names after which this extension needs to be provisioned."""
    suppress_failures: Optional[bool] = rest_field(
        name="suppressFailures", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether failures stemming from the extension will be suppressed (Operational failures
     such as not connecting to the VM will not be suppressed regardless of this value). The default
     is false."""
    protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = rest_field(
        name="protectedSettingsFromKeyVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extensions protected settings that are passed by reference, and consumed from key vault."""

    @overload
    def __init__(
        self,
        *,
        force_update_tag: Optional[str] = None,
        publisher: Optional[str] = None,
        type: Optional[str] = None,
        type_handler_version: Optional[str] = None,
        auto_upgrade_minor_version: Optional[bool] = None,
        enable_automatic_upgrade: Optional[bool] = None,
        settings: Optional[Any] = None,
        protected_settings: Optional[Any] = None,
        provision_after_extensions: Optional[list[str]] = None,
        suppress_failures: Optional[bool] = None,
        protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = 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 VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly):
    """Describes a Virtual Machine Scale Set Extension.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: The name of the extension.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar properties: Describes the properties of a Virtual Machine Scale Set Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetExtensionProperties
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the extension."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Scale Set Extension."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "provisioning_state",
        "provision_after_extensions",
        "suppress_failures",
        "protected_settings_from_key_vault",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = 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 VirtualMachineScaleSetHardwareProfile(_Model):
    """Specifies the hardware settings for the virtual machine scale set.

    :ivar vm_size_properties: Specifies the properties for customizing the size of the virtual
     machine. Minimum api-version: 2021-11-01. Please follow the instructions in `VM Customization
     <https://aka.ms/vmcustomization>`_ for more details.
    :vartype vm_size_properties: ~azure.mgmt.compute.models.VMSizeProperties
    """

    vm_size_properties: Optional["_models.VMSizeProperties"] = rest_field(
        name="vmSizeProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the properties for customizing the size of the virtual machine. Minimum api-version:
     2021-11-01. Please follow the instructions in `VM Customization
     <https://aka.ms/vmcustomization>`_ for more details."""

    @overload
    def __init__(
        self,
        *,
        vm_size_properties: Optional["_models.VMSizeProperties"] = 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 VirtualMachineScaleSetIdentity(_Model):
    """Identity for the virtual machine scale set.

    :ivar principal_id: The principal id of virtual machine scale set identity. This property will
     only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant id associated with the virtual machine scale set. This property
     will only be provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of identity used for the virtual machine scale set. The type
     'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user
     assigned identities. The type 'None' will remove any identities from the virtual machine scale
     set. Known values are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and
     "None".
    :vartype type: str or ~azure.mgmt.compute.models.ResourceIdentityType
    :ivar user_assigned_identities: The list of user identities associated with the virtual machine
     scale set. The user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.compute.models.UserAssignedIdentitiesValue]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal id of virtual machine scale set identity. This property will only be provided for
     a system assigned identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant id associated with the virtual machine scale set. This property will only be
     provided for a system assigned identity."""
    type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of identity used for the virtual machine scale set. The type 'SystemAssigned,
     UserAssigned' includes both an implicitly created identity and a set of user assigned
     identities. The type 'None' will remove any identities from the virtual machine scale set.
     Known values are: \"SystemAssigned\", \"UserAssigned\", \"SystemAssigned, UserAssigned\", and
     \"None\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user identities associated with the virtual machine scale set. The user identity
     dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.ResourceIdentityType"]] = None,
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = 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 VirtualMachineScaleSetInstanceView(_Model):
    """The instance view of a virtual machine scale set.

    :ivar virtual_machine: The instance view status summary for the virtual machine scale set.
    :vartype virtual_machine:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetInstanceViewStatusesSummary
    :ivar extensions: The extensions information.
    :vartype extensions: list[~azure.mgmt.compute.models.VirtualMachineScaleSetVMExtensionsSummary]
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar orchestration_services: The orchestration services information.
    :vartype orchestration_services: list[~azure.mgmt.compute.models.OrchestrationServiceSummary]
    """

    virtual_machine: Optional["_models.VirtualMachineScaleSetInstanceViewStatusesSummary"] = rest_field(
        name="virtualMachine", visibility=["read"]
    )
    """The instance view status summary for the virtual machine scale set."""
    extensions: Optional[list["_models.VirtualMachineScaleSetVMExtensionsSummary"]] = rest_field(visibility=["read"])
    """The extensions information."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    orchestration_services: Optional[list["_models.OrchestrationServiceSummary"]] = rest_field(
        name="orchestrationServices", visibility=["read"]
    )
    """The orchestration services information."""

    @overload
    def __init__(
        self,
        *,
        statuses: Optional[list["_models.InstanceViewStatus"]] = 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 VirtualMachineScaleSetInstanceViewStatusesSummary(_Model):  # pylint: disable=name-too-long
    """Instance view statuses summary for virtual machines of a virtual machine scale set.

    :ivar statuses_summary: The extensions information.
    :vartype statuses_summary: list[~azure.mgmt.compute.models.VirtualMachineStatusCodeCount]
    """

    statuses_summary: Optional[list["_models.VirtualMachineStatusCodeCount"]] = rest_field(
        name="statusesSummary", visibility=["read"]
    )
    """The extensions information."""


class VirtualMachineScaleSetIPConfiguration(_Model):
    """Describes a virtual machine scale set network profile's IP configuration.

    :ivar name: The IP configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machine scale set network profile's IP configuration
     properties.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetIPConfigurationProperties
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IP configuration name. Required."""
    properties: Optional["_models.VirtualMachineScaleSetIPConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine scale set network profile's IP configuration properties."""

    __flattened_items = [
        "subnet",
        "primary",
        "public_ip_address_configuration",
        "private_ip_address_version",
        "application_gateway_backend_address_pools",
        "application_security_groups",
        "load_balancer_backend_address_pools",
        "load_balancer_inbound_nat_pools",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachineScaleSetIPConfigurationProperties"] = 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 VirtualMachineScaleSetIPConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's IP configuration properties.

    :ivar subnet: Specifies the identifier of the subnet.
    :vartype subnet: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar primary: Specifies the primary network interface in case the virtual machine has more
     than 1 network interface.
    :vartype primary: bool
    :ivar public_ip_address_configuration: The publicIPAddressConfiguration.
    :vartype public_ip_address_configuration:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetPublicIPAddressConfiguration
    :ivar private_ip_address_version: Available from Api-Version 2017-03-30 onwards, it represents
     whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible
     values are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6".
    :vartype private_ip_address_version: str or ~azure.mgmt.compute.models.IPVersion
    :ivar application_gateway_backend_address_pools: Specifies an array of references to backend
     address pools of application gateways. A scale set can reference backend address pools of
     multiple application gateways. Multiple scale sets cannot use the same application gateway.
    :vartype application_gateway_backend_address_pools:
     list[~azure.mgmt.compute.models.SubResource]
    :ivar application_security_groups: Specifies an array of references to application security
     group.
    :vartype application_security_groups: list[~azure.mgmt.compute.models.SubResource]
    :ivar load_balancer_backend_address_pools: Specifies an array of references to backend address
     pools of load balancers. A scale set can reference backend address pools of one public and one
     internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
    :vartype load_balancer_backend_address_pools: list[~azure.mgmt.compute.models.SubResource]
    :ivar load_balancer_inbound_nat_pools: Specifies an array of references to inbound Nat pools of
     the load balancers. A scale set can reference inbound nat pools of one public and one internal
     load balancer. Multiple scale sets cannot use the same basic sku load balancer.
    :vartype load_balancer_inbound_nat_pools: list[~azure.mgmt.compute.models.SubResource]
    """

    subnet: Optional["_models.ApiEntityReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the identifier of the subnet."""
    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary network interface in case the virtual machine has more than 1 network
     interface."""
    public_ip_address_configuration: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfiguration"] = (
        rest_field(name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"])
    )
    """The publicIPAddressConfiguration."""
    private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field(
        name="privateIPAddressVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Available from Api-Version 2017-03-30 onwards, it represents whether the specific
     ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and
     'IPv6'. Known values are: \"IPv4\" and \"IPv6\"."""
    application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationGatewayBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to backend address pools of application gateways. A scale set
     can reference backend address pools of multiple application gateways. Multiple scale sets
     cannot use the same application gateway."""
    application_security_groups: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to application security group."""
    load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="loadBalancerBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to backend address pools of load balancers. A scale set can
     reference backend address pools of one public and one internal load balancer. Multiple scale
     sets cannot use the same basic sku load balancer."""
    load_balancer_inbound_nat_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="loadBalancerInboundNatPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to inbound Nat pools of the load balancers. A scale set can
     reference inbound nat pools of one public and one internal load balancer. Multiple scale sets
     cannot use the same basic sku load balancer."""

    @overload
    def __init__(
        self,
        *,
        subnet: Optional["_models.ApiEntityReference"] = None,
        primary: Optional[bool] = None,
        public_ip_address_configuration: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfiguration"] = None,
        private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = None,
        application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = None,
        application_security_groups: Optional[list["_models.SubResource"]] = None,
        load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = None,
        load_balancer_inbound_nat_pools: Optional[list["_models.SubResource"]] = 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 VirtualMachineScaleSetIpTag(_Model):
    """Contains the IP tag associated with the public IP address.

    :ivar ip_tag_type: IP tag type. Example: FirstPartyUsage.
    :vartype ip_tag_type: str
    :ivar tag: IP tag associated with the public IP. Example: SQL, Storage etc.
    :vartype tag: str
    """

    ip_tag_type: Optional[str] = rest_field(
        name="ipTagType", visibility=["read", "create", "update", "delete", "query"]
    )
    """IP tag type. Example: FirstPartyUsage."""
    tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """IP tag associated with the public IP. Example: SQL, Storage etc."""

    @overload
    def __init__(
        self,
        *,
        ip_tag_type: Optional[str] = None,
        tag: 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 VirtualMachineScaleSetManagedDiskParameters(_Model):  # pylint: disable=name-too-long
    """Describes the parameters of a ScaleSet managed disk.

    :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE:
     UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values
     are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS",
     "StandardSSD_ZRS", and "PremiumV2_LRS".
    :vartype storage_account_type: str or ~azure.mgmt.compute.models.StorageAccountTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed disk.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    :ivar security_profile: Specifies the security profile for the managed disk.
    :vartype security_profile: ~azure.mgmt.compute.models.VMDiskSecurityProfile
    """

    storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field(
        name="storageAccountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used
     with data disks, it cannot be used with OS Disk. Known values are: \"Standard_LRS\",
     \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\",
     and \"PremiumV2_LRS\"."""
    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the customer managed disk encryption set resource id for the managed disk."""
    security_profile: Optional["_models.VMDiskSecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the security profile for the managed disk."""

    @overload
    def __init__(
        self,
        *,
        storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None,
        security_profile: Optional["_models.VMDiskSecurityProfile"] = 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 VirtualMachineScaleSetMigrationInfo(_Model):
    """Describes the Availability Set properties related to migration to Flexible Virtual Machine
    Scale Set.

    :ivar default_virtual_machine_scale_set_info: Indicates the target Virtual Machine ScaleSet
     properties upon triggering a seamless migration without downtime of the VMs via the
     ConvertToVirtualMachineScaleSet API.
    :vartype default_virtual_machine_scale_set_info:
     ~azure.mgmt.compute.models.DefaultVirtualMachineScaleSetInfo
    :ivar migrate_to_virtual_machine_scale_set: Specifies the Virtual Machine Scale Set that the
     Availability Set is migrated to.
    :vartype migrate_to_virtual_machine_scale_set: ~azure.mgmt.compute.models.SubResource
    """

    default_virtual_machine_scale_set_info: Optional["_models.DefaultVirtualMachineScaleSetInfo"] = rest_field(
        name="defaultVirtualMachineScaleSetInfo", visibility=["read"]
    )
    """Indicates the target Virtual Machine ScaleSet properties upon triggering a seamless migration
     without downtime of the VMs via the ConvertToVirtualMachineScaleSet API."""
    migrate_to_virtual_machine_scale_set: Optional["_models.SubResource"] = rest_field(
        name="migrateToVirtualMachineScaleSet", visibility=["read"]
    )
    """Specifies the Virtual Machine Scale Set that the Availability Set is migrated to."""


class VirtualMachineScaleSetNetworkConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's network configurations.

    :ivar name: The network configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machine scale set network profile's IP configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkConfigurationProperties
    :ivar tags: Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration.
    :vartype tags: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The network configuration name. Required."""
    properties: Optional["_models.VirtualMachineScaleSetNetworkConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine scale set network profile's IP configuration."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration."""

    __flattened_items = [
        "primary",
        "enable_accelerated_networking",
        "disable_tcp_state_tracking",
        "enable_fpga",
        "network_security_group",
        "dns_settings",
        "ip_configurations",
        "enable_ip_forwarding",
        "delete_option",
        "auxiliary_mode",
        "auxiliary_sku",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachineScaleSetNetworkConfigurationProperties"] = None,
        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:
        _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 VirtualMachineScaleSetNetworkConfigurationDnsSettings(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale sets network configuration's DNS settings.

    :ivar dns_servers: List of DNS servers IP addresses.
    :vartype dns_servers: list[str]
    """

    dns_servers: Optional[list[str]] = rest_field(
        name="dnsServers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of DNS servers IP addresses."""

    @overload
    def __init__(
        self,
        *,
        dns_servers: 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 VirtualMachineScaleSetNetworkConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's IP configuration.

    :ivar primary: Specifies the primary network interface in case the virtual machine has more
     than 1 network interface.
    :vartype primary: bool
    :ivar enable_accelerated_networking: Specifies whether the network interface is accelerated
     networking-enabled.
    :vartype enable_accelerated_networking: bool
    :ivar disable_tcp_state_tracking: Specifies whether the network interface is disabled for tcp
     state tracking.
    :vartype disable_tcp_state_tracking: bool
    :ivar enable_fpga: Specifies whether the network interface is FPGA networking-enabled.
    :vartype enable_fpga: bool
    :ivar network_security_group: The network security group.
    :vartype network_security_group: ~azure.mgmt.compute.models.SubResource
    :ivar dns_settings: The dns settings to be applied on the network interfaces.
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings
    :ivar ip_configurations: Specifies the IP configurations of the network interface. Required.
    :vartype ip_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineScaleSetIPConfiguration]
    :ivar enable_ip_forwarding: Whether IP forwarding enabled on this NIC.
    :vartype enable_ip_forwarding: bool
    :ivar delete_option: Specify what happens to the network interface when the VM is deleted.
     Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    :ivar auxiliary_mode: Specifies whether the Auxiliary mode is enabled for the Network Interface
     resource. Known values are: "None", "AcceleratedConnections", and "Floating".
    :vartype auxiliary_mode: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliaryMode
    :ivar auxiliary_sku: Specifies whether the Auxiliary sku is enabled for the Network Interface
     resource. Known values are: "None", "A1", "A2", "A4", and "A8".
    :vartype auxiliary_sku: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliarySku
    """

    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary network interface in case the virtual machine has more than 1 network
     interface."""
    enable_accelerated_networking: Optional[bool] = rest_field(
        name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is accelerated networking-enabled."""
    disable_tcp_state_tracking: Optional[bool] = rest_field(
        name="disableTcpStateTracking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is disabled for tcp state tracking."""
    enable_fpga: Optional[bool] = rest_field(
        name="enableFpga", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is FPGA networking-enabled."""
    network_security_group: Optional["_models.SubResource"] = rest_field(
        name="networkSecurityGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """The network security group."""
    dns_settings: Optional["_models.VirtualMachineScaleSetNetworkConfigurationDnsSettings"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the network interfaces."""
    ip_configurations: list["_models.VirtualMachineScaleSetIPConfiguration"] = rest_field(
        name="ipConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the IP configurations of the network interface. Required."""
    enable_ip_forwarding: Optional[bool] = rest_field(
        name="enableIPForwarding", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether IP forwarding enabled on this NIC."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the network interface when the VM is deleted. Known values are:
     \"Delete\" and \"Detach\"."""
    auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field(
        name="auxiliaryMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known
     values are: \"None\", \"AcceleratedConnections\", and \"Floating\"."""
    auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field(
        name="auxiliarySku", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values
     are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\"."""

    @overload
    def __init__(
        self,
        *,
        ip_configurations: list["_models.VirtualMachineScaleSetIPConfiguration"],
        primary: Optional[bool] = None,
        enable_accelerated_networking: Optional[bool] = None,
        disable_tcp_state_tracking: Optional[bool] = None,
        enable_fpga: Optional[bool] = None,
        network_security_group: Optional["_models.SubResource"] = None,
        dns_settings: Optional["_models.VirtualMachineScaleSetNetworkConfigurationDnsSettings"] = None,
        enable_ip_forwarding: Optional[bool] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None,
        auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = None,
        auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = 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 VirtualMachineScaleSetNetworkProfile(_Model):
    """Describes a virtual machine scale set network profile.

    :ivar health_probe: A reference to a load balancer probe used to determine the health of an
     instance in the virtual machine scale set. The reference will be in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
    :vartype health_probe: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar network_interface_configurations: The list of network configurations.
    :vartype network_interface_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkConfiguration]
    :ivar network_api_version: specifies the Microsoft.Network API version used when creating
     networking resources in the Network Interface Configurations for Virtual Machine Scale Set with
     orchestration mode 'Flexible'. Known values are: "2020-11-01" and "2022-11-01".
    :vartype network_api_version: str or ~azure.mgmt.compute.models.NetworkApiVersion
    :ivar interconnect_group_profile: Specifies the interconnect group profile to associate with
     the scale set. Minimum api-version: 2026-03-01.
    :vartype interconnect_group_profile: ~azure.mgmt.compute.models.InterconnectGroupProfile
    """

    health_probe: Optional["_models.ApiEntityReference"] = rest_field(
        name="healthProbe", visibility=["read", "create", "update", "delete", "query"]
    )
    """A reference to a load balancer probe used to determine the health of an instance in the virtual
     machine scale set. The reference will be in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'."""
    network_interface_configurations: Optional[list["_models.VirtualMachineScaleSetNetworkConfiguration"]] = rest_field(
        name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of network configurations."""
    network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field(
        name="networkApiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """specifies the Microsoft.Network API version used when creating networking resources in the
     Network Interface Configurations for Virtual Machine Scale Set with orchestration mode
     'Flexible'. Known values are: \"2020-11-01\" and \"2022-11-01\"."""
    interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = rest_field(
        name="interconnectGroupProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the interconnect group profile to associate with the scale set. Minimum api-version:
     2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        health_probe: Optional["_models.ApiEntityReference"] = None,
        network_interface_configurations: Optional[list["_models.VirtualMachineScaleSetNetworkConfiguration"]] = None,
        network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = None,
        interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = 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 VirtualMachineScaleSetOSDisk(_Model):
    """Describes a virtual machine scale set operating system disk.

    :ivar name: The disk name.
    :vartype name: str
    :ivar caching: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,**
     **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium
     storage.**. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    :ivar create_option: Specifies how the virtual machines in the scale set should be created. The
     only allowed value is: **FromImage.** This value is used when you are using an image to create
     the virtual machine. If you are using a platform image, you also use the imageReference element
     described above. If you are using a marketplace image, you  also use the plan element
     previously described. Required. Known values are: "FromImage", "Empty", "Attach", "Copy", and
     "Restore".
    :vartype create_option: str or ~azure.mgmt.compute.models.DiskCreateOptionTypes
    :ivar diff_disk_settings: Specifies the ephemeral disk Settings for the operating system disk
     used by the virtual machine scale set.
    :vartype diff_disk_settings: ~azure.mgmt.compute.models.DiffDiskSettings
    :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be
     used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is
     the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
    :vartype disk_size_gb: int
    :ivar storage_fault_domain_alignment: Specifies the storage fault domain alignment type for the
     disk. Known values are: "Aligned" and "BestEffortAligned".
    :vartype storage_fault_domain_alignment: str or
     ~azure.mgmt.compute.models.StorageFaultDomainAlignmentType
    :ivar os_type: This property allows you to specify the type of the OS that is included in the
     disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,**
     **Linux.**. Known values are: "Windows" and "Linux".
    :vartype os_type: str or ~azure.mgmt.compute.models.OperatingSystemTypes
    :ivar image: Specifies information about the unmanaged user image to base the scale set on.
    :vartype image: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar vhd_containers: Specifies the container urls that are used to store operating system
     disks for the scale set.
    :vartype vhd_containers: list[str]
    :ivar managed_disk: The managed disk parameters.
    :vartype managed_disk: ~azure.mgmt.compute.models.VirtualMachineScaleSetManagedDiskParameters
    :ivar delete_option: Specifies whether OS Disk should be deleted or detached upon VMSS Flex
     deletion (This feature is available for VMSS with Flexible OrchestrationMode only). <br><br>
     Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VMSS
     Flex VM is deleted.<br><br> **Detach** If this value is used, the OS disk is retained after
     VMSS Flex VM is deleted. <br><br> The default value is set to **Delete**. For an Ephemeral OS
     Disk, the default value is set to **Delete**. User cannot change the delete option for
     Ephemeral OS Disk. Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The disk name."""
    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.**
     The default values are: **None for Standard storage. ReadOnly for Premium storage.**. Known
     values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""
    create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(
        name="createOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies how the virtual machines in the scale set should be created. The only allowed value
     is: **FromImage.** This value is used when you are using an image to create the virtual
     machine. If you are using a platform image, you also use the imageReference element described
     above. If you are using a marketplace image, you  also use the plan element previously
     described. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", \"Copy\", and
     \"Restore\"."""
    diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field(
        name="diffDiskSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine
     scale set."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite
     the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of
     bytes x 1024^3 for the disk and the value cannot be larger than 1023."""
    storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = rest_field(
        name="storageFaultDomainAlignment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage fault domain alignment type for the disk. Known values are: \"Aligned\"
     and \"BestEffortAligned\"."""
    os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(
        name="osType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property allows you to specify the type of the OS that is included in the disk if creating
     a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. Known
     values are: \"Windows\" and \"Linux\"."""
    image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the unmanaged user image to base the scale set on."""
    vhd_containers: Optional[list[str]] = rest_field(
        name="vhdContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the container urls that are used to store operating system disks for the scale set."""
    managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed disk parameters."""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature
     is available for VMSS with Flexible OrchestrationMode only). <br><br> Possible values: <br><br>
     **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.<br><br>
     **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
     <br><br> The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is
     set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. Known values
     are: \"Delete\" and \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        create_option: Union[str, "_models.DiskCreateOptionTypes"],
        name: Optional[str] = None,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        write_accelerator_enabled: Optional[bool] = None,
        diff_disk_settings: Optional["_models.DiffDiskSettings"] = None,
        disk_size_gb: Optional[int] = None,
        storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = None,
        os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None,
        image: Optional["_models.VirtualHardDisk"] = None,
        vhd_containers: Optional[list[str]] = None,
        managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = 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 VirtualMachineScaleSetOSProfile(_Model):
    """Describes a virtual machine scale set OS profile.

    :ivar computer_name_prefix: Specifies the computer name prefix for all of the virtual machines
     in the scale set. Computer name prefixes must be 1 to 15 characters long.
    :vartype computer_name_prefix: str
    :ivar admin_username: Specifies the name of the administrator account. <br><br> **Windows-only
     restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin",
     "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser",
     "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root",
     "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
     <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length (Linux):** 64
     characters <br><br> **Max-length (Windows):** 20 characters.
    :vartype admin_username: str
    :ivar admin_password: Specifies the password of the administrator account. <br><br>
     **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters
     <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72
     characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be
     fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a
     special character (Regex match [\\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd",
     "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
     "iloveyou!" <br><br> For resetting the password, see `How to reset the Remote Desktop service
     or its login password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_.
    :vartype admin_password: str
    :ivar custom_data: Specifies a base-64 encoded string of custom data. The base-64 encoded
     string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum
     length of the binary array is 65535 bytes. For using cloud-init for your VM, see `Using
     cloud-init to customize a Linux VM during creation
     <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_.
    :vartype custom_data: str
    :ivar windows_configuration: Specifies Windows operating system settings on the virtual
     machine.
    :vartype windows_configuration: ~azure.mgmt.compute.models.WindowsConfiguration
    :ivar linux_configuration: Specifies the Linux operating system settings on the virtual
     machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed
     Distributions <https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros>`_.
    :vartype linux_configuration: ~azure.mgmt.compute.models.LinuxConfiguration
    :ivar secrets: Specifies set of certificates that should be installed onto the virtual machines
     in the scale set. To install certificates on a virtual machine it is recommended to use the
     `Azure Key Vault virtual machine extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_.
    :vartype secrets: list[~azure.mgmt.compute.models.VaultSecretGroup]
    :ivar allow_extension_operations: Specifies whether extension operations should be allowed on
     the virtual machine scale set. This may only be set to False when no extensions are present on
     the virtual machine scale set.
    :vartype allow_extension_operations: bool
    :ivar require_guest_provision_signal: Optional property which must either be set to True or
     omitted.
    :vartype require_guest_provision_signal: bool
    """

    computer_name_prefix: Optional[str] = rest_field(
        name="computerNamePrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the computer name prefix for all of the virtual machines in the scale set. Computer
     name prefixes must be 1 to 15 characters long."""
    admin_username: Optional[str] = rest_field(
        name="adminUsername", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot
     end in \".\" <br><br> **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\",
     \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\",
     \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\",
     \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\",
     \"test2\", \"test3\", \"user4\", \"user5\". <br><br> **Minimum-length (Linux):** 1  character
     <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20
     characters."""
    admin_password: Optional[str] = rest_field(
        name="adminPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8
     characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):**
     123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity
     requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters
     <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_])
     <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\",
     \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"
     <br><br> For resetting the password, see `How to reset the Remote Desktop service or its login
     password in a Windows VM
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp>`_ <br><br> For
     resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs
     using the VMAccess Extension
     <https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection>`_."""
    custom_data: Optional[str] = rest_field(
        name="customData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a
     binary array that is saved as a file on the Virtual Machine. The maximum length of the binary
     array is 65535 bytes. For using cloud-init for your VM, see `Using cloud-init to customize a
     Linux VM during creation
     <https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init>`_."""
    windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field(
        name="windowsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Windows operating system settings on the virtual machine."""
    linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field(
        name="linuxConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Linux operating system settings on the virtual machine. For a list of supported
     Linux distributions, see `Linux on Azure-Endorsed Distributions
     <https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros>`_."""
    secrets: Optional[list["_models.VaultSecretGroup"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies set of certificates that should be installed onto the virtual machines in the scale
     set. To install certificates on a virtual machine it is recommended to use the `Azure Key Vault
     virtual machine extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_."""
    allow_extension_operations: Optional[bool] = rest_field(
        name="allowExtensionOperations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether extension operations should be allowed on the virtual machine scale set. This
     may only be set to False when no extensions are present on the virtual machine scale set."""
    require_guest_provision_signal: Optional[bool] = rest_field(
        name="requireGuestProvisionSignal", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional property which must either be set to True or omitted."""

    @overload
    def __init__(
        self,
        *,
        computer_name_prefix: Optional[str] = None,
        admin_username: Optional[str] = None,
        admin_password: Optional[str] = None,
        custom_data: Optional[str] = None,
        windows_configuration: Optional["_models.WindowsConfiguration"] = None,
        linux_configuration: Optional["_models.LinuxConfiguration"] = None,
        secrets: Optional[list["_models.VaultSecretGroup"]] = None,
        allow_extension_operations: Optional[bool] = None,
        require_guest_provision_signal: 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 VirtualMachineScaleSetProperties(_Model):
    """Describes the properties of a Virtual Machine Scale Set.

    :ivar upgrade_policy: The upgrade policy.
    :vartype upgrade_policy: ~azure.mgmt.compute.models.UpgradePolicy
    :ivar scheduled_events_policy: The ScheduledEventsPolicy.
    :vartype scheduled_events_policy: ~azure.mgmt.compute.models.ScheduledEventsPolicy
    :ivar automatic_repairs_policy: Policy for automatic repairs.
    :vartype automatic_repairs_policy: ~azure.mgmt.compute.models.AutomaticRepairsPolicy
    :ivar virtual_machine_profile: The virtual machine profile.
    :vartype virtual_machine_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetVMProfile
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar overprovision: Specifies whether the Virtual Machine Scale Set should be overprovisioned.
    :vartype overprovision: bool
    :ivar do_not_run_extensions_on_overprovisioned_v_ms: When Overprovision is enabled, extensions
     are launched only on the requested number of VMs which are finally kept. This property will
     hence ensure that the extensions do not run on the extra overprovisioned VMs.
    :vartype do_not_run_extensions_on_overprovisioned_v_ms: bool
    :ivar unique_id: Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
    :vartype unique_id: str
    :ivar single_placement_group: When true this limits the scale set to a single placement group,
     of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to
     false. However, if singlePlacementGroup is false, it may not be modified to true.
    :vartype single_placement_group: bool
    :ivar zone_balance: Whether to force strictly even Virtual Machine distribution cross x-zones
     in case there is zone outage. zoneBalance property can only be set if the zones property of the
     scale set contains more than one zone. If there are no zones or only one zone specified, then
     zoneBalance property should not be set.
    :vartype zone_balance: bool
    :ivar platform_fault_domain_count: Fault Domain count for each placement group.
    :vartype platform_fault_domain_count: int
    :ivar proximity_placement_group: Specifies information about the proximity placement group that
     the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
    :vartype proximity_placement_group: ~azure.mgmt.compute.models.SubResource
    :ivar host_group: Specifies information about the dedicated host group that the virtual machine
     scale set resides in. Minimum api-version: 2020-06-01.
    :vartype host_group: ~azure.mgmt.compute.models.SubResource
    :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the
     Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines
     have the capability to support attaching managed data disks with UltraSSD_LRS storage account
     type.
    :vartype additional_capabilities: ~azure.mgmt.compute.models.AdditionalCapabilities
    :ivar scale_in_policy: Specifies the policies applied when scaling in Virtual Machines in the
     Virtual Machine Scale Set.
    :vartype scale_in_policy: ~azure.mgmt.compute.models.ScaleInPolicy
    :ivar orchestration_mode: Specifies the orchestration mode for the virtual machine scale set.
     Known values are: "Uniform" and "Flexible".
    :vartype orchestration_mode: str or ~azure.mgmt.compute.models.OrchestrationMode
    :ivar spot_restore_policy: Specifies the Spot Restore properties for the virtual machine scale
     set.
    :vartype spot_restore_policy: ~azure.mgmt.compute.models.SpotRestorePolicy
    :ivar priority_mix_policy: Specifies the desired targets for mixing Spot and Regular priority
     VMs within the same VMSS Flex instance.
    :vartype priority_mix_policy: ~azure.mgmt.compute.models.PriorityMixPolicy
    :ivar time_created: Specifies the time at which the Virtual Machine Scale Set resource was
     created. Minimum api-version: 2021-11-01.
    :vartype time_created: ~datetime.datetime
    :ivar constrained_maximum_capacity: Optional property which must either be set to True or
     omitted.
    :vartype constrained_maximum_capacity: bool
    :ivar resiliency_policy: Policy for Resiliency.
    :vartype resiliency_policy: ~azure.mgmt.compute.models.ResiliencyPolicy
    :ivar zonal_platform_fault_domain_align_mode: Specifies the align mode between Virtual Machine
     Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and
     "BestEffortAligned".
    :vartype zonal_platform_fault_domain_align_mode: str or
     ~azure.mgmt.compute.models.ZonalPlatformFaultDomainAlignMode
    :ivar sku_profile: Specifies the sku profile for the virtual machine scale set.
    :vartype sku_profile: ~azure.mgmt.compute.models.SkuProfile
    :ivar high_speed_interconnect_placement: Specifies the high speed interconnect placement for
     the virtual machine scale set. Known values are: "None" and "Trunk".
    :vartype high_speed_interconnect_placement: str or
     ~azure.mgmt.compute.models.HighSpeedInterconnectPlacement
    :ivar lifecycle_hooks_profile: Specifies the lifecycle hooks profile for the virtual machine
     scale set.
    :vartype lifecycle_hooks_profile: ~azure.mgmt.compute.models.LifecycleHooksProfile
    :ivar external_health_policy: Specifies the external health policy for the virtual machine
     scale set.
    :vartype external_health_policy: ~azure.mgmt.compute.models.ExternalHealthPolicy
    """

    upgrade_policy: Optional["_models.UpgradePolicy"] = rest_field(
        name="upgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The upgrade policy."""
    scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = rest_field(
        name="scheduledEventsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ScheduledEventsPolicy."""
    automatic_repairs_policy: Optional["_models.AutomaticRepairsPolicy"] = rest_field(
        name="automaticRepairsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for automatic repairs."""
    virtual_machine_profile: Optional["_models.VirtualMachineScaleSetVMProfile"] = rest_field(
        name="virtualMachineProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine profile."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    overprovision: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether the Virtual Machine Scale Set should be overprovisioned."""
    do_not_run_extensions_on_overprovisioned_v_ms: Optional[bool] = rest_field(
        name="doNotRunExtensionsOnOverprovisionedVMs", visibility=["read", "create", "update", "delete", "query"]
    )
    """When Overprovision is enabled, extensions are launched only on the requested number of VMs
     which are finally kept. This property will hence ensure that the extensions do not run on the
     extra overprovisioned VMs."""
    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read"])
    """Specifies the ID which uniquely identifies a Virtual Machine Scale Set."""
    single_placement_group: Optional[bool] = rest_field(
        name="singlePlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """When true this limits the scale set to a single placement group, of max size 100 virtual
     machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if
     singlePlacementGroup is false, it may not be modified to true."""
    zone_balance: Optional[bool] = rest_field(
        name="zoneBalance", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone
     outage. zoneBalance property can only be set if the zones property of the scale set contains
     more than one zone. If there are no zones or only one zone specified, then zoneBalance property
     should not be set."""
    platform_fault_domain_count: Optional[int] = rest_field(
        name="platformFaultDomainCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Fault Domain count for each placement group."""
    proximity_placement_group: Optional["_models.SubResource"] = rest_field(
        name="proximityPlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the proximity placement group that the virtual machine scale set
     should be assigned to. Minimum api-version: 2018-04-01."""
    host_group: Optional["_models.SubResource"] = rest_field(
        name="hostGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the dedicated host group that the virtual machine scale set resides
     in. Minimum api-version: 2020-06-01."""
    additional_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field(
        name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual
     Machine Scale Set. For instance: whether the Virtual Machines have the capability to support
     attaching managed data disks with UltraSSD_LRS storage account type."""
    scale_in_policy: Optional["_models.ScaleInPolicy"] = rest_field(
        name="scaleInPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale
     Set."""
    orchestration_mode: Optional[Union[str, "_models.OrchestrationMode"]] = rest_field(
        name="orchestrationMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the orchestration mode for the virtual machine scale set. Known values are:
     \"Uniform\" and \"Flexible\"."""
    spot_restore_policy: Optional["_models.SpotRestorePolicy"] = rest_field(
        name="spotRestorePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Spot Restore properties for the virtual machine scale set."""
    priority_mix_policy: Optional["_models.PriorityMixPolicy"] = rest_field(
        name="priorityMixPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS
     Flex instance."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum
     api-version: 2021-11-01."""
    constrained_maximum_capacity: Optional[bool] = rest_field(
        name="constrainedMaximumCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional property which must either be set to True or omitted."""
    resiliency_policy: Optional["_models.ResiliencyPolicy"] = rest_field(
        name="resiliencyPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for Resiliency."""
    zonal_platform_fault_domain_align_mode: Optional[Union[str, "_models.ZonalPlatformFaultDomainAlignMode"]] = (
        rest_field(name="zonalPlatformFaultDomainAlignMode", visibility=["read", "create", "update", "delete", "query"])
    )
    """Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain
     count. Known values are: \"Aligned\", \"Unaligned\", and \"BestEffortAligned\"."""
    sku_profile: Optional["_models.SkuProfile"] = rest_field(
        name="skuProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the sku profile for the virtual machine scale set."""
    high_speed_interconnect_placement: Optional[Union[str, "_models.HighSpeedInterconnectPlacement"]] = rest_field(
        name="highSpeedInterconnectPlacement", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the high speed interconnect placement for the virtual machine scale set. Known values
     are: \"None\" and \"Trunk\"."""
    lifecycle_hooks_profile: Optional["_models.LifecycleHooksProfile"] = rest_field(
        name="lifecycleHooksProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the lifecycle hooks profile for the virtual machine scale set."""
    external_health_policy: Optional["_models.ExternalHealthPolicy"] = rest_field(
        name="externalHealthPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the external health policy for the virtual machine scale set."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        upgrade_policy: Optional["_models.UpgradePolicy"] = None,
        scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = None,
        automatic_repairs_policy: Optional["_models.AutomaticRepairsPolicy"] = None,
        virtual_machine_profile: Optional["_models.VirtualMachineScaleSetVMProfile"] = None,
        overprovision: Optional[bool] = None,
        do_not_run_extensions_on_overprovisioned_v_ms: Optional[bool] = None,
        single_placement_group: Optional[bool] = None,
        zone_balance: Optional[bool] = None,
        platform_fault_domain_count: Optional[int] = None,
        proximity_placement_group: Optional["_models.SubResource"] = None,
        host_group: Optional["_models.SubResource"] = None,
        additional_capabilities: Optional["_models.AdditionalCapabilities"] = None,
        scale_in_policy: Optional["_models.ScaleInPolicy"] = None,
        orchestration_mode: Optional[Union[str, "_models.OrchestrationMode"]] = None,
        spot_restore_policy: Optional["_models.SpotRestorePolicy"] = None,
        priority_mix_policy: Optional["_models.PriorityMixPolicy"] = None,
        constrained_maximum_capacity: Optional[bool] = None,
        resiliency_policy: Optional["_models.ResiliencyPolicy"] = None,
        zonal_platform_fault_domain_align_mode: Optional[
            Union[str, "_models.ZonalPlatformFaultDomainAlignMode"]
        ] = None,
        sku_profile: Optional["_models.SkuProfile"] = None,
        high_speed_interconnect_placement: Optional[Union[str, "_models.HighSpeedInterconnectPlacement"]] = None,
        lifecycle_hooks_profile: Optional["_models.LifecycleHooksProfile"] = None,
        external_health_policy: Optional["_models.ExternalHealthPolicy"] = 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 VirtualMachineScaleSetPublicIPAddressConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.

    :ivar name: The publicIP address configuration name. Required.
    :vartype name: str
    :ivar properties: Describes a virtual machines scale set IP Configuration's PublicIPAddress
     configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
    :ivar sku: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
    :vartype sku: ~azure.mgmt.compute.models.PublicIPAddressSku
    :ivar tags: Resource tags applied to the publicIP address created by this
     PublicIPAddressConfiguration.
    :vartype tags: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publicIP address configuration name. Required."""
    properties: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration."""
    sku: Optional["_models.PublicIPAddressSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration."""

    __flattened_items = [
        "idle_timeout_in_minutes",
        "dns_settings",
        "ip_tags",
        "public_ip_prefix",
        "public_ip_address_version",
        "delete_option",
    ]

    @overload
    def __init__(
        self,
        *,
        name: str,
        properties: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties"] = None,
        sku: Optional["_models.PublicIPAddressSku"] = None,
        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:
        _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 VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale sets network configuration's DNS settings.

    :ivar domain_name_label: The Domain name label.The concatenation of the domain name label and
     vm index will be the domain name labels of the PublicIPAddress resources that will be created.
     Required.
    :vartype domain_name_label: str
    :ivar domain_name_label_scope: The Domain name label scope.The concatenation of the hashed
     domain name label that generated according to the policy from domain name label scope and vm
     index will be the domain name labels of the PublicIPAddress resources that will be created.
     Known values are: "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse".
    :vartype domain_name_label_scope: str or ~azure.mgmt.compute.models.DomainNameLabelScopeTypes
    """

    domain_name_label: str = rest_field(
        name="domainNameLabel", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Domain name label.The concatenation of the domain name label and vm index will be the
     domain name labels of the PublicIPAddress resources that will be created. Required."""
    domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = rest_field(
        name="domainNameLabelScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Domain name label scope.The concatenation of the hashed domain name label that generated
     according to the policy from domain name label scope and vm index will be the domain name
     labels of the PublicIPAddress resources that will be created. Known values are:
     \"TenantReuse\", \"SubscriptionReuse\", \"ResourceGroupReuse\", and \"NoReuse\"."""

    @overload
    def __init__(
        self,
        *,
        domain_name_label: str,
        domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = 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 VirtualMachineScaleSetPublicIPAddressConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.

    :ivar idle_timeout_in_minutes: The idle timeout of the public IP address.
    :vartype idle_timeout_in_minutes: int
    :ivar dns_settings: The dns settings to be applied on the publicIP addresses .
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
    :ivar ip_tags: The list of IP tags associated with the public IP address.
    :vartype ip_tags: list[~azure.mgmt.compute.models.VirtualMachineScaleSetIpTag]
    :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses.
    :vartype public_ip_prefix: ~azure.mgmt.compute.models.SubResource
    :ivar public_ip_address_version: Available from Api-Version 2019-07-01 onwards, it represents
     whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values
     are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6".
    :vartype public_ip_address_version: str or ~azure.mgmt.compute.models.IPVersion
    :ivar delete_option: Specify what happens to the public IP when the VM is deleted. Known values
     are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    """

    idle_timeout_in_minutes: Optional[int] = rest_field(
        name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The idle timeout of the public IP address."""
    dns_settings: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the publicIP addresses ."""
    ip_tags: Optional[list["_models.VirtualMachineScaleSetIpTag"]] = rest_field(
        name="ipTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of IP tags associated with the public IP address."""
    public_ip_prefix: Optional["_models.SubResource"] = rest_field(
        name="publicIPPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """The PublicIPPrefix from which to allocate publicIP addresses."""
    public_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field(
        name="publicIPAddressVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Available from Api-Version 2019-07-01 onwards, it represents whether the specific
     ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and
     'IPv6'. Known values are: \"IPv4\" and \"IPv6\"."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the public IP when the VM is deleted. Known values are: \"Delete\" and
     \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        idle_timeout_in_minutes: Optional[int] = None,
        dns_settings: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings"] = None,
        ip_tags: Optional[list["_models.VirtualMachineScaleSetIpTag"]] = None,
        public_ip_prefix: Optional["_models.SubResource"] = None,
        public_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = 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 VirtualMachineScaleSetVMReimageParameters(VirtualMachineReimageParameters):  # pylint: disable=name-too-long
    """Describes a Virtual Machine Scale Set VM Reimage Parameters.

    :ivar temp_disk: Specifies whether to reimage temp disk. Default value: false. Note: This temp
     disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
    :vartype temp_disk: bool
    :ivar exact_version: Specifies in decimal number, the version the OS disk should be reimaged
     to. If exact version is not provided, the OS disk is reimaged to the existing version of OS
     Disk.
    :vartype exact_version: str
    :ivar os_profile: Specifies information required for reimaging the non-ephemeral OS disk.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfileProvisioningData
    :ivar force_update_os_disk_for_ephemeral: Parameter to force update ephemeral OS disk for a
     virtual machine scale set VM.
    :vartype force_update_os_disk_for_ephemeral: bool
    """

    force_update_os_disk_for_ephemeral: Optional[bool] = rest_field(
        name="forceUpdateOSDiskForEphemeral", visibility=["read", "create", "update", "delete", "query"]
    )
    """Parameter to force update ephemeral OS disk for a virtual machine scale set VM."""

    @overload
    def __init__(
        self,
        *,
        temp_disk: Optional[bool] = None,
        exact_version: Optional[str] = None,
        os_profile: Optional["_models.OSProfileProvisioningData"] = None,
        force_update_os_disk_for_ephemeral: 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 VirtualMachineScaleSetReimageParameters(VirtualMachineScaleSetVMReimageParameters):
    """Describes a Virtual Machine Scale Set VM Reimage Parameters.

    :ivar temp_disk: Specifies whether to reimage temp disk. Default value: false. Note: This temp
     disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
    :vartype temp_disk: bool
    :ivar exact_version: Specifies in decimal number, the version the OS disk should be reimaged
     to. If exact version is not provided, the OS disk is reimaged to the existing version of OS
     Disk.
    :vartype exact_version: str
    :ivar os_profile: Specifies information required for reimaging the non-ephemeral OS disk.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfileProvisioningData
    :ivar force_update_os_disk_for_ephemeral: Parameter to force update ephemeral OS disk for a
     virtual machine scale set VM.
    :vartype force_update_os_disk_for_ephemeral: bool
    :ivar instance_ids: The virtual machine scale set instance ids. Omitting the virtual machine
     scale set instance ids will result in the operation being performed on all virtual machines in
     the virtual machine scale set.
    :vartype instance_ids: list[str]
    """

    instance_ids: Optional[list[str]] = rest_field(
        name="instanceIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids
     will result in the operation being performed on all virtual machines in the virtual machine
     scale set."""

    @overload
    def __init__(
        self,
        *,
        temp_disk: Optional[bool] = None,
        exact_version: Optional[str] = None,
        os_profile: Optional["_models.OSProfileProvisioningData"] = None,
        force_update_os_disk_for_ephemeral: Optional[bool] = None,
        instance_ids: 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 VirtualMachineScaleSetSku(_Model):
    """Describes an available virtual machine scale set sku.

    :ivar resource_type: The type of resource the sku applies to.
    :vartype resource_type: str
    :ivar sku: The Sku.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar capacity: Specifies the number of virtual machines in the scale set.
    :vartype capacity: ~azure.mgmt.compute.models.VirtualMachineScaleSetSkuCapacity
    """

    resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"])
    """The type of resource the sku applies to."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read"])
    """The Sku."""
    capacity: Optional["_models.VirtualMachineScaleSetSkuCapacity"] = rest_field(visibility=["read"])
    """Specifies the number of virtual machines in the scale set."""


class VirtualMachineScaleSetSkuCapacity(_Model):
    """Describes scaling information of a sku.

    :ivar minimum: The minimum capacity.
    :vartype minimum: int
    :ivar maximum: The maximum capacity that can be set.
    :vartype maximum: int
    :ivar default_capacity: The default capacity.
    :vartype default_capacity: int
    :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic" and
     "None".
    :vartype scale_type: str or ~azure.mgmt.compute.models.VirtualMachineScaleSetSkuScaleType
    """

    minimum: Optional[int] = rest_field(visibility=["read"])
    """The minimum capacity."""
    maximum: Optional[int] = rest_field(visibility=["read"])
    """The maximum capacity that can be set."""
    default_capacity: Optional[int] = rest_field(name="defaultCapacity", visibility=["read"])
    """The default capacity."""
    scale_type: Optional[Union[str, "_models.VirtualMachineScaleSetSkuScaleType"]] = rest_field(
        name="scaleType", visibility=["read"]
    )
    """The scale type applicable to the sku. Known values are: \"Automatic\" and \"None\"."""


class VirtualMachineScaleSetStorageProfile(_Model):
    """Describes a virtual machine scale set storage profile.

    :ivar image_reference: Specifies information about the image to use. You can specify
     information about platform images, marketplace images, or virtual machine images. This element
     is required when you want to use a platform image, marketplace image, or virtual machine image,
     but is not used in other creation operations.
    :vartype image_reference: ~azure.mgmt.compute.models.ImageReference
    :ivar os_disk: Specifies information about the operating system disk used by the virtual
     machines in the scale set. For more information about disks, see `About disks and VHDs for
     Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype os_disk: ~azure.mgmt.compute.models.VirtualMachineScaleSetOSDisk
    :ivar data_disks: Specifies the parameters that are used to add data disks to the virtual
     machines in the scale set. For more information about disks, see `About disks and VHDs for
     Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_.
    :vartype data_disks: list[~azure.mgmt.compute.models.VirtualMachineScaleSetDataDisk]
    :ivar disk_controller_type: Specifies the disk controller type configured for the virtual
     machines in the scale set. Minimum api-version: 2022-08-01. Known values are: "SCSI" and
     "NVMe".
    :vartype disk_controller_type: str or ~azure.mgmt.compute.models.DiskControllerTypes
    """

    image_reference: Optional["_models.ImageReference"] = rest_field(
        name="imageReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the image to use. You can specify information about platform
     images, marketplace images, or virtual machine images. This element is required when you want
     to use a platform image, marketplace image, or virtual machine image, but is not used in other
     creation operations."""
    os_disk: Optional["_models.VirtualMachineScaleSetOSDisk"] = rest_field(
        name="osDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the operating system disk used by the virtual machines in the scale
     set. For more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    data_disks: Optional[list["_models.VirtualMachineScaleSetDataDisk"]] = rest_field(
        name="dataDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the parameters that are used to add data disks to the virtual machines in the scale
     set. For more information about disks, see `About disks and VHDs for Azure virtual machines
     <https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview>`_."""
    disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field(
        name="diskControllerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the disk controller type configured for the virtual machines in the scale set.
     Minimum api-version: 2022-08-01. Known values are: \"SCSI\" and \"NVMe\"."""

    @overload
    def __init__(
        self,
        *,
        image_reference: Optional["_models.ImageReference"] = None,
        os_disk: Optional["_models.VirtualMachineScaleSetOSDisk"] = None,
        data_disks: Optional[list["_models.VirtualMachineScaleSetDataDisk"]] = None,
        disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = 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 VirtualMachineScaleSetUpdate(UpdateResource):
    """Describes a Virtual Machine Scale Set.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar sku: The virtual machine scale set sku.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar plan: The purchase plan when deploying a virtual machine scale set from VM Marketplace
     images.
    :vartype plan: ~azure.mgmt.compute.models.Plan
    :ivar properties: Describes the properties of a Virtual Machine Scale Set.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateProperties
    :ivar identity: The identity of the virtual machine scale set, if configured.
    :vartype identity: ~azure.mgmt.compute.models.VirtualMachineScaleSetIdentity
    :ivar zones: The virtual machine scale set zones.
    :vartype zones: list[str]
    :ivar placement: User-defined constraints for virtual machine scale set hardware placement.
    :vartype placement: ~azure.mgmt.compute.models.Placement
    """

    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine scale set sku."""
    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The purchase plan when deploying a virtual machine scale set from VM Marketplace images."""
    properties: Optional["_models.VirtualMachineScaleSetUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Scale Set."""
    identity: Optional["_models.VirtualMachineScaleSetIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the virtual machine scale set, if configured."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine scale set zones."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """User-defined constraints for virtual machine scale set hardware placement."""

    __flattened_items = [
        "upgrade_policy",
        "automatic_repairs_policy",
        "virtual_machine_profile",
        "overprovision",
        "do_not_run_extensions_on_overprovisioned_v_ms",
        "single_placement_group",
        "additional_capabilities",
        "scale_in_policy",
        "proximity_placement_group",
        "priority_mix_policy",
        "spot_restore_policy",
        "resiliency_policy",
        "zonal_platform_fault_domain_align_mode",
        "sku_profile",
        "lifecycle_hooks_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        sku: Optional["_models.Sku"] = None,
        plan: Optional["_models.Plan"] = None,
        properties: Optional["_models.VirtualMachineScaleSetUpdateProperties"] = None,
        identity: Optional["_models.VirtualMachineScaleSetIdentity"] = None,
        zones: Optional[list[str]] = None,
        placement: Optional["_models.Placement"] = 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 VirtualMachineScaleSetUpdateIPConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a
    scale set may be modified as long as the original subnet and the new subnet are in the same
    virtual network.

    :ivar name: The IP configuration name.
    :vartype name: str
    :ivar properties: Describes a virtual machine scale set network profile's IP configuration
     properties.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateIPConfigurationProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IP configuration name."""
    properties: Optional["_models.VirtualMachineScaleSetUpdateIPConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine scale set network profile's IP configuration properties."""

    __flattened_items = [
        "subnet",
        "primary",
        "public_ip_address_configuration",
        "private_ip_address_version",
        "application_gateway_backend_address_pools",
        "application_security_groups",
        "load_balancer_backend_address_pools",
        "load_balancer_inbound_nat_pools",
    ]

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        properties: Optional["_models.VirtualMachineScaleSetUpdateIPConfigurationProperties"] = 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 VirtualMachineScaleSetUpdateIPConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's IP configuration properties.

    :ivar subnet: The subnet.
    :vartype subnet: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar primary: Specifies the primary IP Configuration in case the network interface has more
     than one IP Configuration.
    :vartype primary: bool
    :ivar public_ip_address_configuration: The publicIPAddressConfiguration.
    :vartype public_ip_address_configuration:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
    :ivar private_ip_address_version: Available from Api-Version 2017-03-30 onwards, it represents
     whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible
     values are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6".
    :vartype private_ip_address_version: str or ~azure.mgmt.compute.models.IPVersion
    :ivar application_gateway_backend_address_pools: The application gateway backend address pools.
    :vartype application_gateway_backend_address_pools:
     list[~azure.mgmt.compute.models.SubResource]
    :ivar application_security_groups: Specifies an array of references to application security
     group.
    :vartype application_security_groups: list[~azure.mgmt.compute.models.SubResource]
    :ivar load_balancer_backend_address_pools: The load balancer backend address pools.
    :vartype load_balancer_backend_address_pools: list[~azure.mgmt.compute.models.SubResource]
    :ivar load_balancer_inbound_nat_pools: The load balancer inbound nat pools.
    :vartype load_balancer_inbound_nat_pools: list[~azure.mgmt.compute.models.SubResource]
    """

    subnet: Optional["_models.ApiEntityReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The subnet."""
    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the primary IP Configuration in case the network interface has more than one IP
     Configuration."""
    public_ip_address_configuration: Optional["_models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration"] = (
        rest_field(name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"])
    )
    """The publicIPAddressConfiguration."""
    private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field(
        name="privateIPAddressVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Available from Api-Version 2017-03-30 onwards, it represents whether the specific
     ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and
     'IPv6'. Known values are: \"IPv4\" and \"IPv6\"."""
    application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationGatewayBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """The application gateway backend address pools."""
    application_security_groups: Optional[list["_models.SubResource"]] = rest_field(
        name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies an array of references to application security group."""
    load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="loadBalancerBackendAddressPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """The load balancer backend address pools."""
    load_balancer_inbound_nat_pools: Optional[list["_models.SubResource"]] = rest_field(
        name="loadBalancerInboundNatPools", visibility=["read", "create", "update", "delete", "query"]
    )
    """The load balancer inbound nat pools."""

    @overload
    def __init__(
        self,
        *,
        subnet: Optional["_models.ApiEntityReference"] = None,
        primary: Optional[bool] = None,
        public_ip_address_configuration: Optional[
            "_models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration"
        ] = None,
        private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = None,
        application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = None,
        application_security_groups: Optional[list["_models.SubResource"]] = None,
        load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = None,
        load_balancer_inbound_nat_pools: Optional[list["_models.SubResource"]] = 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 VirtualMachineScaleSetUpdateNetworkConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile's network configurations.

    :ivar name: The network configuration name.
    :vartype name: str
    :ivar properties: Describes a virtual machine scale set updatable network profile's IP
     configuration.Use this object for updating network profile's IP Configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
    :ivar tags: Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration.
    :vartype tags: dict[str, str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The network configuration name."""
    properties: Optional["_models.VirtualMachineScaleSetUpdateNetworkConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machine scale set updatable network profile's IP configuration.Use this
     object for updating network profile's IP Configuration."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the networkInterface address created by this
     NetworkInterfaceConfiguration."""

    __flattened_items = [
        "primary",
        "enable_accelerated_networking",
        "disable_tcp_state_tracking",
        "enable_fpga",
        "network_security_group",
        "dns_settings",
        "ip_configurations",
        "enable_ip_forwarding",
        "delete_option",
        "auxiliary_mode",
        "auxiliary_sku",
    ]

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        properties: Optional["_models.VirtualMachineScaleSetUpdateNetworkConfigurationProperties"] = None,
        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:
        _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 VirtualMachineScaleSetUpdateNetworkConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set updatable network profile's IP configuration.Use this
    object for updating network profile's IP Configuration.

    :ivar primary: Whether this is a primary NIC on a virtual machine.
    :vartype primary: bool
    :ivar enable_accelerated_networking: Specifies whether the network interface is accelerated
     networking-enabled.
    :vartype enable_accelerated_networking: bool
    :ivar disable_tcp_state_tracking: Specifies whether the network interface is disabled for tcp
     state tracking.
    :vartype disable_tcp_state_tracking: bool
    :ivar enable_fpga: Specifies whether the network interface is FPGA networking-enabled.
    :vartype enable_fpga: bool
    :ivar network_security_group: The network security group.
    :vartype network_security_group: ~azure.mgmt.compute.models.SubResource
    :ivar dns_settings: The dns settings to be applied on the network interfaces.
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings
    :ivar ip_configurations: The virtual machine scale set IP Configuration.
    :vartype ip_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateIPConfiguration]
    :ivar enable_ip_forwarding: Whether IP forwarding enabled on this NIC.
    :vartype enable_ip_forwarding: bool
    :ivar delete_option: Specify what happens to the network interface when the VM is deleted.
     Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    :ivar auxiliary_mode: Specifies whether the Auxiliary mode is enabled for the Network Interface
     resource. Known values are: "None", "AcceleratedConnections", and "Floating".
    :vartype auxiliary_mode: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliaryMode
    :ivar auxiliary_sku: Specifies whether the Auxiliary sku is enabled for the Network Interface
     resource. Known values are: "None", "A1", "A2", "A4", and "A8".
    :vartype auxiliary_sku: str or ~azure.mgmt.compute.models.NetworkInterfaceAuxiliarySku
    """

    primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether this is a primary NIC on a virtual machine."""
    enable_accelerated_networking: Optional[bool] = rest_field(
        name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is accelerated networking-enabled."""
    disable_tcp_state_tracking: Optional[bool] = rest_field(
        name="disableTcpStateTracking", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is disabled for tcp state tracking."""
    enable_fpga: Optional[bool] = rest_field(
        name="enableFpga", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the network interface is FPGA networking-enabled."""
    network_security_group: Optional["_models.SubResource"] = rest_field(
        name="networkSecurityGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """The network security group."""
    dns_settings: Optional["_models.VirtualMachineScaleSetNetworkConfigurationDnsSettings"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the network interfaces."""
    ip_configurations: Optional[list["_models.VirtualMachineScaleSetUpdateIPConfiguration"]] = rest_field(
        name="ipConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set IP Configuration."""
    enable_ip_forwarding: Optional[bool] = rest_field(
        name="enableIPForwarding", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether IP forwarding enabled on this NIC."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the network interface when the VM is deleted. Known values are:
     \"Delete\" and \"Detach\"."""
    auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field(
        name="auxiliaryMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known
     values are: \"None\", \"AcceleratedConnections\", and \"Floating\"."""
    auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field(
        name="auxiliarySku", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values
     are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\"."""

    @overload
    def __init__(
        self,
        *,
        primary: Optional[bool] = None,
        enable_accelerated_networking: Optional[bool] = None,
        disable_tcp_state_tracking: Optional[bool] = None,
        enable_fpga: Optional[bool] = None,
        network_security_group: Optional["_models.SubResource"] = None,
        dns_settings: Optional["_models.VirtualMachineScaleSetNetworkConfigurationDnsSettings"] = None,
        ip_configurations: Optional[list["_models.VirtualMachineScaleSetUpdateIPConfiguration"]] = None,
        enable_ip_forwarding: Optional[bool] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None,
        auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = None,
        auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = 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 VirtualMachineScaleSetUpdateNetworkProfile(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set network profile.

    :ivar health_probe: A reference to a load balancer probe used to determine the health of an
     instance in the virtual machine scale set. The reference will be in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
    :vartype health_probe: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar network_interface_configurations: The list of network configurations.
    :vartype network_interface_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateNetworkConfiguration]
    :ivar network_api_version: specifies the Microsoft.Network API version used when creating
     networking resources in the Network Interface Configurations for Virtual Machine Scale Set with
     orchestration mode 'Flexible'. Known values are: "2020-11-01" and "2022-11-01".
    :vartype network_api_version: str or ~azure.mgmt.compute.models.NetworkApiVersion
    :ivar interconnect_group_profile: Specifies the interconnect group profile to associate with
     the scale set. Minimum api-version: 2026-03-01.
    :vartype interconnect_group_profile: ~azure.mgmt.compute.models.InterconnectGroupProfile
    """

    health_probe: Optional["_models.ApiEntityReference"] = rest_field(
        name="healthProbe", visibility=["read", "create", "update", "delete", "query"]
    )
    """A reference to a load balancer probe used to determine the health of an instance in the virtual
     machine scale set. The reference will be in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'."""
    network_interface_configurations: Optional[list["_models.VirtualMachineScaleSetUpdateNetworkConfiguration"]] = (
        rest_field(name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"])
    )
    """The list of network configurations."""
    network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field(
        name="networkApiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """specifies the Microsoft.Network API version used when creating networking resources in the
     Network Interface Configurations for Virtual Machine Scale Set with orchestration mode
     'Flexible'. Known values are: \"2020-11-01\" and \"2022-11-01\"."""
    interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = rest_field(
        name="interconnectGroupProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the interconnect group profile to associate with the scale set. Minimum api-version:
     2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        health_probe: Optional["_models.ApiEntityReference"] = None,
        network_interface_configurations: Optional[
            list["_models.VirtualMachineScaleSetUpdateNetworkConfiguration"]
        ] = None,
        network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = None,
        interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = 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 VirtualMachineScaleSetUpdateOSDisk(_Model):
    """Describes virtual machine scale set operating system disk Update Object. This should be used
    for Updating VMSS OS Disk.

    :ivar caching: The caching type. Known values are: "None", "ReadOnly", and "ReadWrite".
    :vartype caching: str or ~azure.mgmt.compute.models.CachingTypes
    :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or
     disabled on the disk.
    :vartype write_accelerator_enabled: bool
    :ivar diff_disk_settings: Specifies the ephemeral disk Settings for the operating system disk
     used by the virtual machine scale set.
    :vartype diff_disk_settings: ~azure.mgmt.compute.models.DiffDiskSettings
    :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be
     used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the
     number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
    :vartype disk_size_gb: int
    :ivar storage_fault_domain_alignment: Specifies the storage fault domain alignment type for the
     disk. Known values are: "Aligned" and "BestEffortAligned".
    :vartype storage_fault_domain_alignment: str or
     ~azure.mgmt.compute.models.StorageFaultDomainAlignmentType
    :ivar image: The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before
     using it to attach to the Virtual Machine. If SourceImage is provided, the destination
     VirtualHardDisk should not exist.
    :vartype image: ~azure.mgmt.compute.models.VirtualHardDisk
    :ivar vhd_containers: The list of virtual hard disk container uris.
    :vartype vhd_containers: list[str]
    :ivar managed_disk: The managed disk parameters.
    :vartype managed_disk: ~azure.mgmt.compute.models.VirtualMachineScaleSetManagedDiskParameters
    :ivar delete_option: Specifies whether OS Disk should be deleted or detached upon VMSS Flex
     deletion (This feature is available for VMSS with Flexible OrchestrationMode only). <br><br>
     Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VMSS
     Flex VM is deleted.<br><br> **Detach** If this value is used, the OS disk is retained after
     VMSS Flex VM is deleted. <br><br> The default value is set to **Delete**. For an Ephemeral OS
     Disk, the default value is set to **Delete**. User cannot change the delete option for
     Ephemeral OS Disk. Known values are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DiskDeleteOptionTypes
    """

    caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The caching type. Known values are: \"None\", \"ReadOnly\", and \"ReadWrite\"."""
    write_accelerator_enabled: Optional[bool] = rest_field(
        name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether writeAccelerator should be enabled or disabled on the disk."""
    diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field(
        name="diffDiskSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine
     scale set."""
    disk_size_gb: Optional[int] = rest_field(
        name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite
     the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x
     1024^3 for the disk and the value cannot be larger than 1023."""
    storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = rest_field(
        name="storageFaultDomainAlignment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage fault domain alignment type for the disk. Known values are: \"Aligned\"
     and \"BestEffortAligned\"."""
    image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to
     attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk
     should not exist."""
    vhd_containers: Optional[list[str]] = rest_field(
        name="vhdContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of virtual hard disk container uris."""
    managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field(
        name="managedDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed disk parameters."""
    delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature
     is available for VMSS with Flexible OrchestrationMode only). <br><br> Possible values: <br><br>
     **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.<br><br>
     **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
     <br><br> The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is
     set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. Known values
     are: \"Delete\" and \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        caching: Optional[Union[str, "_models.CachingTypes"]] = None,
        write_accelerator_enabled: Optional[bool] = None,
        diff_disk_settings: Optional["_models.DiffDiskSettings"] = None,
        disk_size_gb: Optional[int] = None,
        storage_fault_domain_alignment: Optional[Union[str, "_models.StorageFaultDomainAlignmentType"]] = None,
        image: Optional["_models.VirtualHardDisk"] = None,
        vhd_containers: Optional[list[str]] = None,
        managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = None,
        delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = 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 VirtualMachineScaleSetUpdateOSProfile(_Model):
    """Describes a virtual machine scale set OS profile.

    :ivar custom_data: A base-64 encoded string of custom data.
    :vartype custom_data: str
    :ivar windows_configuration: The Windows Configuration of the OS profile.
    :vartype windows_configuration: ~azure.mgmt.compute.models.WindowsConfiguration
    :ivar linux_configuration: The Linux Configuration of the OS profile.
    :vartype linux_configuration: ~azure.mgmt.compute.models.LinuxConfiguration
    :ivar secrets: The List of certificates for addition to the VM.
    :vartype secrets: list[~azure.mgmt.compute.models.VaultSecretGroup]
    """

    custom_data: Optional[str] = rest_field(
        name="customData", visibility=["read", "create", "update", "delete", "query"]
    )
    """A base-64 encoded string of custom data."""
    windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field(
        name="windowsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Windows Configuration of the OS profile."""
    linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field(
        name="linuxConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Linux Configuration of the OS profile."""
    secrets: Optional[list["_models.VaultSecretGroup"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The List of certificates for addition to the VM."""

    @overload
    def __init__(
        self,
        *,
        custom_data: Optional[str] = None,
        windows_configuration: Optional["_models.WindowsConfiguration"] = None,
        linux_configuration: Optional["_models.LinuxConfiguration"] = None,
        secrets: Optional[list["_models.VaultSecretGroup"]] = 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 VirtualMachineScaleSetUpdateProperties(_Model):
    """Describes the properties of a Virtual Machine Scale Set.

    :ivar upgrade_policy: The upgrade policy.
    :vartype upgrade_policy: ~azure.mgmt.compute.models.UpgradePolicy
    :ivar automatic_repairs_policy: Policy for automatic repairs.
    :vartype automatic_repairs_policy: ~azure.mgmt.compute.models.AutomaticRepairsPolicy
    :ivar virtual_machine_profile: The virtual machine profile.
    :vartype virtual_machine_profile:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateVMProfile
    :ivar overprovision: Specifies whether the Virtual Machine Scale Set should be overprovisioned.
    :vartype overprovision: bool
    :ivar do_not_run_extensions_on_overprovisioned_v_ms: When Overprovision is enabled, extensions
     are launched only on the requested number of VMs which are finally kept. This property will
     hence ensure that the extensions do not run on the extra overprovisioned VMs.
    :vartype do_not_run_extensions_on_overprovisioned_v_ms: bool
    :ivar single_placement_group: When true this limits the scale set to a single placement group,
     of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to
     false. However, if singlePlacementGroup is false, it may not be modified to true.
    :vartype single_placement_group: bool
    :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the
     Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines
     have the capability to support attaching managed data disks with UltraSSD_LRS storage account
     type.
    :vartype additional_capabilities: ~azure.mgmt.compute.models.AdditionalCapabilities
    :ivar scale_in_policy: Specifies the policies applied when scaling in Virtual Machines in the
     Virtual Machine Scale Set.
    :vartype scale_in_policy: ~azure.mgmt.compute.models.ScaleInPolicy
    :ivar proximity_placement_group: Specifies information about the proximity placement group that
     the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
    :vartype proximity_placement_group: ~azure.mgmt.compute.models.SubResource
    :ivar priority_mix_policy: Specifies the desired targets for mixing Spot and Regular priority
     VMs within the same VMSS Flex instance.
    :vartype priority_mix_policy: ~azure.mgmt.compute.models.PriorityMixPolicy
    :ivar spot_restore_policy: Specifies the Spot Restore properties for the virtual machine scale
     set.
    :vartype spot_restore_policy: ~azure.mgmt.compute.models.SpotRestorePolicy
    :ivar resiliency_policy: Policy for Resiliency.
    :vartype resiliency_policy: ~azure.mgmt.compute.models.ResiliencyPolicy
    :ivar zonal_platform_fault_domain_align_mode: Specifies the align mode between Virtual Machine
     Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and
     "BestEffortAligned".
    :vartype zonal_platform_fault_domain_align_mode: str or
     ~azure.mgmt.compute.models.ZonalPlatformFaultDomainAlignMode
    :ivar sku_profile: Specifies the sku profile for the virtual machine scale set.
    :vartype sku_profile: ~azure.mgmt.compute.models.SkuProfile
    :ivar lifecycle_hooks_profile: Specifies the lifecycle hooks profile for the virtual machine
     scale set.
    :vartype lifecycle_hooks_profile: ~azure.mgmt.compute.models.LifecycleHooksProfile
    """

    upgrade_policy: Optional["_models.UpgradePolicy"] = rest_field(
        name="upgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The upgrade policy."""
    automatic_repairs_policy: Optional["_models.AutomaticRepairsPolicy"] = rest_field(
        name="automaticRepairsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for automatic repairs."""
    virtual_machine_profile: Optional["_models.VirtualMachineScaleSetUpdateVMProfile"] = rest_field(
        name="virtualMachineProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine profile."""
    overprovision: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether the Virtual Machine Scale Set should be overprovisioned."""
    do_not_run_extensions_on_overprovisioned_v_ms: Optional[bool] = rest_field(
        name="doNotRunExtensionsOnOverprovisionedVMs", visibility=["read", "create", "update", "delete", "query"]
    )
    """When Overprovision is enabled, extensions are launched only on the requested number of VMs
     which are finally kept. This property will hence ensure that the extensions do not run on the
     extra overprovisioned VMs."""
    single_placement_group: Optional[bool] = rest_field(
        name="singlePlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """When true this limits the scale set to a single placement group, of max size 100 virtual
     machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if
     singlePlacementGroup is false, it may not be modified to true."""
    additional_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field(
        name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual
     Machine Scale Set. For instance: whether the Virtual Machines have the capability to support
     attaching managed data disks with UltraSSD_LRS storage account type."""
    scale_in_policy: Optional["_models.ScaleInPolicy"] = rest_field(
        name="scaleInPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale
     Set."""
    proximity_placement_group: Optional["_models.SubResource"] = rest_field(
        name="proximityPlacementGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the proximity placement group that the virtual machine scale set
     should be assigned to. <br><br>Minimum api-version: 2018-04-01."""
    priority_mix_policy: Optional["_models.PriorityMixPolicy"] = rest_field(
        name="priorityMixPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS
     Flex instance."""
    spot_restore_policy: Optional["_models.SpotRestorePolicy"] = rest_field(
        name="spotRestorePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Spot Restore properties for the virtual machine scale set."""
    resiliency_policy: Optional["_models.ResiliencyPolicy"] = rest_field(
        name="resiliencyPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Policy for Resiliency."""
    zonal_platform_fault_domain_align_mode: Optional[Union[str, "_models.ZonalPlatformFaultDomainAlignMode"]] = (
        rest_field(name="zonalPlatformFaultDomainAlignMode", visibility=["read", "create", "update", "delete", "query"])
    )
    """Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain
     count. Known values are: \"Aligned\", \"Unaligned\", and \"BestEffortAligned\"."""
    sku_profile: Optional["_models.SkuProfile"] = rest_field(
        name="skuProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the sku profile for the virtual machine scale set."""
    lifecycle_hooks_profile: Optional["_models.LifecycleHooksProfile"] = rest_field(
        name="lifecycleHooksProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the lifecycle hooks profile for the virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        upgrade_policy: Optional["_models.UpgradePolicy"] = None,
        automatic_repairs_policy: Optional["_models.AutomaticRepairsPolicy"] = None,
        virtual_machine_profile: Optional["_models.VirtualMachineScaleSetUpdateVMProfile"] = None,
        overprovision: Optional[bool] = None,
        do_not_run_extensions_on_overprovisioned_v_ms: Optional[bool] = None,
        single_placement_group: Optional[bool] = None,
        additional_capabilities: Optional["_models.AdditionalCapabilities"] = None,
        scale_in_policy: Optional["_models.ScaleInPolicy"] = None,
        proximity_placement_group: Optional["_models.SubResource"] = None,
        priority_mix_policy: Optional["_models.PriorityMixPolicy"] = None,
        spot_restore_policy: Optional["_models.SpotRestorePolicy"] = None,
        resiliency_policy: Optional["_models.ResiliencyPolicy"] = None,
        zonal_platform_fault_domain_align_mode: Optional[
            Union[str, "_models.ZonalPlatformFaultDomainAlignMode"]
        ] = None,
        sku_profile: Optional["_models.SkuProfile"] = None,
        lifecycle_hooks_profile: Optional["_models.LifecycleHooksProfile"] = 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 VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.

    :ivar name: The publicIP address configuration name.
    :vartype name: str
    :ivar properties: Describes a virtual machines scale set IP Configuration's PublicIPAddress
     configuration.
    :vartype properties:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
    :ivar tags: Resource tags applied to the publicIP address created by this
     PublicIPAddressConfiguration.
    :vartype tags: dict[str, str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publicIP address configuration name."""
    properties: Optional["_models.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration."""

    __flattened_items = ["idle_timeout_in_minutes", "dns_settings", "public_ip_prefix", "delete_option"]

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        properties: Optional["_models.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties"] = None,
        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:
        _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 VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.

    :ivar idle_timeout_in_minutes: The idle timeout of the public IP address.
    :vartype idle_timeout_in_minutes: int
    :ivar dns_settings: The dns settings to be applied on the publicIP addresses .
    :vartype dns_settings:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
    :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses.
    :vartype public_ip_prefix: ~azure.mgmt.compute.models.SubResource
    :ivar delete_option: Specify what happens to the public IP when the VM is deleted. Known values
     are: "Delete" and "Detach".
    :vartype delete_option: str or ~azure.mgmt.compute.models.DeleteOptions
    """

    idle_timeout_in_minutes: Optional[int] = rest_field(
        name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The idle timeout of the public IP address."""
    dns_settings: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings"] = rest_field(
        name="dnsSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dns settings to be applied on the publicIP addresses ."""
    public_ip_prefix: Optional["_models.SubResource"] = rest_field(
        name="publicIPPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """The PublicIPPrefix from which to allocate publicIP addresses."""
    delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(
        name="deleteOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify what happens to the public IP when the VM is deleted. Known values are: \"Delete\" and
     \"Detach\"."""

    @overload
    def __init__(
        self,
        *,
        idle_timeout_in_minutes: Optional[int] = None,
        dns_settings: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings"] = None,
        public_ip_prefix: Optional["_models.SubResource"] = None,
        delete_option: Optional[Union[str, "_models.DeleteOptions"]] = 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 VirtualMachineScaleSetUpdateStorageProfile(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set storage profile.

    :ivar image_reference: The image reference.
    :vartype image_reference: ~azure.mgmt.compute.models.ImageReference
    :ivar os_disk: The OS disk.
    :vartype os_disk: ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateOSDisk
    :ivar data_disks: The data disks.
    :vartype data_disks: list[~azure.mgmt.compute.models.VirtualMachineScaleSetDataDisk]
    :ivar disk_controller_type: Specifies the disk controller type configured for the virtual
     machines in the scale set. **Note:** You need to deallocate the virtual machines in the scale
     set before updating its disk controller type based on the upgrade mode configured for the scale
     set. Minimum api-version: 2022-08-01. Known values are: "SCSI" and "NVMe".
    :vartype disk_controller_type: str or ~azure.mgmt.compute.models.DiskControllerTypes
    """

    image_reference: Optional["_models.ImageReference"] = rest_field(
        name="imageReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """The image reference."""
    os_disk: Optional["_models.VirtualMachineScaleSetUpdateOSDisk"] = rest_field(
        name="osDisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The OS disk."""
    data_disks: Optional[list["_models.VirtualMachineScaleSetDataDisk"]] = rest_field(
        name="dataDisks", visibility=["read", "create", "update", "delete", "query"]
    )
    """The data disks."""
    disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field(
        name="diskControllerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the disk controller type configured for the virtual machines in the scale set.
     **Note:** You need to deallocate the virtual machines in the scale set before updating its disk
     controller type based on the upgrade mode configured for the scale set. Minimum api-version:
     2022-08-01. Known values are: \"SCSI\" and \"NVMe\"."""

    @overload
    def __init__(
        self,
        *,
        image_reference: Optional["_models.ImageReference"] = None,
        os_disk: Optional["_models.VirtualMachineScaleSetUpdateOSDisk"] = None,
        data_disks: Optional[list["_models.VirtualMachineScaleSetDataDisk"]] = None,
        disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = 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 VirtualMachineScaleSetUpdateVMProfile(_Model):
    """Describes a virtual machine scale set virtual machine profile.

    :ivar os_profile: The virtual machine scale set OS profile.
    :vartype os_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateOSProfile
    :ivar storage_profile: The virtual machine scale set storage profile.
    :vartype storage_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateStorageProfile
    :ivar network_profile: The virtual machine scale set network profile.
    :vartype network_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetUpdateNetworkProfile
    :ivar security_posture_reference: The virtual machine scale set security posture reference.
    :vartype security_posture_reference: ~azure.mgmt.compute.models.SecurityPostureReferenceUpdate
    :ivar security_profile: The virtual machine scale set Security profile.
    :vartype security_profile: ~azure.mgmt.compute.models.SecurityProfile
    :ivar diagnostics_profile: The virtual machine scale set diagnostics profile.
    :vartype diagnostics_profile: ~azure.mgmt.compute.models.DiagnosticsProfile
    :ivar extension_profile: The virtual machine scale set extension profile.
    :vartype extension_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetExtensionProfile
    :ivar license_type: The license type, which is for bring your own license scenario.
    :vartype license_type: str
    :ivar billing_profile: Specifies the billing related details of a Azure Spot VMSS. Minimum
     api-version: 2019-03-01.
    :vartype billing_profile: ~azure.mgmt.compute.models.BillingProfile
    :ivar scheduled_events_profile: Specifies Scheduled Event related configurations.
    :vartype scheduled_events_profile: ~azure.mgmt.compute.models.ScheduledEventsProfile
    :ivar user_data: UserData for the VM, which must be base-64 encoded. Customer should not pass
     any secrets in here. <br><br>Minimum api-version: 2021-03-01.
    :vartype user_data: str
    :ivar hardware_profile: Specifies the hardware profile related details of a scale set. Minimum
     api-version: 2021-11-01.
    :vartype hardware_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetHardwareProfile
    :ivar interconnect_block_profile: Specifies the Interconnect Block related details of a scale
     set. Minimum api-version: 2026-03-01.
    :vartype interconnect_block_profile: ~azure.mgmt.compute.models.InterconnectBlockProfile
    """

    os_profile: Optional["_models.VirtualMachineScaleSetUpdateOSProfile"] = rest_field(
        name="osProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set OS profile."""
    storage_profile: Optional["_models.VirtualMachineScaleSetUpdateStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set storage profile."""
    network_profile: Optional["_models.VirtualMachineScaleSetUpdateNetworkProfile"] = rest_field(
        name="networkProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set network profile."""
    security_posture_reference: Optional["_models.SecurityPostureReferenceUpdate"] = rest_field(
        name="securityPostureReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set security posture reference."""
    security_profile: Optional["_models.SecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set Security profile."""
    diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(
        name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set diagnostics profile."""
    extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = rest_field(
        name="extensionProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set extension profile."""
    license_type: Optional[str] = rest_field(
        name="licenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The license type, which is for bring your own license scenario."""
    billing_profile: Optional["_models.BillingProfile"] = rest_field(
        name="billingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01."""
    scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field(
        name="scheduledEventsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Scheduled Event related configurations."""
    user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"])
    """UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in
     here. <br><br>Minimum api-version: 2021-03-01."""
    hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = rest_field(
        name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01."""
    interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = rest_field(
        name="interconnectBlockProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Interconnect Block related details of a scale set. Minimum api-version:
     2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        os_profile: Optional["_models.VirtualMachineScaleSetUpdateOSProfile"] = None,
        storage_profile: Optional["_models.VirtualMachineScaleSetUpdateStorageProfile"] = None,
        network_profile: Optional["_models.VirtualMachineScaleSetUpdateNetworkProfile"] = None,
        security_posture_reference: Optional["_models.SecurityPostureReferenceUpdate"] = None,
        security_profile: Optional["_models.SecurityProfile"] = None,
        diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None,
        extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = None,
        license_type: Optional[str] = None,
        billing_profile: Optional["_models.BillingProfile"] = None,
        scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = None,
        user_data: Optional[str] = None,
        hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = None,
        interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = 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 VirtualMachineScaleSetVM(TrackedResource):
    """Describes a virtual machine scale set 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.compute.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: Describes the properties of a virtual machine scale set virtual machine.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineScaleSetVMProperties
    :ivar instance_id: The virtual machine instance ID.
    :vartype instance_id: str
    :ivar sku: The virtual machine SKU.
    :vartype sku: ~azure.mgmt.compute.models.Sku
    :ivar plan: Specifies information about the marketplace image used to create the virtual
     machine. This element is only used for marketplace images. Before you can use a marketplace
     image from an API, you must enable the image for programmatic use.  In the Azure portal, find
     the marketplace image that you want to use and then click **Want to deploy programmatically,
     Get Started ->**. Enter any required information and then click **Save**.
    :vartype plan: ~azure.mgmt.compute.models.Plan
    :ivar resources: The virtual machine child extension resources.
    :vartype resources: list[~azure.mgmt.compute.models.VirtualMachineExtension]
    :ivar zones: The virtual machine zones.
    :vartype zones: list[str]
    :ivar identity: The identity of the virtual machine, if configured.
    :vartype identity: ~azure.mgmt.compute.models.VirtualMachineIdentity
    :ivar etag: Etag is property returned in Update/Get response of the VMSS VM, so that customer
     can supply it in the header to ensure optimistic updates.
    :vartype etag: str
    """

    properties: Optional["_models.VirtualMachineScaleSetVMProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a virtual machine scale set virtual machine."""
    instance_id: Optional[str] = rest_field(name="instanceId", visibility=["read"])
    """The virtual machine instance ID."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read"])
    """The virtual machine SKU."""
    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the marketplace image used to create the virtual machine. This
     element is only used for marketplace images. Before you can use a marketplace image from an
     API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace
     image that you want to use and then click **Want to deploy programmatically, Get Started ->**.
     Enter any required information and then click **Save**."""
    resources: Optional[list["_models.VirtualMachineExtension"]] = rest_field(visibility=["read"])
    """The virtual machine child extension resources."""
    zones: Optional[list[str]] = rest_field(visibility=["read"])
    """The virtual machine zones."""
    identity: Optional["_models.VirtualMachineIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the virtual machine, if configured."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it
     in the header to ensure optimistic updates."""

    __flattened_items = [
        "latest_model_applied",
        "vm_id",
        "instance_view",
        "hardware_profile",
        "resilient_vm_deletion_status",
        "storage_profile",
        "additional_capabilities",
        "os_profile",
        "security_profile",
        "network_profile",
        "network_profile_configuration",
        "diagnostics_profile",
        "availability_set",
        "provisioning_state",
        "license_type",
        "model_definition_applied",
        "protection_policy",
        "user_data",
        "time_created",
        "virtual_machine_resource_id",
        "interconnect_block_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.VirtualMachineScaleSetVMProperties"] = None,
        plan: Optional["_models.Plan"] = None,
        identity: 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:
        _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 VirtualMachineScaleSetVMExtension(SubResourceReadOnly):
    """Describes a VMSS VM Extension.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar properties: Describes the properties of a Virtual Machine Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineExtensionProperties
    :ivar location: The location of the extension.
    :vartype location: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar name: Resource name.
    :vartype name: str
    """

    properties: Optional["_models.VirtualMachineExtensionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Extension."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The location of the extension."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    name: Optional[str] = rest_field(visibility=["read"])
    """Resource name."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "provisioning_state",
        "instance_view",
        "suppress_failures",
        "protected_settings_from_key_vault",
        "provision_after_extensions",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.VirtualMachineExtensionProperties"] = None,
        location: 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:
        _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 VirtualMachineScaleSetVMExtensionsListResult(_Model):  # pylint: disable=name-too-long
    """The List VMSS VM Extension operation response.

    :ivar value: The list of VMSS VM extensions.
    :vartype value: list[~azure.mgmt.compute.models.VirtualMachineScaleSetVMExtension]
    """

    value: Optional[list["_models.VirtualMachineScaleSetVMExtension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of VMSS VM extensions."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[list["_models.VirtualMachineScaleSetVMExtension"]] = 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 VirtualMachineScaleSetVMExtensionsSummary(_Model):  # pylint: disable=name-too-long
    """Extensions summary for virtual machines of a virtual machine scale set.

    :ivar name: The extension name.
    :vartype name: str
    :ivar statuses_summary: The extensions information.
    :vartype statuses_summary: list[~azure.mgmt.compute.models.VirtualMachineStatusCodeCount]
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The extension name."""
    statuses_summary: Optional[list["_models.VirtualMachineStatusCodeCount"]] = rest_field(
        name="statusesSummary", visibility=["read"]
    )
    """The extensions information."""


class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly):
    """Describes a VMSS VM Extension.

    :ivar id: Resource Id.
    :vartype id: str
    :ivar name: The name of the extension.
    :vartype name: str
    :ivar type: Resource type.
    :vartype type: str
    :ivar properties: Describes the properties of a Virtual Machine Extension.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineExtensionUpdateProperties
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the extension."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Resource type."""
    properties: Optional["_models.VirtualMachineExtensionUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine Extension."""

    __flattened_items = [
        "force_update_tag",
        "publisher",
        "type",
        "type_handler_version",
        "auto_upgrade_minor_version",
        "enable_automatic_upgrade",
        "settings",
        "protected_settings",
        "suppress_failures",
        "protected_settings_from_key_vault",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.VirtualMachineExtensionUpdateProperties"] = 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 VirtualMachineScaleSetVMInstanceIDs(_Model):
    """Specifies a list of virtual machine instance IDs from the VM scale set.

    :ivar instance_ids: The virtual machine scale set instance ids. Omitting the virtual machine
     scale set instance ids will result in the operation being performed on all virtual machines in
     the virtual machine scale set.
    :vartype instance_ids: list[str]
    """

    instance_ids: Optional[list[str]] = rest_field(
        name="instanceIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids
     will result in the operation being performed on all virtual machines in the virtual machine
     scale set."""

    @overload
    def __init__(
        self,
        *,
        instance_ids: 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 VirtualMachineScaleSetVMInstanceRequiredIDs(_Model):  # pylint: disable=name-too-long
    """Specifies a list of virtual machine instance IDs from the VM scale set.

    :ivar instance_ids: The virtual machine scale set instance ids. Required.
    :vartype instance_ids: list[str]
    """

    instance_ids: list[str] = rest_field(name="instanceIds", visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine scale set instance ids. Required."""

    @overload
    def __init__(
        self,
        *,
        instance_ids: list[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 VirtualMachineScaleSetVMInstanceView(_Model):
    """The instance view of a virtual machine scale set VM.

    :ivar platform_update_domain: The Update Domain count.
    :vartype platform_update_domain: int
    :ivar platform_fault_domain: The Fault Domain count.
    :vartype platform_fault_domain: int
    :ivar rdp_thumb_print: The Remote desktop certificate thumbprint.
    :vartype rdp_thumb_print: str
    :ivar vm_agent: The VM Agent running on the virtual machine.
    :vartype vm_agent: ~azure.mgmt.compute.models.VirtualMachineAgentInstanceView
    :ivar maintenance_redeploy_status: The Maintenance Operation status on the virtual machine.
    :vartype maintenance_redeploy_status: ~azure.mgmt.compute.models.MaintenanceRedeployStatus
    :ivar disks: The disks information.
    :vartype disks: list[~azure.mgmt.compute.models.DiskInstanceView]
    :ivar extensions: The extensions information.
    :vartype extensions: list[~azure.mgmt.compute.models.VirtualMachineExtensionInstanceView]
    :ivar vm_health: The health status for the VM.
    :vartype vm_health: ~azure.mgmt.compute.models.VirtualMachineHealthStatus
    :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view
     Console Output and Screenshot to diagnose VM status. You can easily view the output of your
     console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
    :vartype boot_diagnostics: ~azure.mgmt.compute.models.BootDiagnosticsInstanceView
    :ivar statuses: The resource status information.
    :vartype statuses: list[~azure.mgmt.compute.models.InstanceViewStatus]
    :ivar assigned_host: Resource id of the dedicated host, on which the virtual machine is
     allocated through automatic placement, when the virtual machine is associated with a dedicated
     host group that has automatic placement enabled. Minimum api-version: 2020-06-01.
    :vartype assigned_host: str
    :ivar placement_group_id: The placement group in which the VM is running. If the VM is
     deallocated it will not have a placementGroupId.
    :vartype placement_group_id: str
    :ivar computer_name: Specifies the host OS name of the virtual machine. <br><br> This name
     cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters
     <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and
     restrictions see `Azure infrastructure services implementation guidelines
     <https://learn.microsoft.com/previous-versions/azure/virtual-machines/linux/infrastructure-example?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json#1-naming-conventions>`_.
    :vartype computer_name: str
    :ivar os_name: The Operating System running on the hybrid machine.
    :vartype os_name: str
    :ivar os_version: The version of Operating System running on the hybrid machine.
    :vartype os_version: str
    :ivar hyper_v_generation: The hypervisor generation of the Virtual Machine [V1, V2]. Known
     values are: "V1" and "V2".
    :vartype hyper_v_generation: str or ~azure.mgmt.compute.models.HyperVGeneration
    :ivar interconnect_instance_view: The Interconnect runtime view of the Scale Set VM instance.
     Minimum api-version: 2026-03-01.
    :vartype interconnect_instance_view: ~azure.mgmt.compute.models.InterconnectInstanceView
    """

    platform_update_domain: Optional[int] = rest_field(
        name="platformUpdateDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Update Domain count."""
    platform_fault_domain: Optional[int] = rest_field(
        name="platformFaultDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Fault Domain count."""
    rdp_thumb_print: Optional[str] = rest_field(
        name="rdpThumbPrint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Remote desktop certificate thumbprint."""
    vm_agent: Optional["_models.VirtualMachineAgentInstanceView"] = rest_field(
        name="vmAgent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The VM Agent running on the virtual machine."""
    maintenance_redeploy_status: Optional["_models.MaintenanceRedeployStatus"] = rest_field(
        name="maintenanceRedeployStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Maintenance Operation status on the virtual machine."""
    disks: Optional[list["_models.DiskInstanceView"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The disks information."""
    extensions: Optional[list["_models.VirtualMachineExtensionInstanceView"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The extensions information."""
    vm_health: Optional["_models.VirtualMachineHealthStatus"] = rest_field(name="vmHealth", visibility=["read"])
    """The health status for the VM."""
    boot_diagnostics: Optional["_models.BootDiagnosticsInstanceView"] = rest_field(
        name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
     to diagnose VM status. You can easily view the output of your console log. Azure also enables
     you to see a screenshot of the VM from the hypervisor."""
    statuses: Optional[list["_models.InstanceViewStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource status information."""
    assigned_host: Optional[str] = rest_field(name="assignedHost", visibility=["read"])
    """Resource id of the dedicated host, on which the virtual machine is allocated through automatic
     placement, when the virtual machine is associated with a dedicated host group that has
     automatic placement enabled. Minimum api-version: 2020-06-01."""
    placement_group_id: Optional[str] = rest_field(
        name="placementGroupId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The placement group in which the VM is running. If the VM is deallocated it will not have a
     placementGroupId."""
    computer_name: Optional[str] = rest_field(
        name="computerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after
     the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length
     (Linux):** 64 characters. <br><br> For naming conventions and restrictions see `Azure
     infrastructure services implementation guidelines
     <https://learn.microsoft.com/previous-versions/azure/virtual-machines/linux/infrastructure-example?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json#1-naming-conventions>`_."""
    os_name: Optional[str] = rest_field(name="osName", visibility=["read", "create", "update", "delete", "query"])
    """The Operating System running on the hybrid machine."""
    os_version: Optional[str] = rest_field(name="osVersion", visibility=["read", "create", "update", "delete", "query"])
    """The version of Operating System running on the hybrid machine."""
    hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = rest_field(
        name="hyperVGeneration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hypervisor generation of the Virtual Machine [V1, V2]. Known values are: \"V1\" and \"V2\"."""
    interconnect_instance_view: Optional["_models.InterconnectInstanceView"] = rest_field(
        name="interconnectInstanceView", visibility=["read"]
    )
    """The Interconnect runtime view of the Scale Set VM instance. Minimum api-version: 2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        platform_update_domain: Optional[int] = None,
        platform_fault_domain: Optional[int] = None,
        rdp_thumb_print: Optional[str] = None,
        vm_agent: Optional["_models.VirtualMachineAgentInstanceView"] = None,
        maintenance_redeploy_status: Optional["_models.MaintenanceRedeployStatus"] = None,
        disks: Optional[list["_models.DiskInstanceView"]] = None,
        extensions: Optional[list["_models.VirtualMachineExtensionInstanceView"]] = None,
        boot_diagnostics: Optional["_models.BootDiagnosticsInstanceView"] = None,
        statuses: Optional[list["_models.InstanceViewStatus"]] = None,
        placement_group_id: Optional[str] = None,
        computer_name: Optional[str] = None,
        os_name: Optional[str] = None,
        os_version: Optional[str] = None,
        hyper_v_generation: Optional[Union[str, "_models.HyperVGeneration"]] = 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 VirtualMachineScaleSetVMNetworkProfileConfiguration(_Model):  # pylint: disable=name-too-long
    """Describes a virtual machine scale set VM network profile.

    :ivar network_interface_configurations: The list of network configurations.
    :vartype network_interface_configurations:
     list[~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkConfiguration]
    :ivar interconnect_group_profile: Specifies the interconnect group profile to associate with
     the scale set vm instance. Minimum api-version: 2026-03-01.
    :vartype interconnect_group_profile: ~azure.mgmt.compute.models.InterconnectGroupProfile
    """

    network_interface_configurations: Optional[list["_models.VirtualMachineScaleSetNetworkConfiguration"]] = rest_field(
        name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of network configurations."""
    interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = rest_field(
        name="interconnectGroupProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the interconnect group profile to associate with the scale set vm instance. Minimum
     api-version: 2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        network_interface_configurations: Optional[list["_models.VirtualMachineScaleSetNetworkConfiguration"]] = None,
        interconnect_group_profile: Optional["_models.InterconnectGroupProfile"] = 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 VirtualMachineScaleSetVMProfile(_Model):
    """Describes a virtual machine scale set virtual machine profile.

    :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale
     set.
    :vartype os_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetOSProfile
    :ivar storage_profile: Specifies the storage settings for the virtual machine disks.
    :vartype storage_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetStorageProfile
    :ivar network_profile: Specifies properties of the network interfaces of the virtual machines
     in the scale set.
    :vartype network_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetNetworkProfile
    :ivar security_profile: Specifies the Security related profile settings for the virtual
     machines in the scale set.
    :vartype security_profile: ~azure.mgmt.compute.models.SecurityProfile
    :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum api-version:
     2015-06-15.
    :vartype diagnostics_profile: ~azure.mgmt.compute.models.DiagnosticsProfile
    :ivar extension_profile: Specifies a collection of settings for extensions installed on virtual
     machines in the scale set.
    :vartype extension_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetExtensionProfile
    :ivar license_type: Specifies that the image or disk that is being used was licensed
     on-premises. <br><br> Possible values for Windows Server operating system are: <br><br>
     Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating
     system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more
     information, see `Azure Hybrid Use Benefit for Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15.
    :vartype license_type: str
    :ivar priority: Specifies the priority for the virtual machines in the scale set. Minimum
     api-version: 2017-10-30-preview. Known values are: "Regular", "Low", and "Spot".
    :vartype priority: str or ~azure.mgmt.compute.models.VirtualMachinePriorityTypes
    :ivar eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and
     Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are
     supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both
     'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
     Known values are: "Deallocate" and "Delete".
    :vartype eviction_policy: str or ~azure.mgmt.compute.models.VirtualMachineEvictionPolicyTypes
    :ivar billing_profile: Specifies the billing related details of a Azure Spot VMSS. Minimum
     api-version: 2019-03-01.
    :vartype billing_profile: ~azure.mgmt.compute.models.BillingProfile
    :ivar scheduled_events_profile: Specifies Scheduled Event related configurations.
    :vartype scheduled_events_profile: ~azure.mgmt.compute.models.ScheduledEventsProfile
    :ivar user_data: UserData for the virtual machines in the scale set, which must be base-64
     encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.
    :vartype user_data: str
    :ivar capacity_reservation: Specifies the capacity reservation related details of a scale set.
     Minimum api-version: 2021-04-01.
    :vartype capacity_reservation: ~azure.mgmt.compute.models.CapacityReservationProfile
    :ivar interconnect_block_profile: Specifies the Interconnect Block related details of a Scale
     Set. Minimum api-version: 2026-03-01.
    :vartype interconnect_block_profile: ~azure.mgmt.compute.models.InterconnectBlockProfile
    :ivar application_profile: Specifies the gallery applications that should be made available to
     the VM/VMSS.
    :vartype application_profile: ~azure.mgmt.compute.models.ApplicationProfile
    :ivar hardware_profile: Specifies the hardware profile related details of a scale set. Minimum
     api-version: 2021-11-01.
    :vartype hardware_profile: ~azure.mgmt.compute.models.VirtualMachineScaleSetHardwareProfile
    :ivar service_artifact_reference: Specifies the service artifact reference id used to set same
     image version for all virtual machines in the scale set when using 'latest' image version.
     Minimum api-version: 2022-11-01.
    :vartype service_artifact_reference: ~azure.mgmt.compute.models.ServiceArtifactReference
    :ivar security_posture_reference: Specifies the security posture to be used in the scale set.
     Minimum api-version: 2023-03-01.
    :vartype security_posture_reference: ~azure.mgmt.compute.models.SecurityPostureReference
    :ivar time_created: Specifies the time in which this VM profile for the Virtual Machine Scale
     Set was created. This value will be added to VMSS Flex VM tags when creating/updating the VMSS
     VM Profile. Minimum API version for this property is 2023-09-01.
    :vartype time_created: ~datetime.datetime
    """

    os_profile: Optional["_models.VirtualMachineScaleSetOSProfile"] = rest_field(
        name="osProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the operating system settings for the virtual machines in the scale set."""
    storage_profile: Optional["_models.VirtualMachineScaleSetStorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage settings for the virtual machine disks."""
    network_profile: Optional["_models.VirtualMachineScaleSetNetworkProfile"] = rest_field(
        name="networkProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies properties of the network interfaces of the virtual machines in the scale set."""
    security_profile: Optional["_models.SecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Security related profile settings for the virtual machines in the scale set."""
    diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(
        name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15."""
    extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = rest_field(
        name="extensionProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies a collection of settings for extensions installed on virtual machines in the scale
     set."""
    license_type: Optional[str] = rest_field(
        name="licenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible
     values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server
     <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL)
     <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see `Azure Hybrid Use Benefit for
     Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15."""
    priority: Optional[Union[str, "_models.VirtualMachinePriorityTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the priority for the virtual machines in the scale set. Minimum api-version:
     2017-10-30-preview. Known values are: \"Regular\", \"Low\", and \"Spot\"."""
    eviction_policy: Optional[Union[str, "_models.VirtualMachineEvictionPolicyTypes"]] = rest_field(
        name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For
     Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum
     api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are
     supported and the minimum api-version is 2017-10-30-preview. Known values are: \"Deallocate\"
     and \"Delete\"."""
    billing_profile: Optional["_models.BillingProfile"] = rest_field(
        name="billingProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01."""
    scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field(
        name="scheduledEventsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies Scheduled Event related configurations."""
    user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"])
    """UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer
     should not pass any secrets in here. Minimum api-version: 2021-03-01."""
    capacity_reservation: Optional["_models.CapacityReservationProfile"] = rest_field(
        name="capacityReservation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the capacity reservation related details of a scale set. Minimum api-version:
     2021-04-01."""
    interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = rest_field(
        name="interconnectBlockProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Interconnect Block related details of a Scale Set. Minimum api-version:
     2026-03-01."""
    application_profile: Optional["_models.ApplicationProfile"] = rest_field(
        name="applicationProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the gallery applications that should be made available to the VM/VMSS."""
    hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = rest_field(
        name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01."""
    service_artifact_reference: Optional["_models.ServiceArtifactReference"] = rest_field(
        name="serviceArtifactReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the service artifact reference id used to set same image version for all virtual
     machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01."""
    security_posture_reference: Optional["_models.SecurityPostureReference"] = rest_field(
        name="securityPostureReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time in which this VM profile for the Virtual Machine Scale Set was created. This
     value will be added to VMSS Flex VM tags when creating/updating the VMSS VM Profile. Minimum
     API version for this property is 2023-09-01."""

    @overload
    def __init__(
        self,
        *,
        os_profile: Optional["_models.VirtualMachineScaleSetOSProfile"] = None,
        storage_profile: Optional["_models.VirtualMachineScaleSetStorageProfile"] = None,
        network_profile: Optional["_models.VirtualMachineScaleSetNetworkProfile"] = None,
        security_profile: Optional["_models.SecurityProfile"] = None,
        diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None,
        extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = None,
        license_type: Optional[str] = None,
        priority: Optional[Union[str, "_models.VirtualMachinePriorityTypes"]] = None,
        eviction_policy: Optional[Union[str, "_models.VirtualMachineEvictionPolicyTypes"]] = None,
        billing_profile: Optional["_models.BillingProfile"] = None,
        scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = None,
        user_data: Optional[str] = None,
        capacity_reservation: Optional["_models.CapacityReservationProfile"] = None,
        interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = None,
        application_profile: Optional["_models.ApplicationProfile"] = None,
        hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = None,
        service_artifact_reference: Optional["_models.ServiceArtifactReference"] = None,
        security_posture_reference: Optional["_models.SecurityPostureReference"] = 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 VirtualMachineScaleSetVMProperties(_Model):
    """Describes the properties of a virtual machine scale set virtual machine.

    :ivar latest_model_applied: Specifies whether the latest model has been applied to the virtual
     machine.
    :vartype latest_model_applied: bool
    :ivar vm_id: Azure VM unique ID.
    :vartype vm_id: str
    :ivar instance_view: The virtual machine instance view.
    :vartype instance_view: ~azure.mgmt.compute.models.VirtualMachineScaleSetVMInstanceView
    :ivar hardware_profile: Specifies the hardware settings for the virtual machine.
    :vartype hardware_profile: ~azure.mgmt.compute.models.HardwareProfile
    :ivar resilient_vm_deletion_status: Specifies the resilient VM deletion status for the virtual
     machine. Known values are: "Enabled", "Disabled", "InProgress", and "Failed".
    :vartype resilient_vm_deletion_status: str or
     ~azure.mgmt.compute.models.ResilientVMDeletionStatus
    :ivar storage_profile: Specifies the storage settings for the virtual machine disks.
    :vartype storage_profile: ~azure.mgmt.compute.models.StorageProfile
    :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the
     virtual machine in the scale set. For instance: whether the virtual machine has the capability
     to support attaching managed data disks with UltraSSD_LRS storage account type.
    :vartype additional_capabilities: ~azure.mgmt.compute.models.AdditionalCapabilities
    :ivar os_profile: Specifies the operating system settings for the virtual machine.
    :vartype os_profile: ~azure.mgmt.compute.models.OSProfile
    :ivar security_profile: Specifies the Security related profile settings for the virtual
     machine.
    :vartype security_profile: ~azure.mgmt.compute.models.SecurityProfile
    :ivar network_profile: Specifies the network interfaces of the virtual machine.
    :vartype network_profile: ~azure.mgmt.compute.models.NetworkProfile
    :ivar network_profile_configuration: Specifies the network profile configuration of the virtual
     machine.
    :vartype network_profile_configuration:
     ~azure.mgmt.compute.models.VirtualMachineScaleSetVMNetworkProfileConfiguration
    :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum api-version:
     2015-06-15.
    :vartype diagnostics_profile: ~azure.mgmt.compute.models.DiagnosticsProfile
    :ivar availability_set: Specifies information about the availability set that the virtual
     machine should be assigned to. Virtual machines specified in the same availability set are
     allocated to different nodes to maximize availability. For more information about availability
     sets, see `Availability sets overview
     <https://docs.microsoft.com/azure/virtual-machines/availability-set-overview>`_. For more
     information on Azure planned maintenance, see `Maintenance and updates for Virtual Machines in
     Azure <https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates>`_. Currently,
     a VM can only be added to availability set at creation time. An existing VM cannot be added to
     an availability set.
    :vartype availability_set: ~azure.mgmt.compute.models.SubResource
    :ivar provisioning_state: The provisioning state, which only appears in the response.
    :vartype provisioning_state: str
    :ivar license_type: Specifies that the image or disk that is being used was licensed
     on-premises. <br><br> Possible values for Windows Server operating system are: <br><br>
     Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating
     system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more
     information, see `Azure Hybrid Use Benefit for Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15.
    :vartype license_type: str
    :ivar model_definition_applied: Specifies whether the model applied to the virtual machine is
     the model of the virtual machine scale set or the customized model for the virtual machine.
    :vartype model_definition_applied: str
    :ivar protection_policy: Specifies the protection policy of the virtual machine.
    :vartype protection_policy: ~azure.mgmt.compute.models.VirtualMachineScaleSetVMProtectionPolicy
    :ivar user_data: UserData for the VM, which must be base-64 encoded. Customer should not pass
     any secrets in here. Minimum api-version: 2021-03-01.
    :vartype user_data: str
    :ivar time_created: Specifies the time at which the Virtual Machine resource was created.
     Minimum api-version: 2021-11-01.
    :vartype time_created: ~datetime.datetime
    :ivar virtual_machine_resource_id: Specifies the ARM resource ID of the standalone virtual
     machine associated with this VMSS VM. This property is only applicable to Virtual Machine Scale
     Sets with Flexible orchestration mode. Minimum api-version: 2025-11-01.
    :vartype virtual_machine_resource_id: str
    :ivar interconnect_block_profile: Specifies the Interconnect Block related details of a Scale
     Set VM instance. Minimum api-version: 2026-03-01.
    :vartype interconnect_block_profile: ~azure.mgmt.compute.models.InterconnectBlockProfile
    """

    latest_model_applied: Optional[bool] = rest_field(name="latestModelApplied", visibility=["read"])
    """Specifies whether the latest model has been applied to the virtual machine."""
    vm_id: Optional[str] = rest_field(name="vmId", visibility=["read"])
    """Azure VM unique ID."""
    instance_view: Optional["_models.VirtualMachineScaleSetVMInstanceView"] = rest_field(
        name="instanceView", visibility=["read"]
    )
    """The virtual machine instance view."""
    hardware_profile: Optional["_models.HardwareProfile"] = rest_field(
        name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the hardware settings for the virtual machine."""
    resilient_vm_deletion_status: Optional[Union[str, "_models.ResilientVMDeletionStatus"]] = rest_field(
        name="resilientVMDeletionStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the resilient VM deletion status for the virtual machine. Known values are:
     \"Enabled\", \"Disabled\", \"InProgress\", and \"Failed\"."""
    storage_profile: Optional["_models.StorageProfile"] = rest_field(
        name="storageProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the storage settings for the virtual machine disks."""
    additional_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field(
        name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional capabilities enabled or disabled on the virtual machine in the scale set.
     For instance: whether the virtual machine has the capability to support attaching managed data
     disks with UltraSSD_LRS storage account type."""
    os_profile: Optional["_models.OSProfile"] = rest_field(
        name="osProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the operating system settings for the virtual machine."""
    security_profile: Optional["_models.SecurityProfile"] = rest_field(
        name="securityProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Security related profile settings for the virtual machine."""
    network_profile: Optional["_models.NetworkProfile"] = rest_field(
        name="networkProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the network interfaces of the virtual machine."""
    network_profile_configuration: Optional["_models.VirtualMachineScaleSetVMNetworkProfileConfiguration"] = rest_field(
        name="networkProfileConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the network profile configuration of the virtual machine."""
    diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(
        name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15."""
    availability_set: Optional["_models.SubResource"] = rest_field(
        name="availabilitySet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies information about the availability set that the virtual machine should be assigned
     to. Virtual machines specified in the same availability set are allocated to different nodes to
     maximize availability. For more information about availability sets, see `Availability sets
     overview <https://docs.microsoft.com/azure/virtual-machines/availability-set-overview>`_. For
     more information on Azure planned maintenance, see `Maintenance and updates for Virtual
     Machines in Azure
     <https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates>`_. Currently, a VM
     can only be added to availability set at creation time. An existing VM cannot be added to an
     availability set."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state, which only appears in the response."""
    license_type: Optional[str] = rest_field(
        name="licenseType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible
     values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server
     <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL)
     <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see `Azure Hybrid Use Benefit for
     Windows Server
     <https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing>`_
     <br><br> `Azure Hybrid Use Benefit for Linux Server
     <https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux>`_ <br><br>
     Minimum api-version: 2015-06-15."""
    model_definition_applied: Optional[str] = rest_field(name="modelDefinitionApplied", visibility=["read"])
    """Specifies whether the model applied to the virtual machine is the model of the virtual machine
     scale set or the customized model for the virtual machine."""
    protection_policy: Optional["_models.VirtualMachineScaleSetVMProtectionPolicy"] = rest_field(
        name="protectionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the protection policy of the virtual machine."""
    user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"])
    """UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in
     here. Minimum api-version: 2021-03-01."""
    time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339")
    """Specifies the time at which the Virtual Machine resource was created. Minimum api-version:
     2021-11-01."""
    virtual_machine_resource_id: Optional[str] = rest_field(name="virtualMachineResourceId", visibility=["read"])
    """Specifies the ARM resource ID of the standalone virtual machine associated with this VMSS VM.
     This property is only applicable to Virtual Machine Scale Sets with Flexible orchestration
     mode. Minimum api-version: 2025-11-01."""
    interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = rest_field(
        name="interconnectBlockProfile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Interconnect Block related details of a Scale Set VM instance. Minimum
     api-version: 2026-03-01."""

    @overload
    def __init__(
        self,
        *,
        hardware_profile: Optional["_models.HardwareProfile"] = None,
        resilient_vm_deletion_status: Optional[Union[str, "_models.ResilientVMDeletionStatus"]] = None,
        storage_profile: Optional["_models.StorageProfile"] = None,
        additional_capabilities: Optional["_models.AdditionalCapabilities"] = None,
        os_profile: Optional["_models.OSProfile"] = None,
        security_profile: Optional["_models.SecurityProfile"] = None,
        network_profile: Optional["_models.NetworkProfile"] = None,
        network_profile_configuration: Optional["_models.VirtualMachineScaleSetVMNetworkProfileConfiguration"] = None,
        diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None,
        availability_set: Optional["_models.SubResource"] = None,
        license_type: Optional[str] = None,
        protection_policy: Optional["_models.VirtualMachineScaleSetVMProtectionPolicy"] = None,
        user_data: Optional[str] = None,
        interconnect_block_profile: Optional["_models.InterconnectBlockProfile"] = 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 VirtualMachineScaleSetVMProtectionPolicy(_Model):
    """The protection policy of a virtual machine scale set VM.

    :ivar protect_from_scale_in: Indicates that the virtual machine scale set VM shouldn't be
     considered for deletion during a scale-in operation.
    :vartype protect_from_scale_in: bool
    :ivar protect_from_scale_set_actions: Indicates that model updates or actions (including
     scale-in) initiated on the virtual machine scale set should not be applied to the virtual
     machine scale set VM.
    :vartype protect_from_scale_set_actions: bool
    """

    protect_from_scale_in: Optional[bool] = rest_field(
        name="protectFromScaleIn", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a
     scale-in operation."""
    protect_from_scale_set_actions: Optional[bool] = rest_field(
        name="protectFromScaleSetActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates that model updates or actions (including scale-in) initiated on the virtual machine
     scale set should not be applied to the virtual machine scale set VM."""

    @overload
    def __init__(
        self,
        *,
        protect_from_scale_in: Optional[bool] = None,
        protect_from_scale_set_actions: 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 VirtualMachineSize(_Model):
    """Describes the properties of a VM size.

    :ivar name: The name of the virtual machine size.
    :vartype name: str
    :ivar number_of_cores: The number of cores supported by the virtual machine size. For
     Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM
     uses. For accurate vCPU count, please refer to
     `https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu
     <https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu>`_ or
     `https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_.
    :vartype number_of_cores: int
    :ivar os_disk_size_in_mb: The OS disk size, in MB, allowed by the virtual machine size.
    :vartype os_disk_size_in_mb: int
    :ivar resource_disk_size_in_mb: The resource disk size, in MB, allowed by the virtual machine
     size.
    :vartype resource_disk_size_in_mb: int
    :ivar memory_in_mb: The amount of memory, in MB, supported by the virtual machine size.
    :vartype memory_in_mb: int
    :ivar max_data_disk_count: The maximum number of data disks that can be attached to the virtual
     machine size.
    :vartype max_data_disk_count: int
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the virtual machine size."""
    number_of_cores: Optional[int] = rest_field(
        name="numberOfCores", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of cores supported by the virtual machine size. For Constrained vCPU capable VM
     sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU
     count, please refer to `https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu
     <https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu>`_ or
     `https://docs.microsoft.com/rest/api/compute/resourceskus/list
     <https://docs.microsoft.com/rest/api/compute/resourceskus/list>`_."""
    os_disk_size_in_mb: Optional[int] = rest_field(
        name="osDiskSizeInMB", visibility=["read", "create", "update", "delete", "query"]
    )
    """The OS disk size, in MB, allowed by the virtual machine size."""
    resource_disk_size_in_mb: Optional[int] = rest_field(
        name="resourceDiskSizeInMB", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource disk size, in MB, allowed by the virtual machine size."""
    memory_in_mb: Optional[int] = rest_field(
        name="memoryInMB", visibility=["read", "create", "update", "delete", "query"]
    )
    """The amount of memory, in MB, supported by the virtual machine size."""
    max_data_disk_count: Optional[int] = rest_field(
        name="maxDataDiskCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum number of data disks that can be attached to the virtual machine size."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        number_of_cores: Optional[int] = None,
        os_disk_size_in_mb: Optional[int] = None,
        resource_disk_size_in_mb: Optional[int] = None,
        memory_in_mb: Optional[int] = None,
        max_data_disk_count: 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 VirtualMachineSoftwarePatchProperties(_Model):
    """Describes the properties of a Virtual Machine software patch.

    :ivar patch_id: A unique identifier for the patch.
    :vartype patch_id: str
    :ivar name: The friendly name of the patch.
    :vartype name: str
    :ivar version: The version number of the patch. This property applies only to Linux patches.
    :vartype version: str
    :ivar kb_id: The KBID of the patch. Only applies to Windows patches.
    :vartype kb_id: str
    :ivar classifications: The classification(s) of the patch as provided by the patch publisher.
    :vartype classifications: list[str]
    :ivar reboot_behavior: Describes the reboot requirements of the patch. Known values are:
     "Unknown", "NeverReboots", "AlwaysRequiresReboot", and "CanRequestReboot".
    :vartype reboot_behavior: str or ~azure.mgmt.compute.models.VMGuestPatchRebootBehavior
    :ivar activity_id: The activity ID of the operation that produced this result. It is used to
     correlate across CRP and extension logs.
    :vartype activity_id: str
    :ivar published_date: The UTC timestamp when the repository published this patch.
    :vartype published_date: ~datetime.datetime
    :ivar last_modified_date_time: The UTC timestamp of the last update to this patch record.
    :vartype last_modified_date_time: ~datetime.datetime
    :ivar assessment_state: Describes the availability of a given patch. Known values are:
     "Unknown" and "Available".
    :vartype assessment_state: str or ~azure.mgmt.compute.models.PatchAssessmentState
    """

    patch_id: Optional[str] = rest_field(name="patchId", visibility=["read"])
    """A unique identifier for the patch."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The friendly name of the patch."""
    version: Optional[str] = rest_field(visibility=["read"])
    """The version number of the patch. This property applies only to Linux patches."""
    kb_id: Optional[str] = rest_field(name="kbId", visibility=["read"])
    """The KBID of the patch. Only applies to Windows patches."""
    classifications: Optional[list[str]] = rest_field(visibility=["read"])
    """The classification(s) of the patch as provided by the patch publisher."""
    reboot_behavior: Optional[Union[str, "_models.VMGuestPatchRebootBehavior"]] = rest_field(
        name="rebootBehavior", visibility=["read"]
    )
    """Describes the reboot requirements of the patch. Known values are: \"Unknown\",
     \"NeverReboots\", \"AlwaysRequiresReboot\", and \"CanRequestReboot\"."""
    activity_id: Optional[str] = rest_field(name="activityId", visibility=["read"])
    """The activity ID of the operation that produced this result. It is used to correlate across CRP
     and extension logs."""
    published_date: Optional[datetime.datetime] = rest_field(
        name="publishedDate", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp when the repository published this patch."""
    last_modified_date_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedDateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC timestamp of the last update to this patch record."""
    assessment_state: Optional[Union[str, "_models.PatchAssessmentState"]] = rest_field(
        name="assessmentState", visibility=["read"]
    )
    """Describes the availability of a given patch. Known values are: \"Unknown\" and \"Available\"."""


class VirtualMachineStatusCodeCount(_Model):
    """The status code and count of the virtual machine scale set instance view status summary.

    :ivar code: The instance view status code.
    :vartype code: str
    :ivar count: The number of instances having a particular status code.
    :vartype count: int
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """The instance view status code."""
    count: Optional[int] = rest_field(visibility=["read"])
    """The number of instances having a particular status code."""


class VirtualMachineUpdate(UpdateResource):
    """Describes a Virtual Machine Update.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar plan: Specifies information about the marketplace image used to create the virtual
     machine. This element is only used for marketplace images. Before you can use a marketplace
     image from an API, you must enable the image for programmatic use.  In the Azure portal, find
     the marketplace image that you want to use and then click **Want to deploy programmatically,
     Get Started ->**. Enter any required information and then click **Save**.
    :vartype plan: ~azure.mgmt.compute.models.Plan
    :ivar properties: Describes the properties of a Virtual Machine.
    :vartype properties: ~azure.mgmt.compute.models.VirtualMachineProperties
    :ivar identity: The identity of the virtual machine, if configured.
    :vartype identity: ~azure.mgmt.compute.models.VirtualMachineIdentity
    :ivar zones: The virtual machine zones.
    :vartype zones: list[str]
    """

    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies information about the marketplace image used to create the virtual machine. This
     element is only used for marketplace images. Before you can use a marketplace image from an
     API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace
     image that you want to use and then click **Want to deploy programmatically, Get Started ->**.
     Enter any required information and then click **Save**."""
    properties: Optional["_models.VirtualMachineProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of a Virtual Machine."""
    identity: Optional["_models.VirtualMachineIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity of the virtual machine, if configured."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The virtual machine zones."""

    __flattened_items = [
        "hardware_profile",
        "scheduled_events_policy",
        "storage_profile",
        "additional_capabilities",
        "os_profile",
        "network_profile",
        "security_profile",
        "diagnostics_profile",
        "availability_set",
        "virtual_machine_scale_set",
        "proximity_placement_group",
        "priority",
        "eviction_policy",
        "billing_profile",
        "host",
        "host_group",
        "provisioning_state",
        "instance_view",
        "license_type",
        "vm_id",
        "extensions_time_budget",
        "platform_fault_domain",
        "scheduled_events_profile",
        "user_data",
        "capacity_reservation",
        "interconnect_block_profile",
        "application_profile",
        "time_created",
        "resiliency_profile",
    ]

    @overload
    def __init__(
        self,
        *,
        tags: Optional[dict[str, str]] = None,
        plan: Optional["_models.Plan"] = None,
        properties: Optional["_models.VirtualMachineProperties"] = None,
        identity: Optional["_models.VirtualMachineIdentity"] = None,
        zones: 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:
        _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 VMDiskSecurityProfile(_Model):
    """Specifies the security profile settings for the managed disk. **Note:** It can only be set for
    Confidential VMs.

    :ivar security_encryption_type: Specifies the EncryptionType of the managed disk. It is set to
     DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob,
     VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not
     persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only
     Confidential VMs. Known values are: "VMGuestStateOnly", "DiskWithVMGuestState", and
     "NonPersistedTPM".
    :vartype security_encryption_type: str or ~azure.mgmt.compute.models.SecurityEncryptionTypes
    :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for
     the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and
     VMGuest blob.
    :vartype disk_encryption_set: ~azure.mgmt.compute.models.DiskEncryptionSetParameters
    """

    security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = rest_field(
        name="securityEncryptionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for
     encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for encryption of
     just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the
     VMGuestState blob.. **Note:** It can be set for only Confidential VMs. Known values are:
     \"VMGuestStateOnly\", \"DiskWithVMGuestState\", and \"NonPersistedTPM\"."""
    disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(
        name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the customer managed disk encryption set resource id for the managed disk that is
     used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob."""

    @overload
    def __init__(
        self,
        *,
        security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = None,
        disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = 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 VMGalleryApplication(_Model):
    """Specifies the required information to reference a compute gallery application version.

    :ivar tags: Optional, Specifies a passthrough value for more generic context.
    :vartype tags: str
    :ivar order: Optional, Specifies the order in which the packages have to be installed.
    :vartype order: int
    :ivar package_reference_id: Specifies the GalleryApplicationVersion resource id on the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}.
     Required.
    :vartype package_reference_id: str
    :ivar configuration_reference: Optional, Specifies the uri to an azure blob that will replace
     the default configuration for the package if provided.
    :vartype configuration_reference: str
    :ivar treat_failure_as_deployment_failure: Optional, If true, any failure for any operation in
     the VmApplication will fail the deployment.
    :vartype treat_failure_as_deployment_failure: bool
    :ivar enable_automatic_upgrade: If set to true, when a new Gallery Application version is
     available in PIR/SIG, it will be automatically updated for the VM/VMSS.
    :vartype enable_automatic_upgrade: bool
    """

    tags: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional, Specifies a passthrough value for more generic context."""
    order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional, Specifies the order in which the packages have to be installed."""
    package_reference_id: str = rest_field(
        name="packageReferenceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the GalleryApplicationVersion resource id on the form of
     /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}.
     Required."""
    configuration_reference: Optional[str] = rest_field(
        name="configurationReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, Specifies the uri to an azure blob that will replace the default configuration for
     the package if provided."""
    treat_failure_as_deployment_failure: Optional[bool] = rest_field(
        name="treatFailureAsDeploymentFailure", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, If true, any failure for any operation in the VmApplication will fail the deployment."""
    enable_automatic_upgrade: Optional[bool] = rest_field(
        name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to true, when a new Gallery Application version is available in PIR/SIG, it will be
     automatically updated for the VM/VMSS."""

    @overload
    def __init__(
        self,
        *,
        package_reference_id: str,
        tags: Optional[str] = None,
        order: Optional[int] = None,
        configuration_reference: Optional[str] = None,
        treat_failure_as_deployment_failure: Optional[bool] = None,
        enable_automatic_upgrade: 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 VmImagesInEdgeZoneListResult(_Model):
    """The List VmImages in EdgeZone operation response.

    :ivar value: The list of VMImages in EdgeZone.
    :vartype value: list[~azure.mgmt.compute.models.VirtualMachineImageResource]
    :ivar next_link: The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with
     this URI to fetch the next page of VmImages.
    :vartype next_link: str
    """

    value: Optional[list["_models.VirtualMachineImageResource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of VMImages in EdgeZone."""
    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch
     the next page of VmImages."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[list["_models.VirtualMachineImageResource"]] = None,
        next_link: 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 VMScaleSetConvertToSinglePlacementGroupInput(_Model):  # pylint: disable=name-too-long
    """VMScaleSetConvertToSinglePlacementGroupInput.

    :ivar active_placement_group_id: Id of the placement group in which you want future virtual
     machine instances to be placed. To query placement group Id, please use Virtual Machine Scale
     Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual
     machine instances.
    :vartype active_placement_group_id: str
    """

    active_placement_group_id: Optional[str] = rest_field(
        name="activePlacementGroupId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Id of the placement group in which you want future virtual machine instances to be placed. To
     query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided,
     the platform will choose one with maximum number of virtual machine instances."""

    @overload
    def __init__(
        self,
        *,
        active_placement_group_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 VMScaleSetLifecycleHookEvent(ProxyResource):
    """Defines a virtual machine scale set lifecycle hook event.

    :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.compute.models.SystemData
    :ivar properties: Defines the virtual machine scale set lifecycle hook event properties.
    :vartype properties: ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventProperties
    """

    properties: Optional["_models.VMScaleSetLifecycleHookEventProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the virtual machine scale set lifecycle hook event properties."""

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.VMScaleSetLifecycleHookEventProperties"] = 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 VMScaleSetLifecycleHookEventAdditionalContext(_Model):  # pylint: disable=name-too-long
    """Additional key-value pairs set on the lifecycle hook event that gives customer some useful
    context/data. The keys in this dictionary are specific to the lifecycle hook type. Different
    lifecycle hook events can have different sets of keys in the additional context depending on
    the lifecycle hook type. For example, for a lifecycle hook event with UpgradeAutoOSScheduling
    type, the additional context can contain the key "priority" that helps customer identify the
    priority of the Auto OS Upgrade operation triggered on the virtual machine scale set.

    :ivar priority: Can only be present for a lifecycle hook event of type
     "UpgradeAutoOSScheduling". Denotes the priority of the virtual machine scale set lifecycle hook
     event for the Auto OS Upgrade scheduled on the virtual machine scale set.
    :vartype priority: str
    """

    priority: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Can only be present for a lifecycle hook event of type \"UpgradeAutoOSScheduling\". Denotes the
     priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade
     scheduled on the virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        priority: 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 VMScaleSetLifecycleHookEventProperties(_Model):
    """Defines the virtual machine scale set lifecycle hook event properties.

    :ivar type: Defines the type or scenario for sending a virtual machine scale set lifecycle hook
     event to the customer. Known values are: "UpgradeAutoOSScheduling" and
     "UpgradeAutoOSRollingBatchStarting".
    :vartype type: str or ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventType
    :ivar wait_until: Specifies the exact UTC timestamp in ISO 8601 format till which the event
     would remain in the current lifecycle state waiting for an action from the customer. Beyond
     this timestamp, the platform will apply the defaultAction for the event.
    :vartype wait_until: str
    :ivar max_wait_until: Specifies the exact UTC timestamp in ISO 8601 format till when the
     customer can delay the lifecycle hook event. The customer will not be allowed to delay the
     event to a timestamp beyond this.
    :vartype max_wait_until: str
    :ivar time_created: The UTC timestamp in ISO 8601 format at which the platform creates the
     virtual machine scale set lifecycle hook event entity.
    :vartype time_created: str
    :ivar default_action: Specify the action that will be applied on the a target resource in the
     virtual machine scale set lifecycle hook event if the platform does not get a response from the
     customer for the target resource before waitUntil. Known values are: "Approve" and "Reject".
    :vartype default_action: str or ~azure.mgmt.compute.models.LifecycleHookAction
    :ivar target_resources: List of target resources which are getting processed in the virtual
     machine scale set lifecycle hook event.
    :vartype target_resources:
     list[~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventTargetResource]
    :ivar additional_context: Additional key-value pairs set on the lifecycle hook event that gives
     customer some useful context/data. The keys in this dictionary are specific to the lifecycle
     hook type. Different lifecycle hook events can have different sets of keys in the additional
     context depending on the lifecycle hook type. For example, for a lifecycle hook event with
     UpgradeAutoOSScheduling type, the additional context can contain the key "priority" that helps
     customer identify the priority of the Auto OS Upgrade operation triggered on the virtual
     machine scale set.
    :vartype additional_context:
     ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventAdditionalContext
    :ivar state: Specifies the state of the virtual machine scale set lifecycle hook event. Known
     values are: "Active" and "Completed".
    :vartype state: str or ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventState
    """

    type: Optional[Union[str, "_models.VMScaleSetLifecycleHookEventType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to
     the customer. Known values are: \"UpgradeAutoOSScheduling\" and
     \"UpgradeAutoOSRollingBatchStarting\"."""
    wait_until: Optional[str] = rest_field(name="waitUntil", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the
     current lifecycle state waiting for an action from the customer. Beyond this timestamp, the
     platform will apply the defaultAction for the event."""
    max_wait_until: Optional[str] = rest_field(name="maxWaitUntil", visibility=["read"])
    """Specifies the exact UTC timestamp in ISO 8601 format till when the customer can delay the
     lifecycle hook event. The customer will not be allowed to delay the event to a timestamp beyond
     this."""
    time_created: Optional[str] = rest_field(name="timeCreated", visibility=["read"])
    """The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale
     set lifecycle hook event entity."""
    default_action: Optional[Union[str, "_models.LifecycleHookAction"]] = rest_field(
        name="defaultAction", visibility=["read"]
    )
    """Specify the action that will be applied on the a target resource in the virtual machine scale
     set lifecycle hook event if the platform does not get a response from the customer for the
     target resource before waitUntil. Known values are: \"Approve\" and \"Reject\"."""
    target_resources: Optional[list["_models.VMScaleSetLifecycleHookEventTargetResource"]] = rest_field(
        name="targetResources", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of target resources which are getting processed in the virtual machine scale set lifecycle
     hook event."""
    additional_context: Optional["_models.VMScaleSetLifecycleHookEventAdditionalContext"] = rest_field(
        name="additionalContext", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional key-value pairs set on the lifecycle hook event that gives customer some useful
     context/data. The keys in this dictionary are specific to the lifecycle hook type. Different
     lifecycle hook events can have different sets of keys in the additional context depending on
     the lifecycle hook type. For example, for a lifecycle hook event with UpgradeAutoOSScheduling
     type, the additional context can contain the key \"priority\" that helps customer identify the
     priority of the Auto OS Upgrade operation triggered on the virtual machine scale set."""
    state: Optional[Union[str, "_models.VMScaleSetLifecycleHookEventState"]] = rest_field(visibility=["read"])
    """Specifies the state of the virtual machine scale set lifecycle hook event. Known values are:
     \"Active\" and \"Completed\"."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.VMScaleSetLifecycleHookEventType"]] = None,
        wait_until: Optional[str] = None,
        target_resources: Optional[list["_models.VMScaleSetLifecycleHookEventTargetResource"]] = None,
        additional_context: Optional["_models.VMScaleSetLifecycleHookEventAdditionalContext"] = 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 VMScaleSetLifecycleHookEventTargetResource(_Model):  # pylint: disable=name-too-long
    """Define a single target ARM resource in a virtual machine scale set lifecycle hook event.
    Currently, this can be a virtual machine scale set resource or an individual virtual machine
    resource within a VMScaleSet.

    :ivar resource: Specifies the target ARM resource. Currently, this can be a virtual machine
     scale set resource or an individual virtual machine resource within a VMScaleSet.
    :vartype resource: ~azure.mgmt.compute.models.ApiEntityReference
    :ivar action_state: State of the lifecycle hook for the target resource. The customer can patch
     this property to move the lifecycle hook to a terminal state. Known values are: "Waiting",
     "Approved", and "Rejected".
    :vartype action_state: str or ~azure.mgmt.compute.models.LifecycleHookActionState
    """

    resource: Optional["_models.ApiEntityReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource
     or an individual virtual machine resource within a VMScaleSet."""
    action_state: Optional[Union[str, "_models.LifecycleHookActionState"]] = rest_field(
        name="actionState", visibility=["read", "create", "update", "delete", "query"]
    )
    """State of the lifecycle hook for the target resource. The customer can patch this property to
     move the lifecycle hook to a terminal state. Known values are: \"Waiting\", \"Approved\", and
     \"Rejected\"."""

    @overload
    def __init__(
        self,
        *,
        resource: Optional["_models.ApiEntityReference"] = None,
        action_state: Optional[Union[str, "_models.LifecycleHookActionState"]] = 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 VMScaleSetLifecycleHookEventUpdate(_Model):
    """Specifies information about the virtual machine scale set lifecycle hook event.

    :ivar properties: virtual machine scale set lifecycle hook event properties.
    :vartype properties: ~azure.mgmt.compute.models.VMScaleSetLifecycleHookEventProperties
    """

    properties: Optional["_models.VMScaleSetLifecycleHookEventProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """virtual machine scale set lifecycle hook event properties."""

    __flattened_items = [
        "type",
        "wait_until",
        "max_wait_until",
        "time_created",
        "default_action",
        "target_resources",
        "additional_context",
        "state",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.VMScaleSetLifecycleHookEventProperties"] = 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 VMScaleSetScaleOutInput(_Model):
    """The input for ScaleOut.

    :ivar capacity: Specifies the number of virtual machines in the scale set. Required.
    :vartype capacity: int
    :ivar properties: The input properties for ScaleOut.
    :vartype properties: ~azure.mgmt.compute.models.VMScaleSetScaleOutInputProperties
    """

    capacity: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the number of virtual machines in the scale set. Required."""
    properties: Optional["_models.VMScaleSetScaleOutInputProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The input properties for ScaleOut."""

    @overload
    def __init__(
        self,
        *,
        capacity: int,
        properties: Optional["_models.VMScaleSetScaleOutInputProperties"] = 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 VMScaleSetScaleOutInputProperties(_Model):
    """The input properties for ScaleOut.

    :ivar zone: The zone in which the scale out is requested for the virtual machine scale set.
    :vartype zone: str
    """

    zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The zone in which the scale out is requested for the virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        zone: 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 VMSizeProperties(_Model):
    """Specifies VM Size Property settings on the virtual machine.

    :ivar v_cpus_available: Specifies the number of vCPUs available for the VM. When this property
     is not specified in the request body the default behavior is to set it to the value of vCPUs
     available for that VM size exposed in api response of `List all available virtual machine sizes
     in a region <https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list>`_.
    :vartype v_cpus_available: int
    :ivar v_cpus_per_core: Specifies the vCPU to physical core ratio. When this property is not
     specified in the request body the default behavior is set to the value of vCPUsPerCore for the
     VM Size exposed in api response of `List all available virtual machine sizes in a region
     <https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list>`_. **Setting this
     property to 1 also means that hyper-threading is disabled.**.
    :vartype v_cpus_per_core: int
    """

    v_cpus_available: Optional[int] = rest_field(
        name="vCPUsAvailable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the number of vCPUs available for the VM. When this property is not specified in the
     request body the default behavior is to set it to the value of vCPUs available for that VM size
     exposed in api response of `List all available virtual machine sizes in a region
     <https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list>`_."""
    v_cpus_per_core: Optional[int] = rest_field(
        name="vCPUsPerCore", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the vCPU to physical core ratio. When this property is not specified in the request
     body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api
     response of `List all available virtual machine sizes in a region
     <https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list>`_. **Setting this
     property to 1 also means that hyper-threading is disabled.**."""

    @overload
    def __init__(
        self,
        *,
        v_cpus_available: Optional[int] = None,
        v_cpus_per_core: 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 WindowsConfiguration(_Model):
    """Specifies Windows operating system settings on the virtual machine.

    :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the
     virtual machine. When this property is not specified in the request body, it is set to true by
     default. This will ensure that VM Agent is installed on the VM so that extensions can be added
     to the VM later.
    :vartype provision_vm_agent: bool
    :ivar enable_automatic_updates: Indicates whether Automatic Updates is enabled for the Windows
     virtual machine. Default value is true. For virtual machine scale sets, this property can be
     updated and updates will take effect on OS reprovisioning.
    :vartype enable_automatic_updates: bool
    :ivar time_zone: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".
     Possible values can be `TimeZoneInfo.Id
     <https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id>`_ value
     from time zones returned by `TimeZoneInfo.GetSystemTimeZones
     <https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones>`_.
    :vartype time_zone: str
    :ivar additional_unattend_content: Specifies additional base-64 encoded XML formatted
     information that can be included in the Unattend.xml file, which is used by Windows Setup.
    :vartype additional_unattend_content:
     list[~azure.mgmt.compute.models.AdditionalUnattendContent]
    :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on
     Windows.
    :vartype patch_settings: ~azure.mgmt.compute.models.PatchSettings
    :ivar win_rm: Specifies the Windows Remote Management listeners. This enables remote Windows
     PowerShell.
    :vartype win_rm: ~azure.mgmt.compute.models.WinRMConfiguration
    :ivar enable_vm_agent_platform_updates: Indicates whether VMAgent Platform Updates are enabled
     for the Windows Virtual Machine.
    :vartype enable_vm_agent_platform_updates: bool
    """

    provision_vm_agent: Optional[bool] = rest_field(
        name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this
     property is not specified in the request body, it is set to true by default. This will ensure
     that VM Agent is installed on the VM so that extensions can be added to the VM later."""
    enable_automatic_updates: Optional[bool] = rest_field(
        name="enableAutomaticUpdates", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value
     is true. For virtual machine scale sets, this property can be updated and updates will take
     effect on OS reprovisioning."""
    time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values
     can be `TimeZoneInfo.Id
     <https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id>`_ value
     from time zones returned by `TimeZoneInfo.GetSystemTimeZones
     <https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones>`_."""
    additional_unattend_content: Optional[list["_models.AdditionalUnattendContent"]] = rest_field(
        name="additionalUnattendContent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies additional base-64 encoded XML formatted information that can be included in the
     Unattend.xml file, which is used by Windows Setup."""
    patch_settings: Optional["_models.PatchSettings"] = rest_field(
        name="patchSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """[Preview Feature] Specifies settings related to VM Guest Patching on Windows."""
    win_rm: Optional["_models.WinRMConfiguration"] = rest_field(
        name="winRM", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell."""
    enable_vm_agent_platform_updates: Optional[bool] = rest_field(
        name="enableVMAgentPlatformUpdates", visibility=["read"]
    )
    """Indicates whether VMAgent Platform Updates are enabled for the Windows Virtual Machine."""

    @overload
    def __init__(
        self,
        *,
        provision_vm_agent: Optional[bool] = None,
        enable_automatic_updates: Optional[bool] = None,
        time_zone: Optional[str] = None,
        additional_unattend_content: Optional[list["_models.AdditionalUnattendContent"]] = None,
        patch_settings: Optional["_models.PatchSettings"] = None,
        win_rm: Optional["_models.WinRMConfiguration"] = 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 WindowsParameters(_Model):
    """Input for InstallPatches on a Windows VM, as directly received by the API.

    :ivar classifications_to_include: The update classifications to select when installing patches
     for Windows.
    :vartype classifications_to_include: list[str or
     ~azure.mgmt.compute.models.VMGuestPatchClassificationWindows]
    :ivar kb_numbers_to_include: Kbs to include in the patch operation.
    :vartype kb_numbers_to_include: list[str]
    :ivar kb_numbers_to_exclude: Kbs to exclude in the patch operation.
    :vartype kb_numbers_to_exclude: list[str]
    :ivar exclude_kbs_requiring_reboot: Filters out Kbs that don't have an
     InstallationRebootBehavior of 'NeverReboots' when this is set to true.
    :vartype exclude_kbs_requiring_reboot: bool
    :ivar max_patch_publish_date: This is used to install patches that were published on or before
     this given max published date.
    :vartype max_patch_publish_date: ~datetime.datetime
    :ivar patch_name_masks_to_include: This is used to include patches that match the given patch
     name masks. Alphanumeric strings and wildcard expressions consisting of * and ? are only
     supported as input values in the list. Null, empty and only whitespaces strings as inputs
     values are not supported.
    :vartype patch_name_masks_to_include: list[str]
    :ivar patch_name_masks_to_exclude: This is used to exclude patches that match the given patch
     name masks. Alphanumeric strings and wildcard expressions consisting of * and ? are only
     supported as input values in the list. Null, empty and only whitespaces strings as inputs
     values are not supported.
    :vartype patch_name_masks_to_exclude: list[str]
    """

    classifications_to_include: Optional[list[Union[str, "_models.VMGuestPatchClassificationWindows"]]] = rest_field(
        name="classificationsToInclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """The update classifications to select when installing patches for Windows."""
    kb_numbers_to_include: Optional[list[str]] = rest_field(
        name="kbNumbersToInclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """Kbs to include in the patch operation."""
    kb_numbers_to_exclude: Optional[list[str]] = rest_field(
        name="kbNumbersToExclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """Kbs to exclude in the patch operation."""
    exclude_kbs_requiring_reboot: Optional[bool] = rest_field(
        name="excludeKbsRequiringReboot", visibility=["read", "create", "update", "delete", "query"]
    )
    """Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is
     set to true."""
    max_patch_publish_date: Optional[datetime.datetime] = rest_field(
        name="maxPatchPublishDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """This is used to install patches that were published on or before this given max published date."""
    patch_name_masks_to_include: Optional[list[str]] = rest_field(
        name="patchNameMasksToInclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is used to include patches that match the given patch name masks. Alphanumeric strings and
     wildcard expressions consisting of * and ? are only supported as input values in the list.
     Null, empty and only whitespaces strings as inputs values are not supported."""
    patch_name_masks_to_exclude: Optional[list[str]] = rest_field(
        name="patchNameMasksToExclude", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is used to exclude patches that match the given patch name masks. Alphanumeric strings and
     wildcard expressions consisting of * and ? are only supported as input values in the list.
     Null, empty and only whitespaces strings as inputs values are not supported."""

    @overload
    def __init__(
        self,
        *,
        classifications_to_include: Optional[list[Union[str, "_models.VMGuestPatchClassificationWindows"]]] = None,
        kb_numbers_to_include: Optional[list[str]] = None,
        kb_numbers_to_exclude: Optional[list[str]] = None,
        exclude_kbs_requiring_reboot: Optional[bool] = None,
        max_patch_publish_date: Optional[datetime.datetime] = None,
        patch_name_masks_to_include: Optional[list[str]] = None,
        patch_name_masks_to_exclude: 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 WindowsVMGuestPatchAutomaticByPlatformSettings(_Model):  # pylint: disable=name-too-long
    """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in
    Windows patch settings.

    :ivar reboot_setting: Specifies the reboot setting for all AutomaticByPlatform patch
     installation operations. Known values are: "Unknown", "IfRequired", "Never", and "Always".
    :vartype reboot_setting: str or
     ~azure.mgmt.compute.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting
    :ivar bypass_platform_safety_checks_on_user_schedule: Enables customer to schedule patching
     without accidental upgrades.
    :vartype bypass_platform_safety_checks_on_user_schedule: bool
    """

    reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field(
        name="rebootSetting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known
     values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\"."""
    bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field(
        name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables customer to schedule patching without accidental upgrades."""

    @overload
    def __init__(
        self,
        *,
        reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = None,
        bypass_platform_safety_checks_on_user_schedule: 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 WinRMConfiguration(_Model):
    """Describes Windows Remote Management configuration of the VM.

    :ivar listeners: The list of Windows Remote Management listeners.
    :vartype listeners: list[~azure.mgmt.compute.models.WinRMListener]
    """

    listeners: Optional[list["_models.WinRMListener"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Windows Remote Management listeners."""

    @overload
    def __init__(
        self,
        *,
        listeners: Optional[list["_models.WinRMListener"]] = 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 WinRMListener(_Model):
    """Describes Protocol and thumbprint of Windows Remote Management listener.

    :ivar protocol: Specifies the protocol of WinRM listener. Possible values are: **http,**
     **https.**. Known values are: "Http" and "Https".
    :vartype protocol: str or ~azure.mgmt.compute.models.ProtocolTypes
    :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as
     a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault
     <https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add>`_. In this case, your
     certificate needs to be the Base64 encoding of the following JSON Object which is encoded in
     UTF-8: <br><br> {<br>  "data":"<Base64-encoded-certificate>",<br>  "dataType":"pfx",<br>
     "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is
     recommended to use the `Azure Key Vault virtual machine extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_.
    :vartype certificate_url: str
    """

    protocol: Optional[Union[str, "_models.ProtocolTypes"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. Known
     values are: \"Http\" and \"Https\"."""
    certificate_url: Optional[str] = rest_field(
        name="certificateUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a
     secret to the Key Vault, see `Add a key or secret to the key vault
     <https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add>`_. In this case, your
     certificate needs to be the Base64 encoding of the following JSON Object which is encoded in
     UTF-8: <br><br> {<br>  \"data\":\"<Base64-encoded-certificate>\",<br>
     \"dataType\":\"pfx\",<br>  \"password\":\"<pfx-file-password>\"<br>} <br> To install
     certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine
     extension for Linux
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux>`_ or the `Azure
     Key Vault virtual machine extension for Windows
     <https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows>`_."""

    @overload
    def __init__(
        self,
        *,
        protocol: Optional[Union[str, "_models.ProtocolTypes"]] = None,
        certificate_url: 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 ZoneAllocationPolicy(_Model):
    """The configuration parameters for zone allocation of a virtual machine scale set.

    :ivar max_zone_count: The maximum number of availability zones to use if the
     ZonePlacementPolicy is 'Auto'. If not specified, all availability zones will be used.
    :vartype max_zone_count: int
    :ivar max_instance_percent_per_zone_policy: The configuration parameters used to limit the
     number of virtual machines per availability zone in the virtual machine scale set.
    :vartype max_instance_percent_per_zone_policy:
     ~azure.mgmt.compute.models.MaxInstancePercentPerZonePolicy
    """

    max_zone_count: Optional[int] = rest_field(
        name="maxZoneCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'. If not
     specified, all availability zones will be used."""
    max_instance_percent_per_zone_policy: Optional["_models.MaxInstancePercentPerZonePolicy"] = rest_field(
        name="maxInstancePercentPerZonePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration parameters used to limit the number of virtual machines per availability zone
     in the virtual machine scale set."""

    @overload
    def __init__(
        self,
        *,
        max_zone_count: Optional[int] = None,
        max_instance_percent_per_zone_policy: Optional["_models.MaxInstancePercentPerZonePolicy"] = 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 ZoneMovement(_Model):
    """Describes zone movement configuration. This allows VM to be moved across availability zones
    during an outage.

    :ivar is_enabled: Indicates if zone movement is enabled. By default isEnabled is set to false
     i.e VM can't be moved from one zone to another.
    :vartype is_enabled: bool
    """

    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates if zone movement is enabled. By default isEnabled is set to false i.e VM can't be
     moved from one zone to another."""

    @overload
    def __init__(
        self,
        *,
        is_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)
