# 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_discriminator, rest_field
from ._enums import StorageConnectorAuthType, StorageConnectorConnectionType, StorageConnectorSourceType

if TYPE_CHECKING:
    from .. import models as _models


class AccessPolicy(_Model):
    """AccessPolicy.

    :ivar start_time: Start time of the access policy.
    :vartype start_time: ~datetime.datetime
    :ivar expiry_time: Expiry time of the access policy.
    :vartype expiry_time: ~datetime.datetime
    :ivar permission: List of abbreviated permissions.
    :vartype permission: str
    """

    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Start time of the access policy."""
    expiry_time: Optional[datetime.datetime] = rest_field(
        name="expiryTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Expiry time of the access policy."""
    permission: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of abbreviated permissions."""

    @overload
    def __init__(
        self,
        *,
        start_time: Optional[datetime.datetime] = None,
        expiry_time: Optional[datetime.datetime] = None,
        permission: 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 AccountImmutabilityPolicyProperties(_Model):
    """This defines account-level immutability policy properties.

    :ivar immutability_period_since_creation_in_days: The immutability period for the blobs in the
     container since the policy creation, in days.
    :vartype immutability_period_since_creation_in_days: int
    :ivar state: The ImmutabilityPolicy state defines the mode of the policy. Disabled state
     disables the policy, Unlocked state allows increase and decrease of immutability retention time
     and also allows toggling allowProtectedAppendWrites property, Locked state only allows the
     increase of the immutability retention time. A policy can only be created in a Disabled or
     Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state
     can transition to a Locked state which cannot be reverted. Known values are: "Unlocked",
     "Locked", and "Disabled".
    :vartype state: str or ~azure.mgmt.storage.models.AccountImmutabilityPolicyState
    :ivar allow_protected_append_writes: This property can only be changed for disabled and
     unlocked time-based retention policies. When enabled, new blocks can be written to an append
     blob while maintaining immutability protection and compliance. Only new blocks can be added and
     any existing blocks cannot be modified or deleted.
    :vartype allow_protected_append_writes: bool
    """

    immutability_period_since_creation_in_days: Optional[int] = rest_field(
        name="immutabilityPeriodSinceCreationInDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """The immutability period for the blobs in the container since the policy creation, in days."""
    state: Optional[Union[str, "_models.AccountImmutabilityPolicyState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the
     policy, Unlocked state allows increase and decrease of immutability retention time and also
     allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of
     the immutability retention time. A policy can only be created in a Disabled or Unlocked state
     and can be toggled between the two states. Only a policy in an Unlocked state can transition to
     a Locked state which cannot be reverted. Known values are: \"Unlocked\", \"Locked\", and
     \"Disabled\"."""
    allow_protected_append_writes: Optional[bool] = rest_field(
        name="allowProtectedAppendWrites", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can only be changed for disabled and unlocked time-based retention policies. When
     enabled, new blocks can be written to an append blob while maintaining immutability protection
     and compliance. Only new blocks can be added and any existing blocks cannot be modified or
     deleted."""

    @overload
    def __init__(
        self,
        *,
        immutability_period_since_creation_in_days: Optional[int] = None,
        state: Optional[Union[str, "_models.AccountImmutabilityPolicyState"]] = None,
        allow_protected_append_writes: 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 AccountLimits(_Model):
    """Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage
    account.

    :ivar max_file_shares: The maximum number of file shares limit for the storage account.
    :vartype max_file_shares: int
    :ivar max_provisioned_storage_gi_b: The maximum provisioned storage quota limit in gibibytes
     for the storage account.
    :vartype max_provisioned_storage_gi_b: int
    :ivar max_provisioned_iops: The maximum provisioned IOPS limit for the storage account.
    :vartype max_provisioned_iops: int
    :ivar max_provisioned_bandwidth_mi_b_per_sec: The maximum provisioned bandwidth limit in
     mebibytes per second for the storage account.
    :vartype max_provisioned_bandwidth_mi_b_per_sec: int
    """

    max_file_shares: Optional[int] = rest_field(name="maxFileShares", visibility=["read"])
    """The maximum number of file shares limit for the storage account."""
    max_provisioned_storage_gi_b: Optional[int] = rest_field(name="maxProvisionedStorageGiB", visibility=["read"])
    """The maximum provisioned storage quota limit in gibibytes for the storage account."""
    max_provisioned_iops: Optional[int] = rest_field(name="maxProvisionedIOPS", visibility=["read"])
    """The maximum provisioned IOPS limit for the storage account."""
    max_provisioned_bandwidth_mi_b_per_sec: Optional[int] = rest_field(
        name="maxProvisionedBandwidthMiBPerSec", visibility=["read"]
    )
    """The maximum provisioned bandwidth limit in mebibytes per second for the storage account."""


class AccountSasParameters(_Model):
    """The parameters to list SAS credentials of a storage account.

    :ivar services: The signed services accessible with the account SAS. Possible values include:
     Blob (b), Queue (q), Table (t), File (f). Required. Known values are: "b", "q", "t", and "f".
    :vartype services: str or ~azure.mgmt.storage.models.Services
    :ivar resource_types: The signed resource types that are accessible with the account SAS.
     Service (s): Access to service-level APIs; Container (c): Access to container-level APIs;
     Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.
     Required. Known values are: "s", "c", and "o".
    :vartype resource_types: str or ~azure.mgmt.storage.models.SignedResourceTypes
    :ivar permissions: The signed permissions for the account SAS. Possible values include: Read
     (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).
     Required. Known values are: "r", "d", "w", "l", "a", "c", "u", and "p".
    :vartype permissions: str or ~azure.mgmt.storage.models.Permissions
    :ivar ip_address_or_range: An IP address or a range of IP addresses from which to accept
     requests.
    :vartype ip_address_or_range: str
    :ivar protocols: The protocol permitted for a request made with the account SAS. Known values
     are: "https,http" and "https".
    :vartype protocols: str or ~azure.mgmt.storage.models.HttpProtocol
    :ivar shared_access_start_time: The time at which the SAS becomes valid.
    :vartype shared_access_start_time: ~datetime.datetime
    :ivar shared_access_expiry_time: The time at which the shared access signature becomes invalid.
     Required.
    :vartype shared_access_expiry_time: ~datetime.datetime
    :ivar key_to_sign: The key to sign the account SAS token with.
    :vartype key_to_sign: str
    """

    services: Union[str, "_models.Services"] = rest_field(
        name="signedServices", visibility=["read", "create", "update", "delete", "query"]
    )
    """The signed services accessible with the account SAS. Possible values include: Blob (b), Queue
     (q), Table (t), File (f). Required. Known values are: \"b\", \"q\", \"t\", and \"f\"."""
    resource_types: Union[str, "_models.SignedResourceTypes"] = rest_field(
        name="signedResourceTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The signed resource types that are accessible with the account SAS. Service (s): Access to
     service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to
     object-level APIs for blobs, queue messages, table entities, and files. Required. Known values
     are: \"s\", \"c\", and \"o\"."""
    permissions: Union[str, "_models.Permissions"] = rest_field(
        name="signedPermission", visibility=["read", "create", "update", "delete", "query"]
    )
    """The signed permissions for the account SAS. Possible values include: Read (r), Write (w),
     Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Required. Known values
     are: \"r\", \"d\", \"w\", \"l\", \"a\", \"c\", \"u\", and \"p\"."""
    ip_address_or_range: Optional[str] = rest_field(
        name="signedIp", visibility=["read", "create", "update", "delete", "query"]
    )
    """An IP address or a range of IP addresses from which to accept requests."""
    protocols: Optional[Union[str, "_models.HttpProtocol"]] = rest_field(
        name="signedProtocol", visibility=["read", "create", "update", "delete", "query"]
    )
    """The protocol permitted for a request made with the account SAS. Known values are:
     \"https,http\" and \"https\"."""
    shared_access_start_time: Optional[datetime.datetime] = rest_field(
        name="signedStart", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time at which the SAS becomes valid."""
    shared_access_expiry_time: datetime.datetime = rest_field(
        name="signedExpiry", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time at which the shared access signature becomes invalid. Required."""
    key_to_sign: Optional[str] = rest_field(
        name="keyToSign", visibility=["read", "create", "update", "delete", "query"]
    )
    """The key to sign the account SAS token with."""

    @overload
    def __init__(
        self,
        *,
        services: Union[str, "_models.Services"],
        resource_types: Union[str, "_models.SignedResourceTypes"],
        permissions: Union[str, "_models.Permissions"],
        shared_access_expiry_time: datetime.datetime,
        ip_address_or_range: Optional[str] = None,
        protocols: Optional[Union[str, "_models.HttpProtocol"]] = None,
        shared_access_start_time: Optional[datetime.datetime] = None,
        key_to_sign: 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 AccountUsage(_Model):
    """Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares
    and soft-deleted shares in the account.

    :ivar live_shares: Usage of provisioned storage, IOPS, bandwidth and number of file shares
     across all live shares or soft-deleted shares in the account.
    :vartype live_shares: ~azure.mgmt.storage.models.AccountUsageElements
    :ivar soft_deleted_shares: Usage of provisioned storage, IOPS, bandwidth and number of file
     shares across all live shares or soft-deleted shares in the account.
    :vartype soft_deleted_shares: ~azure.mgmt.storage.models.AccountUsageElements
    """

    live_shares: Optional["_models.AccountUsageElements"] = rest_field(
        name="liveShares", visibility=["read", "create", "update", "delete", "query"]
    )
    """Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares
     or soft-deleted shares in the account."""
    soft_deleted_shares: Optional["_models.AccountUsageElements"] = rest_field(
        name="softDeletedShares", visibility=["read", "create", "update", "delete", "query"]
    )
    """Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares
     or soft-deleted shares in the account."""

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

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

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


class AccountUsageElements(_Model):
    """Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares
    or soft-deleted shares in the account.

    :ivar file_share_count: The total number of file shares.
    :vartype file_share_count: int
    :ivar provisioned_storage_gi_b: The total provisioned storage quota in gibibytes.
    :vartype provisioned_storage_gi_b: int
    :ivar provisioned_iops: The total provisioned IOPS.
    :vartype provisioned_iops: int
    :ivar provisioned_bandwidth_mi_b_per_sec: The total provisioned bandwidth in mebibytes per
     second.
    :vartype provisioned_bandwidth_mi_b_per_sec: int
    """

    file_share_count: Optional[int] = rest_field(name="fileShareCount", visibility=["read"])
    """The total number of file shares."""
    provisioned_storage_gi_b: Optional[int] = rest_field(name="provisionedStorageGiB", visibility=["read"])
    """The total provisioned storage quota in gibibytes."""
    provisioned_iops: Optional[int] = rest_field(name="provisionedIOPS", visibility=["read"])
    """The total provisioned IOPS."""
    provisioned_bandwidth_mi_b_per_sec: Optional[int] = rest_field(
        name="provisionedBandwidthMiBPerSec", visibility=["read"]
    )
    """The total provisioned bandwidth in mebibytes per second."""


class ActiveDirectoryProperties(_Model):
    """Settings properties for Active Directory (AD).

    :ivar domain_name: Specifies the primary domain that the AD DNS server is authoritative for.
     This property is required if directoryServiceOptions is set to AD (AD DS authentication). If
     directoryServiceOptions is set to AADDS (Entra DS authentication), providing this property is
     optional, as it will be inferred automatically if omitted. If directoryServiceOptions is set to
     AADKERB (Entra authentication), this property is optional; it is needed to support
     configuration of directory- and file-level permissions via Windows File Explorer, but is not
     required for authentication.
    :vartype domain_name: str
    :ivar net_bios_domain_name: Specifies the NetBIOS domain name. If directoryServiceOptions is
     set to AD (AD DS authentication), this property is required. Otherwise, it can be omitted.
    :vartype net_bios_domain_name: str
    :ivar forest_name: Specifies the Active Directory forest to get. If directoryServiceOptions is
     set to AD (AD DS authentication), this property is required. Otherwise, it can be omitted.
    :vartype forest_name: str
    :ivar domain_guid: Specifies the domain GUID. If directoryServiceOptions is set to AD (AD DS
     authentication), this property is required. If directoryServiceOptions is set to AADDS (Entra
     DS authentication), this property can be omitted. If directoryServiceOptions is set to AADKERB
     (Entra authentication), this property is optional; it is needed to support configuration of
     directory- and file-level permissions via Windows File Explorer, but is not required for
     authentication.
    :vartype domain_guid: str
    :ivar domain_sid: Specifies the security identifier (SID) of the AD domain. If
     directoryServiceOptions is set to AD (AD DS authentication), this property is required.
     Otherwise, it can be omitted.
    :vartype domain_sid: str
    :ivar azure_storage_sid: Specifies the security identifier (SID) for Azure Storage. If
     directoryServiceOptions is set to AD (AD DS authentication), this property is required.
     Otherwise, it can be omitted.
    :vartype azure_storage_sid: str
    :ivar sam_account_name: Specifies the Active Directory SAMAccountName for Azure Storage. If
     directoryServiceOptions is set to AD (AD DS authentication), this property is optional. If
     provided, accountType should also be provided. For directoryServiceOptions AADDS (Entra DS
     authentication) or AADKERB (Entra authentication), this property can be omitted.
    :vartype sam_account_name: str
    :ivar account_type: Specifies the Active Directory account type for Azure Storage. If
     directoryServiceOptions is set to AD (AD DS authentication), this property is optional. If
     provided, samAccountName should also be provided. For directoryServiceOptions AADDS (Entra DS
     authentication) or AADKERB (Entra authentication), this property can be omitted. Known values
     are: "User" and "Computer".
    :vartype account_type: str or ~azure.mgmt.storage.models.AccountType
    """

    domain_name: Optional[str] = rest_field(
        name="domainName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the primary domain that the AD DNS server is authoritative for. This property is
     required if directoryServiceOptions is set to AD (AD DS authentication). If
     directoryServiceOptions is set to AADDS (Entra DS authentication), providing this property is
     optional, as it will be inferred automatically if omitted. If directoryServiceOptions is set to
     AADKERB (Entra authentication), this property is optional; it is needed to support
     configuration of directory- and file-level permissions via Windows File Explorer, but is not
     required for authentication."""
    net_bios_domain_name: Optional[str] = rest_field(
        name="netBiosDomainName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the NetBIOS domain name. If directoryServiceOptions is set to AD (AD DS
     authentication), this property is required. Otherwise, it can be omitted."""
    forest_name: Optional[str] = rest_field(
        name="forestName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Active Directory forest to get. If directoryServiceOptions is set to AD (AD DS
     authentication), this property is required. Otherwise, it can be omitted."""
    domain_guid: Optional[str] = rest_field(
        name="domainGuid", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the domain GUID. If directoryServiceOptions is set to AD (AD DS authentication), this
     property is required. If directoryServiceOptions is set to AADDS (Entra DS authentication),
     this property can be omitted. If directoryServiceOptions is set to AADKERB (Entra
     authentication), this property is optional; it is needed to support configuration of directory-
     and file-level permissions via Windows File Explorer, but is not required for authentication."""
    domain_sid: Optional[str] = rest_field(name="domainSid", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the security identifier (SID) of the AD domain. If directoryServiceOptions is set to
     AD (AD DS authentication), this property is required. Otherwise, it can be omitted."""
    azure_storage_sid: Optional[str] = rest_field(
        name="azureStorageSid", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the security identifier (SID) for Azure Storage. If directoryServiceOptions is set to
     AD (AD DS authentication), this property is required. Otherwise, it can be omitted."""
    sam_account_name: Optional[str] = rest_field(
        name="samAccountName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Active Directory SAMAccountName for Azure Storage. If directoryServiceOptions is
     set to AD (AD DS authentication), this property is optional. If provided, accountType should
     also be provided. For directoryServiceOptions AADDS (Entra DS authentication) or AADKERB (Entra
     authentication), this property can be omitted."""
    account_type: Optional[Union[str, "_models.AccountType"]] = rest_field(
        name="accountType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the Active Directory account type for Azure Storage. If directoryServiceOptions is
     set to AD (AD DS authentication), this property is optional. If provided, samAccountName should
     also be provided. For directoryServiceOptions AADDS (Entra DS authentication) or AADKERB (Entra
     authentication), this property can be omitted. Known values are: \"User\" and \"Computer\"."""

    @overload
    def __init__(
        self,
        *,
        domain_name: Optional[str] = None,
        net_bios_domain_name: Optional[str] = None,
        forest_name: Optional[str] = None,
        domain_guid: Optional[str] = None,
        domain_sid: Optional[str] = None,
        azure_storage_sid: Optional[str] = None,
        sam_account_name: Optional[str] = None,
        account_type: Optional[Union[str, "_models.AccountType"]] = None,
    ) -> None: ...

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

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


class ResourceAutoGenerated(_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.storage.models.SystemData
    """

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


class ProxyResource(ResourceAutoGenerated):
    """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.storage.models.SystemData
    """


class AdvancedPlatformMetricsRule(ProxyResource):
    """The advanced platform metrics rule for the storage account.

    :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.storage.models.SystemData
    :ivar properties: Returns the advanced platform metrics rule.
    :vartype properties: ~azure.mgmt.storage.models.AdvancedPlatformMetricsRuleProperties
    """

    properties: Optional["_models.AdvancedPlatformMetricsRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Returns the advanced platform metrics rule."""

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

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

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


class AdvancedPlatformMetricsRuleConfig(_Model):
    """Configuration for the advanced platform metrics rule.

    :ivar filter_type: The type of filter applied to the rule. Possible values include:
     AllContainersFilter, ContainerPrefixFilter, ContainerListFilter. Known values are:
     "AllContainersFilter", "ContainerPrefixFilter", and "ContainerListFilter".
    :vartype filter_type: str or ~azure.mgmt.storage.models.AdvancedPlatformMetricsFilterType
    :ivar filter_values: The values for the filter applied to the rule. If filter type is
     AllContainersFilter, filter values should be empty. If filter type is ContainerPrefixFilter,
     filter values should contain a list of container prefixes. If filter type is
     ContainerListFilter, filter values should contain a list of container names.
    :vartype filter_values: list[str]
    """

    filter_type: Optional[Union[str, "_models.AdvancedPlatformMetricsFilterType"]] = rest_field(
        name="filterType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of filter applied to the rule. Possible values include: AllContainersFilter,
     ContainerPrefixFilter, ContainerListFilter. Known values are: \"AllContainersFilter\",
     \"ContainerPrefixFilter\", and \"ContainerListFilter\"."""
    filter_values: Optional[list[str]] = rest_field(
        name="filterValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The values for the filter applied to the rule. If filter type is AllContainersFilter, filter
     values should be empty. If filter type is ContainerPrefixFilter, filter values should contain a
     list of container prefixes. If filter type is ContainerListFilter, filter values should contain
     a list of container names."""

    @overload
    def __init__(
        self,
        *,
        filter_type: Optional[Union[str, "_models.AdvancedPlatformMetricsFilterType"]] = None,
        filter_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 AdvancedPlatformMetricsRuleProperties(_Model):
    """An object that defines the advanced platform metrics rule.

    :ivar rule_type: Indicates the type of the advanced platform metrics rule. Possible values
     include: ContainerLevelCapacityMetrics. "ContainerLevelCapacityMetrics"
    :vartype rule_type: str or ~azure.mgmt.storage.models.AdvancedPlatformMetricsRuleType
    :ivar enabled: A boolean flag which enables the advanced platform metrics rule. Required.
    :vartype enabled: bool
    :ivar last_modified_time: Gets the last modification date and time of the advanced platform
     metrics rule in UTC.
    :vartype last_modified_time: ~datetime.datetime
    :ivar metrics_emitted: The metrics emitted by the rule. Metrics are mapped according to the
     rule type from RuleTypeProperty. Rule type to metrics mapping: ContainerLevelCapacityMetrics =>
     {ContainerUsedSize, ContainerBlobCount}.
    :vartype metrics_emitted: list[str or ~azure.mgmt.storage.models.MetricsEmitted]
    :ivar rule_config: Configuration for the advanced platform metrics rule. Required.
    :vartype rule_config: ~azure.mgmt.storage.models.AdvancedPlatformMetricsRuleConfig
    """

    rule_type: Optional[Union[str, "_models.AdvancedPlatformMetricsRuleType"]] = rest_field(
        name="ruleType", visibility=["read"]
    )
    """Indicates the type of the advanced platform metrics rule. Possible values include:
     ContainerLevelCapacityMetrics. \"ContainerLevelCapacityMetrics\""""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A boolean flag which enables the advanced platform metrics rule. Required."""
    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Gets the last modification date and time of the advanced platform metrics rule in UTC."""
    metrics_emitted: Optional[list[Union[str, "_models.MetricsEmitted"]]] = rest_field(
        name="metricsEmitted", visibility=["read"]
    )
    """The metrics emitted by the rule. Metrics are mapped according to the rule type from
     RuleTypeProperty. Rule type to metrics mapping: ContainerLevelCapacityMetrics =>
     {ContainerUsedSize, ContainerBlobCount}."""
    rule_config: "_models.AdvancedPlatformMetricsRuleConfig" = rest_field(
        name="ruleConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration for the advanced platform metrics rule. Required."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        rule_config: "_models.AdvancedPlatformMetricsRuleConfig",
    ) -> None: ...

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

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


class AzureEntityResource(ResourceAutoGenerated):
    """Entity 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.storage.models.SystemData
    :ivar etag: Resource Etag.
    :vartype etag: str
    """

    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""


class AzureFilesIdentityBasedAuthentication(_Model):
    """Settings for Azure Files identity based authentication.

    :ivar directory_service_options: Indicates the directory service used. Note that this enum may
     be extended in the future. Required. Known values are: "None", "AADDS", "AD", and "AADKERB".
    :vartype directory_service_options: str or ~azure.mgmt.storage.models.DirectoryServiceOptions
    :ivar active_directory_properties: Additional information about the directory service. Required
     if directoryServiceOptions is AD (AD DS authentication). Optional for directoryServiceOptions
     AADDS (Entra DS authentication) and AADKERB (Entra authentication).
    :vartype active_directory_properties: ~azure.mgmt.storage.models.ActiveDirectoryProperties
    :ivar default_share_permission: Default share permission for users using Kerberos
     authentication if RBAC role is not assigned. Known values are: "None",
     "StorageFileDataSmbShareReader", "StorageFileDataSmbShareContributor", and
     "StorageFileDataSmbShareElevatedContributor".
    :vartype default_share_permission: str or ~azure.mgmt.storage.models.DefaultSharePermission
    :ivar smb_o_auth_settings: Required for Managed Identities access using OAuth over SMB.
    :vartype smb_o_auth_settings: ~azure.mgmt.storage.models.SmbOAuthSettings
    """

    directory_service_options: Union[str, "_models.DirectoryServiceOptions"] = rest_field(
        name="directoryServiceOptions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the directory service used. Note that this enum may be extended in the future.
     Required. Known values are: \"None\", \"AADDS\", \"AD\", and \"AADKERB\"."""
    active_directory_properties: Optional["_models.ActiveDirectoryProperties"] = rest_field(
        name="activeDirectoryProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional information about the directory service. Required if directoryServiceOptions is AD
     (AD DS authentication). Optional for directoryServiceOptions AADDS (Entra DS authentication)
     and AADKERB (Entra authentication)."""
    default_share_permission: Optional[Union[str, "_models.DefaultSharePermission"]] = rest_field(
        name="defaultSharePermission", visibility=["read", "create", "update", "delete", "query"]
    )
    """Default share permission for users using Kerberos authentication if RBAC role is not assigned.
     Known values are: \"None\", \"StorageFileDataSmbShareReader\",
     \"StorageFileDataSmbShareContributor\", and \"StorageFileDataSmbShareElevatedContributor\"."""
    smb_o_auth_settings: Optional["_models.SmbOAuthSettings"] = rest_field(
        name="smbOAuthSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required for Managed Identities access using OAuth over SMB."""

    @overload
    def __init__(
        self,
        *,
        directory_service_options: Union[str, "_models.DirectoryServiceOptions"],
        active_directory_properties: Optional["_models.ActiveDirectoryProperties"] = None,
        default_share_permission: Optional[Union[str, "_models.DefaultSharePermission"]] = None,
        smb_o_auth_settings: Optional["_models.SmbOAuthSettings"] = None,
    ) -> None: ...

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

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


class BlobContainer(ProxyResource):
    """Properties of the blob container, including Id, resource name, resource type, Etag.

    :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.storage.models.SystemData
    :ivar container_properties: Properties of the blob container.
    :vartype container_properties: ~azure.mgmt.storage.models.ContainerProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    """

    container_properties: Optional["_models.ContainerProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the blob container."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""

    __flattened_items = [
        "version",
        "deleted",
        "deleted_time",
        "remaining_retention_days",
        "default_encryption_scope",
        "deny_encryption_scope_override",
        "public_access",
        "last_modified_time",
        "lease_status",
        "lease_state",
        "lease_duration",
        "metadata",
        "immutability_policy",
        "legal_hold",
        "has_legal_hold",
        "has_immutability_policy",
        "immutable_storage_with_versioning",
        "enable_nfs_v3_root_squash",
        "enable_nfs_v3_all_squash",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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.container_properties is None:
                return None
            return getattr(self.container_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.container_properties is None:
                self.container_properties = self._attr_to_rest_field["container_properties"]._class_type()
            setattr(self.container_properties, key, value)
        else:
            super().__setattr__(key, value)


class BlobInventoryCreationTime(_Model):
    """This property defines the creation time based filtering condition. Blob Inventory schema
    parameter 'Creation-Time' is mandatory with this filter.

    :ivar last_n_days: When set the policy filters the objects that are created in the last N days.
     Where N is an integer value between 1 to 36500.
    :vartype last_n_days: int
    """

    last_n_days: Optional[int] = rest_field(
        name="lastNDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """When set the policy filters the objects that are created in the last N days. Where N is an
     integer value between 1 to 36500."""

    @overload
    def __init__(
        self,
        *,
        last_n_days: 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 BlobInventoryPolicy(ProxyResource):
    """The storage account blob inventory policy.

    :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.storage.models.SystemData
    :ivar properties: Returns the storage account blob inventory policy rules.
    :vartype properties: ~azure.mgmt.storage.models.BlobInventoryPolicyProperties
    """

    properties: Optional["_models.BlobInventoryPolicyProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Returns the storage account blob inventory policy rules."""

    __flattened_items = ["last_modified_time", "policy"]

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

    @overload
    def __init__(self, mapping: Mapping[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 BlobInventoryPolicyDefinition(_Model):
    """An object that defines the blob inventory rule.

    :ivar filters: An object that defines the filter set.
    :vartype filters: ~azure.mgmt.storage.models.BlobInventoryPolicyFilter
    :ivar format: This is a required field, it specifies the format for the inventory files.
     Required. Known values are: "Csv" and "Parquet".
    :vartype format: str or ~azure.mgmt.storage.models.Format
    :ivar schedule: This is a required field. This field is used to schedule an inventory
     formation. Required. Known values are: "Daily" and "Weekly".
    :vartype schedule: str or ~azure.mgmt.storage.models.Schedule
    :ivar object_type: This is a required field. This field specifies the scope of the inventory
     created either at the blob or container level. Required. Known values are: "Blob" and
     "Container".
    :vartype object_type: str or ~azure.mgmt.storage.models.ObjectType
    :ivar schema_fields: This is a required field. This field specifies the fields and properties
     of the object to be included in the inventory. The Schema field value 'Name' is always
     required. The valid values for this field for the 'Blob' definition.objectType include 'Name,
     Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier,
     AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group,
     Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag,
     ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition,
     LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime,
     RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId,
     CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription,
     CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber,
     EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value
     'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container'
     definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState,
     LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope,
     DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version,
     DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner,
     Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field
     values 'Tags, TagCount' are only valid for Non-Hns accounts. Required.
    :vartype schema_fields: list[str]
    """

    filters: Optional["_models.BlobInventoryPolicyFilter"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An object that defines the filter set."""
    format: Union[str, "_models.Format"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is a required field, it specifies the format for the inventory files. Required. Known
     values are: \"Csv\" and \"Parquet\"."""
    schedule: Union[str, "_models.Schedule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is a required field. This field is used to schedule an inventory formation. Required.
     Known values are: \"Daily\" and \"Weekly\"."""
    object_type: Union[str, "_models.ObjectType"] = rest_field(
        name="objectType", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is a required field. This field specifies the scope of the inventory created either at the
     blob or container level. Required. Known values are: \"Blob\" and \"Container\"."""
    schema_fields: list[str] = rest_field(
        name="schemaFields", visibility=["read", "create", "update", "delete", "query"]
    )
    """This is a required field. This field specifies the fields and properties of the object to be
     included in the inventory. The Schema field value 'Name' is always required. The valid values
     for this field for the 'Blob' definition.objectType include 'Name, Creation-Time,
     Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime,
     AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot,
     VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType,
     ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus,
     LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime,
     RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId,
     CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription,
     CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber,
     EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value
     'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container'
     definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState,
     LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope,
     DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version,
     DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner,
     Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field
     values 'Tags, TagCount' are only valid for Non-Hns accounts. Required."""

    @overload
    def __init__(
        self,
        *,
        format: Union[str, "_models.Format"],
        schedule: Union[str, "_models.Schedule"],
        object_type: Union[str, "_models.ObjectType"],
        schema_fields: list[str],
        filters: Optional["_models.BlobInventoryPolicyFilter"] = None,
    ) -> None: ...

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

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


class BlobInventoryPolicyFilter(_Model):
    """An object that defines the blob inventory rule filter conditions. For 'Blob'
    definition.objectType all filter properties are applicable, 'blobTypes' is required and others
    are optional. For 'Container' definition.objectType only prefixMatch is applicable and is
    optional.

    :ivar prefix_match: An array of strings with maximum 10 blob prefixes to be included in the
     inventory.
    :vartype prefix_match: list[str]
    :ivar exclude_prefix: An array of strings with maximum 10 blob prefixes to be excluded from the
     inventory.
    :vartype exclude_prefix: list[str]
    :ivar blob_types: An array of predefined enum values. Valid values include blockBlob,
     appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when
     definition.objectType property is set to 'Blob'.
    :vartype blob_types: list[str]
    :ivar include_blob_versions: Includes blob versions in blob inventory when value is set to
     true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this
     property is set to true, else they must be excluded.
    :vartype include_blob_versions: bool
    :ivar include_snapshots: Includes blob snapshots in blob inventory when value is set to true.
     The definition.schemaFields value 'Snapshot' is required if this property is set to true, else
     it must be excluded.
    :vartype include_snapshots: bool
    :ivar include_deleted: For 'Container' definition.objectType the definition.schemaFields must
     include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob'
     definition.objectType and HNS enabled storage accounts the definition.schemaFields must include
     'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the
     definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be
     excluded.
    :vartype include_deleted: bool
    :ivar creation_time: This property is used to filter objects based on the object creation time.
    :vartype creation_time: ~azure.mgmt.storage.models.BlobInventoryCreationTime
    """

    prefix_match: Optional[list[str]] = rest_field(
        name="prefixMatch", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of strings with maximum 10 blob prefixes to be included in the inventory."""
    exclude_prefix: Optional[list[str]] = rest_field(
        name="excludePrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of strings with maximum 10 blob prefixes to be excluded from the inventory."""
    blob_types: Optional[list[str]] = rest_field(
        name="blobTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns
     accounts does not support pageBlobs. This field is required when definition.objectType property
     is set to 'Blob'."""
    include_blob_versions: Optional[bool] = rest_field(
        name="includeBlobVersions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Includes blob versions in blob inventory when value is set to true. The definition.schemaFields
     values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they
     must be excluded."""
    include_snapshots: Optional[bool] = rest_field(
        name="includeSnapshots", visibility=["read", "create", "update", "delete", "query"]
    )
    """Includes blob snapshots in blob inventory when value is set to true. The
     definition.schemaFields value 'Snapshot' is required if this property is set to true, else it
     must be excluded."""
    include_deleted: Optional[bool] = rest_field(
        name="includeDeleted", visibility=["read", "create", "update", "delete", "query"]
    )
    """For 'Container' definition.objectType the definition.schemaFields must include 'Deleted,
     Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS
     enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted,
     DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the
     definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be
     excluded."""
    creation_time: Optional["_models.BlobInventoryCreationTime"] = rest_field(
        name="creationTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property is used to filter objects based on the object creation time."""

    @overload
    def __init__(
        self,
        *,
        prefix_match: Optional[list[str]] = None,
        exclude_prefix: Optional[list[str]] = None,
        blob_types: Optional[list[str]] = None,
        include_blob_versions: Optional[bool] = None,
        include_snapshots: Optional[bool] = None,
        include_deleted: Optional[bool] = None,
        creation_time: Optional["_models.BlobInventoryCreationTime"] = None,
    ) -> None: ...

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

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


class BlobInventoryPolicyProperties(_Model):
    """The storage account blob inventory policy properties.

    :ivar last_modified_time: Returns the last modified date and time of the blob inventory policy.
    :vartype last_modified_time: ~datetime.datetime
    :ivar policy: The storage account blob inventory policy object. It is composed of policy rules.
     Required.
    :vartype policy: ~azure.mgmt.storage.models.BlobInventoryPolicySchema
    """

    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Returns the last modified date and time of the blob inventory policy."""
    policy: "_models.BlobInventoryPolicySchema" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The storage account blob inventory policy object. It is composed of policy rules. Required."""

    @overload
    def __init__(
        self,
        *,
        policy: "_models.BlobInventoryPolicySchema",
    ) -> None: ...

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

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


class BlobInventoryPolicyRule(_Model):
    """An object that wraps the blob inventory rule. Each rule is uniquely defined by name.

    :ivar enabled: Rule is enabled when set to true. Required.
    :vartype enabled: bool
    :ivar name: A rule name can contain any combination of alpha numeric characters. Rule name is
     case-sensitive. It must be unique within a policy. Required.
    :vartype name: str
    :ivar destination: Container name where blob inventory files are stored. Must be pre-created.
     Required.
    :vartype destination: str
    :ivar definition: An object that defines the blob inventory policy rule. Required.
    :vartype definition: ~azure.mgmt.storage.models.BlobInventoryPolicyDefinition
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Rule is enabled when set to true. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A rule name can contain any combination of alpha numeric characters. Rule name is
     case-sensitive. It must be unique within a policy. Required."""
    destination: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container name where blob inventory files are stored. Must be pre-created. Required."""
    definition: "_models.BlobInventoryPolicyDefinition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An object that defines the blob inventory policy rule. Required."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        name: str,
        destination: str,
        definition: "_models.BlobInventoryPolicyDefinition",
    ) -> None: ...

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

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


class BlobInventoryPolicySchema(_Model):
    """The storage account blob inventory policy rules.

    :ivar enabled: Policy is enabled if set to true. Required.
    :vartype enabled: bool
    :ivar destination: Deprecated Property from API version 2021-04-01 onwards, the required
     destination container name must be specified at the rule level 'policy.rule.destination'.
    :vartype destination: str
    :ivar type: The valid value is Inventory. Required. "Inventory"
    :vartype type: str or ~azure.mgmt.storage.models.InventoryRuleType
    :ivar rules: The storage account blob inventory policy rules. The rule is applied when it is
     enabled. Required.
    :vartype rules: list[~azure.mgmt.storage.models.BlobInventoryPolicyRule]
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Policy is enabled if set to true. Required."""
    destination: Optional[str] = rest_field(visibility=["read"])
    """Deprecated Property from API version 2021-04-01 onwards, the required destination container
     name must be specified at the rule level 'policy.rule.destination'."""
    type: Union[str, "_models.InventoryRuleType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The valid value is Inventory. Required. \"Inventory\""""
    rules: list["_models.BlobInventoryPolicyRule"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage account blob inventory policy rules. The rule is applied when it is enabled.
     Required."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        type: Union[str, "_models.InventoryRuleType"],
        rules: list["_models.BlobInventoryPolicyRule"],
    ) -> None: ...

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

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


class BlobRestoreParameters(_Model):
    """Blob restore parameters.

    :ivar time_to_restore: Restore blob to the specified time. Required.
    :vartype time_to_restore: ~datetime.datetime
    :ivar blob_ranges: Blob ranges to restore. Required.
    :vartype blob_ranges: list[~azure.mgmt.storage.models.BlobRestoreRange]
    """

    time_to_restore: datetime.datetime = rest_field(
        name="timeToRestore", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Restore blob to the specified time. Required."""
    blob_ranges: list["_models.BlobRestoreRange"] = rest_field(
        name="blobRanges", visibility=["read", "create", "update", "delete", "query"]
    )
    """Blob ranges to restore. Required."""

    @overload
    def __init__(
        self,
        *,
        time_to_restore: datetime.datetime,
        blob_ranges: list["_models.BlobRestoreRange"],
    ) -> None: ...

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

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


class BlobRestoreRange(_Model):
    """Blob range.

    :ivar start_range: Blob start range. This is inclusive. Empty means account start. Required.
    :vartype start_range: str
    :ivar end_range: Blob end range. This is exclusive. Empty means account end. Required.
    :vartype end_range: str
    """

    start_range: str = rest_field(name="startRange", visibility=["read", "create", "update", "delete", "query"])
    """Blob start range. This is inclusive. Empty means account start. Required."""
    end_range: str = rest_field(name="endRange", visibility=["read", "create", "update", "delete", "query"])
    """Blob end range. This is exclusive. Empty means account end. Required."""

    @overload
    def __init__(
        self,
        *,
        start_range: str,
        end_range: 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 BlobRestoreStatus(_Model):
    """Blob restore status.

    :ivar status: The status of blob restore progress. Possible values are: - InProgress: Indicates
     that blob restore is ongoing. - Complete: Indicates that blob restore has been completed
     successfully. - Failed: Indicates that blob restore is failed. Known values are: "InProgress",
     "Complete", and "Failed".
    :vartype status: str or ~azure.mgmt.storage.models.BlobRestoreProgressStatus
    :ivar failure_reason: Failure reason when blob restore is failed.
    :vartype failure_reason: str
    :ivar restore_id: Id for tracking blob restore request.
    :vartype restore_id: str
    :ivar parameters: Blob restore request parameters.
    :vartype parameters: ~azure.mgmt.storage.models.BlobRestoreParameters
    """

    status: Optional[Union[str, "_models.BlobRestoreProgressStatus"]] = rest_field(visibility=["read"])
    """The status of blob restore progress. Possible values are: - InProgress: Indicates that blob
     restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. -
     Failed: Indicates that blob restore is failed. Known values are: \"InProgress\", \"Complete\",
     and \"Failed\"."""
    failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"])
    """Failure reason when blob restore is failed."""
    restore_id: Optional[str] = rest_field(name="restoreId", visibility=["read"])
    """Id for tracking blob restore request."""
    parameters: Optional["_models.BlobRestoreParameters"] = rest_field(visibility=["read"])
    """Blob restore request parameters."""


class BlobServiceProperties(ProxyResource):
    """The properties of a storage account’s Blob service.

    :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.storage.models.SystemData
    :ivar blob_service_properties: The properties of a storage account’s Blob service.
    :vartype blob_service_properties: ~azure.mgmt.storage.models.BlobServicePropertiesProperties
    :ivar sku: Sku name and tier.
    :vartype sku: ~azure.mgmt.storage.models.Sku
    """

    blob_service_properties: Optional["_models.BlobServicePropertiesProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of a storage account’s Blob service."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read"])
    """Sku name and tier."""

    __flattened_items = [
        "cors",
        "default_service_version",
        "delete_retention_policy",
        "static_website",
        "is_versioning_enabled",
        "automatic_snapshot_policy_enabled",
        "change_feed",
        "restore_policy",
        "container_delete_retention_policy",
        "last_access_time_tracking_policy",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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.blob_service_properties is None:
                return None
            return getattr(self.blob_service_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.blob_service_properties is None:
                self.blob_service_properties = self._attr_to_rest_field["blob_service_properties"]._class_type()
            setattr(self.blob_service_properties, key, value)
        else:
            super().__setattr__(key, value)


class BlobServicePropertiesProperties(_Model):
    """The properties of a storage account’s Blob service.

    :ivar cors: Specifies CORS rules for the Blob service. You can include up to five CorsRule
     elements in the request. If no CorsRule elements are included in the request body, all CORS
     rules will be deleted, and CORS will be disabled for the Blob service.
    :vartype cors: ~azure.mgmt.storage.models.CorsRules
    :ivar default_service_version: DefaultServiceVersion indicates the default version to use for
     requests to the Blob service if an incoming request’s version is not specified. Possible values
     include version 2008-10-27 and all more recent versions.
    :vartype default_service_version: str
    :ivar delete_retention_policy: The blob service properties for blob soft delete.
    :vartype delete_retention_policy: ~azure.mgmt.storage.models.DeleteRetentionPolicy
    :ivar static_website: The static website properties for blob storage.
    :vartype static_website: ~azure.mgmt.storage.models.StaticWebsite
    :ivar is_versioning_enabled: Versioning is enabled if set to true.
    :vartype is_versioning_enabled: bool
    :ivar automatic_snapshot_policy_enabled: Deprecated in favor of isVersioningEnabled property.
    :vartype automatic_snapshot_policy_enabled: bool
    :ivar change_feed: The blob service properties for change feed events.
    :vartype change_feed: ~azure.mgmt.storage.models.ChangeFeed
    :ivar restore_policy: The blob service properties for blob restore policy.
    :vartype restore_policy: ~azure.mgmt.storage.models.RestorePolicyProperties
    :ivar container_delete_retention_policy: The blob service properties for container soft delete.
    :vartype container_delete_retention_policy: ~azure.mgmt.storage.models.DeleteRetentionPolicy
    :ivar last_access_time_tracking_policy: The blob service property to configure last access time
     based tracking policy.
    :vartype last_access_time_tracking_policy:
     ~azure.mgmt.storage.models.LastAccessTimeTrackingPolicy
    """

    cors: Optional["_models.CorsRules"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the
     request. If no CorsRule elements are included in the request body, all CORS rules will be
     deleted, and CORS will be disabled for the Blob service."""
    default_service_version: Optional[str] = rest_field(
        name="defaultServiceVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """DefaultServiceVersion indicates the default version to use for requests to the Blob service if
     an incoming request’s version is not specified. Possible values include version 2008-10-27 and
     all more recent versions."""
    delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = rest_field(
        name="deleteRetentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob service properties for blob soft delete."""
    static_website: Optional["_models.StaticWebsite"] = rest_field(
        name="staticWebsite", visibility=["read", "create", "update", "delete", "query"]
    )
    """The static website properties for blob storage."""
    is_versioning_enabled: Optional[bool] = rest_field(
        name="isVersioningEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Versioning is enabled if set to true."""
    automatic_snapshot_policy_enabled: Optional[bool] = rest_field(
        name="automaticSnapshotPolicyEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Deprecated in favor of isVersioningEnabled property."""
    change_feed: Optional["_models.ChangeFeed"] = rest_field(
        name="changeFeed", visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob service properties for change feed events."""
    restore_policy: Optional["_models.RestorePolicyProperties"] = rest_field(
        name="restorePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob service properties for blob restore policy."""
    container_delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = rest_field(
        name="containerDeleteRetentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob service properties for container soft delete."""
    last_access_time_tracking_policy: Optional["_models.LastAccessTimeTrackingPolicy"] = rest_field(
        name="lastAccessTimeTrackingPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob service property to configure last access time based tracking policy."""

    @overload
    def __init__(
        self,
        *,
        cors: Optional["_models.CorsRules"] = None,
        default_service_version: Optional[str] = None,
        delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = None,
        static_website: Optional["_models.StaticWebsite"] = None,
        is_versioning_enabled: Optional[bool] = None,
        automatic_snapshot_policy_enabled: Optional[bool] = None,
        change_feed: Optional["_models.ChangeFeed"] = None,
        restore_policy: Optional["_models.RestorePolicyProperties"] = None,
        container_delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = None,
        last_access_time_tracking_policy: Optional["_models.LastAccessTimeTrackingPolicy"] = None,
    ) -> None: ...

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

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


class BurstingConstants(_Model):
    """Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a
    file share in the storage account.

    :ivar burst_floor_iops: The guaranteed floor of burst IOPS for small file shares.
    :vartype burst_floor_iops: int
    :ivar burst_io_scalar: The scalar against provisioned IOPS in the file share included burst
     IOPS formula.
    :vartype burst_io_scalar: float
    :ivar burst_timeframe_seconds: The time frame for bursting in seconds in the file share maximum
     burst credits for IOPS formula.
    :vartype burst_timeframe_seconds: int
    """

    burst_floor_iops: Optional[int] = rest_field(name="burstFloorIOPS", visibility=["read"])
    """The guaranteed floor of burst IOPS for small file shares."""
    burst_io_scalar: Optional[float] = rest_field(name="burstIOScalar", visibility=["read"])
    """The scalar against provisioned IOPS in the file share included burst IOPS formula."""
    burst_timeframe_seconds: Optional[int] = rest_field(name="burstTimeframeSeconds", visibility=["read"])
    """The time frame for bursting in seconds in the file share maximum burst credits for IOPS
     formula."""


class ChangeFeed(_Model):
    """The blob service properties for change feed events.

    :ivar enabled: Indicates whether change feed event logging is enabled for the Blob service.
    :vartype enabled: bool
    :ivar retention_in_days: Indicates the duration of changeFeed retention in days. Minimum value
     is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite
     retention of the change feed.
    :vartype retention_in_days: int
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether change feed event logging is enabled for the Blob service."""
    retention_in_days: Optional[int] = rest_field(
        name="retentionInDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum
     value is 146000 days (400 years). A null value indicates an infinite retention of the change
     feed."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        retention_in_days: 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 CheckNameAvailabilityResult(_Model):
    """The CheckNameAvailability operation response.

    :ivar name_available: Gets a boolean value that indicates whether the name is available for you
     to use. If true, the name is available. If false, the name has already been taken or is invalid
     and cannot be used.
    :vartype name_available: bool
    :ivar reason: Gets the reason that a storage account name could not be used. The Reason element
     is only returned if NameAvailable is false. Known values are: "AccountNameInvalid" and
     "AlreadyExists".
    :vartype reason: str or ~azure.mgmt.storage.models.Reason
    :ivar message: Gets an error message explaining the Reason value in more detail.
    :vartype message: str
    """

    name_available: Optional[bool] = rest_field(name="nameAvailable", visibility=["read"])
    """Gets a boolean value that indicates whether the name is available for you to use. If true, the
     name is available. If false, the name has already been taken or is invalid and cannot be used."""
    reason: Optional[Union[str, "_models.Reason"]] = rest_field(visibility=["read"])
    """Gets the reason that a storage account name could not be used. The Reason element is only
     returned if NameAvailable is false. Known values are: \"AccountNameInvalid\" and
     \"AlreadyExists\"."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Gets an error message explaining the Reason value in more detail."""


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

    :ivar error: An error response from the Storage service.
    :vartype error: ~azure.mgmt.storage.models.CloudErrorBody
    """

    error: Optional["_models.CloudErrorBody"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An error response from the Storage service."""

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

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

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


class CloudErrorBody(_Model):
    """An error response from the Storage service.

    :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed
     programmatically.
    :vartype code: str
    :ivar message: A message describing the error, intended to be suitable for display in a user
     interface.
    :vartype message: str
    :ivar target: The target of the particular error. For example, the name of the property in
     error.
    :vartype target: str
    :ivar details: A list of additional details about the error.
    :vartype details: list[~azure.mgmt.storage.models.CloudErrorBody]
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier for the error. Codes are invariant and are intended to be consumed
     programmatically."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A message describing the error, intended to be suitable for display in a user interface."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error. For example, the name of the property in error."""
    details: Optional[list["_models.CloudErrorBody"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of additional details about the error."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        target: Optional[str] = None,
        details: Optional[list["_models.CloudErrorBody"]] = None,
    ) -> None: ...

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

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


class TrackedResource(ResourceAutoGenerated):
    """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.storage.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 Connector(TrackedResource):
    """A Connector is a tracked ARM resource modeled as a sub-resource of a Storage Account.

    :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.storage.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 properties of the Storage Connector. Required.
    :vartype properties: ~azure.mgmt.storage.models.StorageConnectorProperties
    """

    properties: "_models.StorageConnectorProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the Storage Connector. Required."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.StorageConnectorProperties",
        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 TrackedResourceUpdate(ResourceAutoGenerated):
    """The resource model definition for an Azure Resource Manager tracked top level resource which
    has 'tags' and a 'location'.

    :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.storage.models.SystemData
    :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 ConnectorUpdate(TrackedResourceUpdate):
    """A Connector is a tracked ARM resource modeled as a sub-resource of a Storage Account.

    :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.storage.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The properties of the Storage Connector.
    :vartype properties: ~azure.mgmt.storage.models.StorageConnectorPropertiesUpdate
    """

    properties: Optional["_models.StorageConnectorPropertiesUpdate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the Storage Connector."""

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

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

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


class ContainerProperties(_Model):
    """The properties of a container.

    :ivar version: The version of the deleted blob container.
    :vartype version: str
    :ivar deleted: Indicates whether the blob container was deleted.
    :vartype deleted: bool
    :ivar deleted_time: Blob container deletion time.
    :vartype deleted_time: ~datetime.datetime
    :ivar remaining_retention_days: Remaining retention days for soft deleted blob container.
    :vartype remaining_retention_days: int
    :ivar default_encryption_scope: Default the container to use specified encryption scope for all
     writes.
    :vartype default_encryption_scope: str
    :ivar deny_encryption_scope_override: Block override of encryption scope from the container
     default.
    :vartype deny_encryption_scope_override: bool
    :ivar public_access: Specifies whether data in the container may be accessed publicly and the
     level of access. Known values are: "Container", "Blob", and "None".
    :vartype public_access: str or ~azure.mgmt.storage.models.PublicAccess
    :ivar last_modified_time: Returns the date and time the container was last modified.
    :vartype last_modified_time: ~datetime.datetime
    :ivar lease_status: The lease status of the container. Known values are: "Locked" and
     "Unlocked".
    :vartype lease_status: str or ~azure.mgmt.storage.models.LeaseStatus
    :ivar lease_state: Lease state of the container. Known values are: "Available", "Leased",
     "Expired", "Breaking", and "Broken".
    :vartype lease_state: str or ~azure.mgmt.storage.models.LeaseState
    :ivar lease_duration: Specifies whether the lease on a container is of infinite or fixed
     duration, only when the container is leased. Known values are: "Infinite" and "Fixed".
    :vartype lease_duration: str or ~azure.mgmt.storage.models.LeaseDuration
    :ivar metadata: A name-value pair to associate with the container as metadata.
    :vartype metadata: dict[str, str]
    :ivar immutability_policy: The ImmutabilityPolicy property of the container.
    :vartype immutability_policy: ~azure.mgmt.storage.models.ImmutabilityPolicyProperties
    :ivar legal_hold: The LegalHold property of the container.
    :vartype legal_hold: ~azure.mgmt.storage.models.LegalHoldProperties
    :ivar has_legal_hold: The hasLegalHold public property is set to true by SRP if there are at
     least one existing tag. The hasLegalHold public property is set to false by SRP if all existing
     legal hold tags are cleared out. There can be a maximum of 1000 blob containers with
     hasLegalHold=true for a given account.
    :vartype has_legal_hold: bool
    :ivar has_immutability_policy: The hasImmutabilityPolicy public property is set to true by SRP
     if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public
     property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
    :vartype has_immutability_policy: bool
    :ivar immutable_storage_with_versioning: The object level immutability property of the
     container. The property is immutable and can only be set to true at the container creation
     time. Existing containers must undergo a migration process.
    :vartype immutable_storage_with_versioning:
     ~azure.mgmt.storage.models.ImmutableStorageWithVersioning
    :ivar enable_nfs_v3_root_squash: Enable NFSv3 root squash on blob container.
    :vartype enable_nfs_v3_root_squash: bool
    :ivar enable_nfs_v3_all_squash: Enable NFSv3 all squash on blob container.
    :vartype enable_nfs_v3_all_squash: bool
    """

    version: Optional[str] = rest_field(visibility=["read"])
    """The version of the deleted blob container."""
    deleted: Optional[bool] = rest_field(visibility=["read"])
    """Indicates whether the blob container was deleted."""
    deleted_time: Optional[datetime.datetime] = rest_field(name="deletedTime", visibility=["read"], format="rfc3339")
    """Blob container deletion time."""
    remaining_retention_days: Optional[int] = rest_field(name="remainingRetentionDays", visibility=["read"])
    """Remaining retention days for soft deleted blob container."""
    default_encryption_scope: Optional[str] = rest_field(
        name="defaultEncryptionScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Default the container to use specified encryption scope for all writes."""
    deny_encryption_scope_override: Optional[bool] = rest_field(
        name="denyEncryptionScopeOverride", visibility=["read", "create", "update", "delete", "query"]
    )
    """Block override of encryption scope from the container default."""
    public_access: Optional[Union[str, "_models.PublicAccess"]] = rest_field(
        name="publicAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether data in the container may be accessed publicly and the level of access. Known
     values are: \"Container\", \"Blob\", and \"None\"."""
    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Returns the date and time the container was last modified."""
    lease_status: Optional[Union[str, "_models.LeaseStatus"]] = rest_field(name="leaseStatus", visibility=["read"])
    """The lease status of the container. Known values are: \"Locked\" and \"Unlocked\"."""
    lease_state: Optional[Union[str, "_models.LeaseState"]] = rest_field(name="leaseState", visibility=["read"])
    """Lease state of the container. Known values are: \"Available\", \"Leased\", \"Expired\",
     \"Breaking\", and \"Broken\"."""
    lease_duration: Optional[Union[str, "_models.LeaseDuration"]] = rest_field(
        name="leaseDuration", visibility=["read"]
    )
    """Specifies whether the lease on a container is of infinite or fixed duration, only when the
     container is leased. Known values are: \"Infinite\" and \"Fixed\"."""
    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A name-value pair to associate with the container as metadata."""
    immutability_policy: Optional["_models.ImmutabilityPolicyProperties"] = rest_field(
        name="immutabilityPolicy", visibility=["read"]
    )
    """The ImmutabilityPolicy property of the container."""
    legal_hold: Optional["_models.LegalHoldProperties"] = rest_field(name="legalHold", visibility=["read"])
    """The LegalHold property of the container."""
    has_legal_hold: Optional[bool] = rest_field(name="hasLegalHold", visibility=["read"])
    """The hasLegalHold public property is set to true by SRP if there are at least one existing tag.
     The hasLegalHold public property is set to false by SRP if all existing legal hold tags are
     cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given
     account."""
    has_immutability_policy: Optional[bool] = rest_field(name="hasImmutabilityPolicy", visibility=["read"])
    """The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been
     created for this container. The hasImmutabilityPolicy public property is set to false by SRP if
     ImmutabilityPolicy has not been created for this container."""
    immutable_storage_with_versioning: Optional["_models.ImmutableStorageWithVersioning"] = rest_field(
        name="immutableStorageWithVersioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The object level immutability property of the container. The property is immutable and can only
     be set to true at the container creation time. Existing containers must undergo a migration
     process."""
    enable_nfs_v3_root_squash: Optional[bool] = rest_field(
        name="enableNfsV3RootSquash", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable NFSv3 root squash on blob container."""
    enable_nfs_v3_all_squash: Optional[bool] = rest_field(
        name="enableNfsV3AllSquash", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable NFSv3 all squash on blob container."""

    @overload
    def __init__(
        self,
        *,
        default_encryption_scope: Optional[str] = None,
        deny_encryption_scope_override: Optional[bool] = None,
        public_access: Optional[Union[str, "_models.PublicAccess"]] = None,
        metadata: Optional[dict[str, str]] = None,
        immutable_storage_with_versioning: Optional["_models.ImmutableStorageWithVersioning"] = None,
        enable_nfs_v3_root_squash: Optional[bool] = None,
        enable_nfs_v3_all_squash: 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 CorsRule(_Model):
    """Specifies a CORS rule for the Blob service.

    :ivar allowed_origins: Required if CorsRule element is present. A list of origin domains that
     will be allowed via CORS, or "*" to allow all domains. Required.
    :vartype allowed_origins: list[str]
    :ivar allowed_methods: Required if CorsRule element is present. A list of HTTP methods that are
     allowed to be executed by the origin. Required.
    :vartype allowed_methods: list[str or ~azure.mgmt.storage.models.AllowedMethods]
    :ivar max_age_in_seconds: Required if CorsRule element is present. The number of seconds that
     the client/browser should cache a preflight response. Required.
    :vartype max_age_in_seconds: int
    :ivar exposed_headers: Required if CorsRule element is present. A list of response headers to
     expose to CORS clients. Required.
    :vartype exposed_headers: list[str]
    :ivar allowed_headers: Required if CorsRule element is present. A list of headers allowed to be
     part of the cross-origin request. Required.
    :vartype allowed_headers: list[str]
    """

    allowed_origins: list[str] = rest_field(
        name="allowedOrigins", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if CorsRule element is present. A list of origin domains that will be allowed via
     CORS, or \"*\" to allow all domains. Required."""
    allowed_methods: list[Union[str, "_models.AllowedMethods"]] = rest_field(
        name="allowedMethods", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed
     by the origin. Required."""
    max_age_in_seconds: int = rest_field(
        name="maxAgeInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if CorsRule element is present. The number of seconds that the client/browser should
     cache a preflight response. Required."""
    exposed_headers: list[str] = rest_field(
        name="exposedHeaders", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if CorsRule element is present. A list of response headers to expose to CORS clients.
     Required."""
    allowed_headers: list[str] = rest_field(
        name="allowedHeaders", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required if CorsRule element is present. A list of headers allowed to be part of the
     cross-origin request. Required."""

    @overload
    def __init__(
        self,
        *,
        allowed_origins: list[str],
        allowed_methods: list[Union[str, "_models.AllowedMethods"]],
        max_age_in_seconds: int,
        exposed_headers: list[str],
        allowed_headers: 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 CorsRules(_Model):
    """Sets the CORS rules. You can include up to five CorsRule elements in the request.

    :ivar cors_rules: The List of CORS rules. You can include up to five CorsRule elements in the
     request.
    :vartype cors_rules: list[~azure.mgmt.storage.models.CorsRule]
    """

    cors_rules: Optional[list["_models.CorsRule"]] = rest_field(
        name="corsRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The List of CORS rules. You can include up to five CorsRule elements in the request."""

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

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

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


class CustomDomain(_Model):
    """The custom domain assigned to this storage account. This can be set via Update.

    :ivar name: Gets or sets the custom domain name assigned to the storage account. Name is the
     CNAME source. Required.
    :vartype name: str
    :ivar use_sub_domain_name: Indicates whether indirect CName validation is enabled. Default
     value is false. This should only be set on updates.
    :vartype use_sub_domain_name: bool
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
     Required."""
    use_sub_domain_name: Optional[bool] = rest_field(
        name="useSubDomainName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether indirect CName validation is enabled. Default value is false. This should
     only be set on updates."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        use_sub_domain_name: 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 DataShare(TrackedResource):
    """A DataShare is a tracked ARM resource modeled as a sub-resource of a Storage Account.

    :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.storage.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 properties of the Storage DataShare. Required.
    :vartype properties: ~azure.mgmt.storage.models.StorageDataShareProperties
    """

    properties: "_models.StorageDataShareProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the Storage DataShare. Required."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.StorageDataShareProperties",
        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 StorageConnectorConnection(_Model):
    """The connection properties of the backing data source.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    DataShareConnection

    :ivar type: Type of the connection. Controls the type of the connection object. Not mutable
     once the Storage Connector is created. Required. "DataShare"
    :vartype type: str or ~azure.mgmt.storage.models.StorageConnectorConnectionType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of the connection. Controls the type of the connection object. Not mutable once the
     Storage Connector is created. Required. \"DataShare\""""

    @overload
    def __init__(
        self,
        *,
        type: 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 DataShareConnection(StorageConnectorConnection, discriminator="DataShare"):
    """The connection details for Data Share source.

    :ivar type: The type for data share connection. Required. DataShare connection type.
    :vartype type: str or ~azure.mgmt.storage.models.DATA_SHARE
    :ivar data_share_uri: The URI of the backing DataShare. Must be in the format:
     azds://<region>:<DataShareName>:<DataShareIdentifier>. Required.
    :vartype data_share_uri: str
    """

    type: Literal[StorageConnectorConnectionType.DATA_SHARE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type for data share connection. Required. DataShare connection type."""
    data_share_uri: str = rest_field(name="dataShareUri", visibility=["read", "create", "update", "delete", "query"])
    """The URI of the backing DataShare. Must be in the format:
     azds://<region>:<DataShareName>:<DataShareIdentifier>. Required."""

    @overload
    def __init__(
        self,
        *,
        data_share_uri: 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)
        self.type = StorageConnectorConnectionType.DATA_SHARE  # type: ignore


class StorageConnectorSource(_Model):
    """The storage connector backing data source information.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    DataShareSource

    :ivar type: Type of the Storage Connector. Not mutable once the Storage Connector is created.".
     Required. "DataShare"
    :vartype type: str or ~azure.mgmt.storage.models.StorageConnectorSourceType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of the Storage Connector. Not mutable once the Storage Connector is created.\". Required.
     \"DataShare\""""

    @overload
    def __init__(
        self,
        *,
        type: 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 DataShareSource(StorageConnectorSource, discriminator="DataShare"):
    """The properties of data share source.

    :ivar type: The type for data share source. Required. Source type - DataShare.
    :vartype type: str or ~azure.mgmt.storage.models.DATA_SHARE
    :ivar connection: Details for how to connect to the backing data store. Required.
    :vartype connection: ~azure.mgmt.storage.models.StorageConnectorConnection
    :ivar auth_properties: Details for how to authenticate to the backing data store. Required.
    :vartype auth_properties: ~azure.mgmt.storage.models.StorageConnectorAuthProperties
    """

    type: Literal[StorageConnectorSourceType.DATA_SHARE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type for data share source. Required. Source type - DataShare."""
    connection: "_models.StorageConnectorConnection" = rest_field(visibility=["read", "create"])
    """Details for how to connect to the backing data store. Required."""
    auth_properties: "_models.StorageConnectorAuthProperties" = rest_field(
        name="authProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details for how to authenticate to the backing data store. Required."""

    @overload
    def __init__(
        self,
        *,
        connection: "_models.StorageConnectorConnection",
        auth_properties: "_models.StorageConnectorAuthProperties",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param 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.type = StorageConnectorSourceType.DATA_SHARE  # type: ignore


class StorageConnectorSourceUpdate(_Model):
    """The storage connector backing data source information.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    DataShareSourceUpdate

    :ivar type: Type of the Storage Connector. Not mutable once the Storage Connector is created.".
     Required. "DataShare"
    :vartype type: str or ~azure.mgmt.storage.models.StorageConnectorSourceType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of the Storage Connector. Not mutable once the Storage Connector is created.\". Required.
     \"DataShare\""""

    @overload
    def __init__(
        self,
        *,
        type: 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 DataShareSourceUpdate(StorageConnectorSourceUpdate, discriminator="DataShare"):
    """The properties of data share source.

    :ivar type: Discriminator value for DataShare. Required. Source type - DataShare.
    :vartype type: str or ~azure.mgmt.storage.models.DATA_SHARE
    :ivar auth_properties: Details for how to authenticate to the backing data store.
    :vartype auth_properties: ~azure.mgmt.storage.models.StorageConnectorAuthPropertiesUpdate
    """

    type: Literal[StorageConnectorSourceType.DATA_SHARE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Discriminator value for DataShare. Required. Source type - DataShare."""
    auth_properties: Optional["_models.StorageConnectorAuthPropertiesUpdate"] = rest_field(
        name="authProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details for how to authenticate to the backing data store."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param 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.type = StorageConnectorSourceType.DATA_SHARE  # type: ignore


class DataShareUpdate(TrackedResourceUpdate):
    """A DataShare is a tracked ARM resource modeled as a sub-resource of a Storage Account.

    :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.storage.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The properties of the Storage DataShare.
    :vartype properties: ~azure.mgmt.storage.models.StorageDataSharePropertiesUpdate
    """

    properties: Optional["_models.StorageDataSharePropertiesUpdate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the Storage DataShare."""

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

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

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


class DateAfterCreation(_Model):
    """Object to define snapshot and version action conditions.

    :ivar days_after_creation_greater_than: Value indicating the age in days after creation.
     Required.
    :vartype days_after_creation_greater_than: float
    :ivar days_after_last_tier_change_greater_than: Value indicating the age in days after last
     blob tier change time. This property is only applicable for tierToArchive actions and requires
     daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob
     will be archived if both the conditions are satisfied.
    :vartype days_after_last_tier_change_greater_than: float
    """

    days_after_creation_greater_than: float = rest_field(
        name="daysAfterCreationGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after creation. Required."""
    days_after_last_tier_change_greater_than: Optional[float] = rest_field(
        name="daysAfterLastTierChangeGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after last blob tier change time. This property is only
     applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for
     snapshots and blob version based actions. The blob will be archived if both the conditions are
     satisfied."""

    @overload
    def __init__(
        self,
        *,
        days_after_creation_greater_than: float,
        days_after_last_tier_change_greater_than: 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 DateAfterModification(_Model):
    """Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan,
    daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The
    daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which
    requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with
    daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.

    :ivar days_after_modification_greater_than: Value indicating the age in days after last
     modification.
    :vartype days_after_modification_greater_than: float
    :ivar days_after_last_access_time_greater_than: Value indicating the age in days after last
     blob access. This property can only be used in conjunction with last access time tracking
     policy.
    :vartype days_after_last_access_time_greater_than: float
    :ivar days_after_last_tier_change_greater_than: Value indicating the age in days after last
     blob tier change time. This property is only applicable for tierToArchive actions and requires
     daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be
     archived if both the conditions are satisfied.
    :vartype days_after_last_tier_change_greater_than: float
    :ivar days_after_creation_greater_than: Value indicating the age in days after blob creation.
    :vartype days_after_creation_greater_than: float
    """

    days_after_modification_greater_than: Optional[float] = rest_field(
        name="daysAfterModificationGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after last modification."""
    days_after_last_access_time_greater_than: Optional[float] = rest_field(
        name="daysAfterLastAccessTimeGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after last blob access. This property can only be used in
     conjunction with last access time tracking policy."""
    days_after_last_tier_change_greater_than: Optional[float] = rest_field(
        name="daysAfterLastTierChangeGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after last blob tier change time. This property is only
     applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set
     for baseBlobs based actions. The blob will be archived if both the conditions are satisfied."""
    days_after_creation_greater_than: Optional[float] = rest_field(
        name="daysAfterCreationGreaterThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Value indicating the age in days after blob creation."""

    @overload
    def __init__(
        self,
        *,
        days_after_modification_greater_than: Optional[float] = None,
        days_after_last_access_time_greater_than: Optional[float] = None,
        days_after_last_tier_change_greater_than: Optional[float] = None,
        days_after_creation_greater_than: 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 DeletedAccount(ProxyResource):
    """Deleted storage account.

    :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.storage.models.SystemData
    :ivar properties: Properties of the deleted account.
    :vartype properties: ~azure.mgmt.storage.models.DeletedAccountProperties
    """

    properties: Optional["_models.DeletedAccountProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the deleted account."""

    __flattened_items = [
        "storage_account_resource_id",
        "location",
        "restore_reference",
        "creation_time",
        "deletion_time",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 DeletedAccountProperties(_Model):
    """Attributes of a deleted storage account.

    :ivar storage_account_resource_id: Full resource id of the original storage account.
    :vartype storage_account_resource_id: str
    :ivar location: Location of the deleted account.
    :vartype location: str
    :ivar restore_reference: Can be used to attempt recovering this deleted account via
     PutStorageAccount API.
    :vartype restore_reference: str
    :ivar creation_time: Creation time of the deleted account.
    :vartype creation_time: str
    :ivar deletion_time: Deletion time of the deleted account.
    :vartype deletion_time: str
    """

    storage_account_resource_id: Optional[str] = rest_field(name="storageAccountResourceId", visibility=["read"])
    """Full resource id of the original storage account."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Location of the deleted account."""
    restore_reference: Optional[str] = rest_field(name="restoreReference", visibility=["read"])
    """Can be used to attempt recovering this deleted account via PutStorageAccount API."""
    creation_time: Optional[str] = rest_field(name="creationTime", visibility=["read"])
    """Creation time of the deleted account."""
    deletion_time: Optional[str] = rest_field(name="deletionTime", visibility=["read"])
    """Deletion time of the deleted account."""


class DeletedShare(_Model):
    """The deleted share to be restored.

    :ivar deleted_share_name: Required. Identify the name of the deleted share that will be
     restored. Required.
    :vartype deleted_share_name: str
    :ivar deleted_share_version: Required. Identify the version of the deleted share that will be
     restored. Required.
    :vartype deleted_share_version: str
    """

    deleted_share_name: str = rest_field(
        name="deletedShareName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Identify the name of the deleted share that will be restored. Required."""
    deleted_share_version: str = rest_field(
        name="deletedShareVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Identify the version of the deleted share that will be restored. Required."""

    @overload
    def __init__(
        self,
        *,
        deleted_share_name: str,
        deleted_share_version: 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 DeleteRetentionPolicy(_Model):
    """The service properties for soft delete.

    :ivar enabled: Indicates whether DeleteRetentionPolicy is enabled.
    :vartype enabled: bool
    :ivar days: Indicates the number of days that the deleted item should be retained. The minimum
     specified value can be 1 and the maximum value can be 365.
    :vartype days: int
    :ivar allow_permanent_delete: This property when set to true allows deletion of the soft
     deleted blob versions and snapshots. This property cannot be used blob restore policy. This
     property only applies to blob service and does not apply to containers or file share.
    :vartype allow_permanent_delete: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether DeleteRetentionPolicy is enabled."""
    days: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates the number of days that the deleted item should be retained. The minimum specified
     value can be 1 and the maximum value can be 365."""
    allow_permanent_delete: Optional[bool] = rest_field(
        name="allowPermanentDelete", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property when set to true allows deletion of the soft deleted blob versions and snapshots.
     This property cannot be used blob restore policy. This property only applies to blob service
     and does not apply to containers or file share."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        days: Optional[int] = None,
        allow_permanent_delete: 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 Dimension(_Model):
    """Dimension of blobs, possibly be blob type or access tier.

    :ivar name: Display name of dimension.
    :vartype name: str
    :ivar display_name: Display name of dimension.
    :vartype display_name: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Display name of dimension."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Display name of dimension."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        display_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 DualStackEndpointPreference(_Model):
    """Dual-stack endpoint preference defines whether IPv6 endpoints are going to be published.

    :ivar publish_ipv6_endpoint: A boolean flag which indicates whether IPv6 storage endpoints are
     to be published.
    :vartype publish_ipv6_endpoint: bool
    """

    publish_ipv6_endpoint: Optional[bool] = rest_field(
        name="publishIpv6Endpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether IPv6 storage endpoints are to be published."""

    @overload
    def __init__(
        self,
        *,
        publish_ipv6_endpoint: 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 Encryption(_Model):
    """The encryption settings on the storage account.

    :ivar services: List of services which support encryption.
    :vartype services: ~azure.mgmt.storage.models.EncryptionServices
    :ivar key_source: The encryption keySource (provider). Possible values (case-insensitive):
     Microsoft.Storage, Microsoft.Keyvault. Known values are: "Microsoft.Storage" and
     "Microsoft.Keyvault".
    :vartype key_source: str or ~azure.mgmt.storage.models.KeySource
    :ivar require_infrastructure_encryption: A boolean indicating whether or not the service
     applies a secondary layer of encryption with platform managed keys for data at rest.
    :vartype require_infrastructure_encryption: bool
    :ivar key_vault_properties: Properties provided by key vault.
    :vartype key_vault_properties: ~azure.mgmt.storage.models.KeyVaultProperties
    :ivar encryption_identity: The identity to be used with service-side encryption at rest.
    :vartype encryption_identity: ~azure.mgmt.storage.models.EncryptionIdentity
    """

    services: Optional["_models.EncryptionServices"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of services which support encryption."""
    key_source: Optional[Union[str, "_models.KeySource"]] = rest_field(
        name="keySource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The encryption keySource (provider). Possible values (case-insensitive):  Microsoft.Storage,
     Microsoft.Keyvault. Known values are: \"Microsoft.Storage\" and \"Microsoft.Keyvault\"."""
    require_infrastructure_encryption: Optional[bool] = rest_field(
        name="requireInfrastructureEncryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean indicating whether or not the service applies a secondary layer of encryption with
     platform managed keys for data at rest."""
    key_vault_properties: Optional["_models.KeyVaultProperties"] = rest_field(
        name="keyvaultproperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties provided by key vault."""
    encryption_identity: Optional["_models.EncryptionIdentity"] = rest_field(
        name="identity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity to be used with service-side encryption at rest."""

    @overload
    def __init__(
        self,
        *,
        services: Optional["_models.EncryptionServices"] = None,
        key_source: Optional[Union[str, "_models.KeySource"]] = None,
        require_infrastructure_encryption: Optional[bool] = None,
        key_vault_properties: Optional["_models.KeyVaultProperties"] = None,
        encryption_identity: Optional["_models.EncryptionIdentity"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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):
    """Encryption identity for the storage account.

    :ivar encryption_user_assigned_identity: Resource identifier of the UserAssigned identity to be
     associated with server-side encryption on the storage account.
    :vartype encryption_user_assigned_identity: str
    :ivar encryption_federated_identity_client_id: ClientId of the multi-tenant application to be
     used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys
     server-side encryption on the storage account.
    :vartype encryption_federated_identity_client_id: str
    """

    encryption_user_assigned_identity: Optional[str] = rest_field(
        name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource identifier of the UserAssigned identity to be associated with server-side encryption
     on the storage account."""
    encryption_federated_identity_client_id: Optional[str] = rest_field(
        name="federatedIdentityClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ClientId of the multi-tenant application to be used in conjunction with the user-assigned
     identity for cross-tenant customer-managed-keys server-side encryption on the storage account."""

    @overload
    def __init__(
        self,
        *,
        encryption_user_assigned_identity: Optional[str] = None,
        encryption_federated_identity_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 EncryptionInTransit(_Model):
    """Encryption in transit setting.

    :ivar required: Indicates whether encryption in transit is required.
    :vartype required: bool
    """

    required: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether encryption in transit is required."""

    @overload
    def __init__(
        self,
        *,
        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 EncryptionScope(ProxyResource):
    """The Encryption Scope 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.storage.models.SystemData
    :ivar encryption_scope_properties: Properties of the encryption scope.
    :vartype encryption_scope_properties: ~azure.mgmt.storage.models.EncryptionScopeProperties
    """

    encryption_scope_properties: Optional["_models.EncryptionScopeProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the encryption scope."""

    __flattened_items = [
        "source",
        "state",
        "creation_time",
        "last_modified_time",
        "key_vault_properties",
        "require_infrastructure_encryption",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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.encryption_scope_properties is None:
                return None
            return getattr(self.encryption_scope_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.encryption_scope_properties is None:
                self.encryption_scope_properties = self._attr_to_rest_field["encryption_scope_properties"]._class_type()
            setattr(self.encryption_scope_properties, key, value)
        else:
            super().__setattr__(key, value)


class EncryptionScopeKeyVaultProperties(_Model):
    """The key vault properties for the encryption scope. This is a required field if encryption scope
    'source' attribute is set to 'Microsoft.KeyVault'.

    :ivar key_uri: The object identifier for a key vault key object. When applied, the encryption
     scope will use the key referenced by the identifier to enable customer-managed key support on
     this encryption scope.
    :vartype key_uri: str
    :ivar current_versioned_key_identifier: The object identifier of the current versioned Key
     Vault Key in use.
    :vartype current_versioned_key_identifier: str
    :ivar last_key_rotation_timestamp: Timestamp of last rotation of the Key Vault Key.
    :vartype last_key_rotation_timestamp: ~datetime.datetime
    """

    key_uri: Optional[str] = rest_field(name="keyUri", visibility=["read", "create", "update", "delete", "query"])
    """The object identifier for a key vault key object. When applied, the encryption scope will use
     the key referenced by the identifier to enable customer-managed key support on this encryption
     scope."""
    current_versioned_key_identifier: Optional[str] = rest_field(
        name="currentVersionedKeyIdentifier", visibility=["read"]
    )
    """The object identifier of the current versioned Key Vault Key in use."""
    last_key_rotation_timestamp: Optional[datetime.datetime] = rest_field(
        name="lastKeyRotationTimestamp", visibility=["read"], format="rfc3339"
    )
    """Timestamp of last rotation of the Key Vault Key."""

    @overload
    def __init__(
        self,
        *,
        key_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 EncryptionScopeProperties(_Model):
    """Properties of the encryption scope.

    :ivar source: The provider for the encryption scope. Possible values (case-insensitive):
     Microsoft.Storage, Microsoft.KeyVault. Known values are: "Microsoft.Storage" and
     "Microsoft.KeyVault".
    :vartype source: str or ~azure.mgmt.storage.models.EncryptionScopeSource
    :ivar state: The state of the encryption scope. Possible values (case-insensitive):  Enabled,
     Disabled. Known values are: "Enabled" and "Disabled".
    :vartype state: str or ~azure.mgmt.storage.models.EncryptionScopeState
    :ivar creation_time: Gets the creation date and time of the encryption scope in UTC.
    :vartype creation_time: ~datetime.datetime
    :ivar last_modified_time: Gets the last modification date and time of the encryption scope in
     UTC.
    :vartype last_modified_time: ~datetime.datetime
    :ivar key_vault_properties: The key vault properties for the encryption scope. This is a
     required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
    :vartype key_vault_properties: ~azure.mgmt.storage.models.EncryptionScopeKeyVaultProperties
    :ivar require_infrastructure_encryption: A boolean indicating whether or not the service
     applies a secondary layer of encryption with platform managed keys for data at rest.
    :vartype require_infrastructure_encryption: bool
    """

    source: Optional[Union[str, "_models.EncryptionScopeSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The provider for the encryption scope. Possible values (case-insensitive):  Microsoft.Storage,
     Microsoft.KeyVault. Known values are: \"Microsoft.Storage\" and \"Microsoft.KeyVault\"."""
    state: Optional[Union[str, "_models.EncryptionScopeState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The state of the encryption scope. Possible values (case-insensitive):  Enabled, Disabled.
     Known values are: \"Enabled\" and \"Disabled\"."""
    creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", visibility=["read"], format="rfc3339")
    """Gets the creation date and time of the encryption scope in UTC."""
    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Gets the last modification date and time of the encryption scope in UTC."""
    key_vault_properties: Optional["_models.EncryptionScopeKeyVaultProperties"] = rest_field(
        name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The key vault properties for the encryption scope. This is a required field if encryption scope
     'source' attribute is set to 'Microsoft.KeyVault'."""
    require_infrastructure_encryption: Optional[bool] = rest_field(
        name="requireInfrastructureEncryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean indicating whether or not the service applies a secondary layer of encryption with
     platform managed keys for data at rest."""

    @overload
    def __init__(
        self,
        *,
        source: Optional[Union[str, "_models.EncryptionScopeSource"]] = None,
        state: Optional[Union[str, "_models.EncryptionScopeState"]] = None,
        key_vault_properties: Optional["_models.EncryptionScopeKeyVaultProperties"] = None,
        require_infrastructure_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 EncryptionService(_Model):
    """A service that allows server-side encryption to be used.

    :ivar enabled: A boolean indicating whether or not the service encrypts the data as it is
     stored. Encryption at rest is enabled by default today and cannot be disabled.
    :vartype enabled: bool
    :ivar last_enabled_time: Gets a rough estimate of the date/time when the encryption was last
     enabled by the user. Data is encrypted at rest by default today and cannot be disabled.
    :vartype last_enabled_time: ~datetime.datetime
    :ivar key_type: Encryption key type to be used for the encryption service. 'Account' key type
     implies that an account-scoped encryption key will be used. 'Service' key type implies that a
     default service key is used. Known values are: "Service" and "Account".
    :vartype key_type: str or ~azure.mgmt.storage.models.KeyType
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A boolean indicating whether or not the service encrypts the data as it is stored. Encryption
     at rest is enabled by default today and cannot be disabled."""
    last_enabled_time: Optional[datetime.datetime] = rest_field(
        name="lastEnabledTime", visibility=["read"], format="rfc3339"
    )
    """Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data
     is encrypted at rest by default today and cannot be disabled."""
    key_type: Optional[Union[str, "_models.KeyType"]] = rest_field(name="keyType", visibility=["read", "create"])
    """Encryption key type to be used for the encryption service. 'Account' key type implies that an
     account-scoped encryption key will be used. 'Service' key type implies that a default service
     key is used. Known values are: \"Service\" and \"Account\"."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        key_type: Optional[Union[str, "_models.KeyType"]] = None,
    ) -> None: ...

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

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


class EncryptionServices(_Model):
    """A list of services that support encryption.

    :ivar blob: The encryption function of the blob storage service.
    :vartype blob: ~azure.mgmt.storage.models.EncryptionService
    :ivar file: The encryption function of the file storage service.
    :vartype file: ~azure.mgmt.storage.models.EncryptionService
    :ivar table: The encryption function of the table storage service.
    :vartype table: ~azure.mgmt.storage.models.EncryptionService
    :ivar queue: The encryption function of the queue storage service.
    :vartype queue: ~azure.mgmt.storage.models.EncryptionService
    """

    blob: Optional["_models.EncryptionService"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encryption function of the blob storage service."""
    file: Optional["_models.EncryptionService"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encryption function of the file storage service."""
    table: Optional["_models.EncryptionService"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The encryption function of the table storage service."""
    queue: Optional["_models.EncryptionService"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The encryption function of the queue storage service."""

    @overload
    def __init__(
        self,
        *,
        blob: Optional["_models.EncryptionService"] = None,
        file: Optional["_models.EncryptionService"] = None,
        table: Optional["_models.EncryptionService"] = None,
        queue: Optional["_models.EncryptionService"] = None,
    ) -> None: ...

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

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


class Endpoints(_Model):
    """The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs
    object.

    :ivar blob: Gets the blob endpoint.
    :vartype blob: str
    :ivar queue: Gets the queue endpoint.
    :vartype queue: str
    :ivar table: Gets the table endpoint.
    :vartype table: str
    :ivar file: Gets the file endpoint.
    :vartype file: str
    :ivar web: Gets the web endpoint.
    :vartype web: str
    :ivar dfs: Gets the dfs endpoint.
    :vartype dfs: str
    :ivar microsoft_endpoints: Gets the microsoft routing storage endpoints.
    :vartype microsoft_endpoints: ~azure.mgmt.storage.models.StorageAccountMicrosoftEndpoints
    :ivar internet_endpoints: Gets the internet routing storage endpoints.
    :vartype internet_endpoints: ~azure.mgmt.storage.models.StorageAccountInternetEndpoints
    :ivar ipv6_endpoints: Gets the IPv6 storage endpoints.
    :vartype ipv6_endpoints: ~azure.mgmt.storage.models.StorageAccountIpv6Endpoints
    """

    blob: Optional[str] = rest_field(visibility=["read"])
    """Gets the blob endpoint."""
    queue: Optional[str] = rest_field(visibility=["read"])
    """Gets the queue endpoint."""
    table: Optional[str] = rest_field(visibility=["read"])
    """Gets the table endpoint."""
    file: Optional[str] = rest_field(visibility=["read"])
    """Gets the file endpoint."""
    web: Optional[str] = rest_field(visibility=["read"])
    """Gets the web endpoint."""
    dfs: Optional[str] = rest_field(visibility=["read"])
    """Gets the dfs endpoint."""
    microsoft_endpoints: Optional["_models.StorageAccountMicrosoftEndpoints"] = rest_field(
        name="microsoftEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the microsoft routing storage endpoints."""
    internet_endpoints: Optional["_models.StorageAccountInternetEndpoints"] = rest_field(
        name="internetEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the internet routing storage endpoints."""
    ipv6_endpoints: Optional["_models.StorageAccountIpv6Endpoints"] = rest_field(
        name="ipv6Endpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the IPv6 storage endpoints."""

    @overload
    def __init__(
        self,
        *,
        microsoft_endpoints: Optional["_models.StorageAccountMicrosoftEndpoints"] = None,
        internet_endpoints: Optional["_models.StorageAccountInternetEndpoints"] = None,
        ipv6_endpoints: Optional["_models.StorageAccountIpv6Endpoints"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.storage.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.storage.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):
    """An error response from the storage resource provider.

    :ivar error: Azure Storage Resource Provider error response body.
    :vartype error: ~azure.mgmt.storage.models.ErrorResponseBody
    """

    error: Optional["_models.ErrorResponseBody"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Storage Resource Provider error response body."""

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

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

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


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

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.storage.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 ErrorResponseBody(_Model):
    """Error response body contract.

    :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed
     programmatically.
    :vartype code: str
    :ivar message: A message describing the error, intended to be suitable for display in a user
     interface.
    :vartype message: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier for the error. Codes are invariant and are intended to be consumed
     programmatically."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A message describing the error, intended to be suitable for display in a user interface."""

    @overload
    def __init__(
        self,
        *,
        code: 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 ExecutionTarget(_Model):
    """Target helps provide filter parameters for the objects in the storage account and forms the
    execution context for the storage task.

    :ivar prefix: Required list of object prefixes to be included for task execution.
    :vartype prefix: list[str]
    :ivar exclude_prefix: List of object prefixes to be excluded from task execution. If there is a
     conflict between include and exclude prefixes, the exclude prefix will be the determining
     factor.
    :vartype exclude_prefix: list[str]
    """

    prefix: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required list of object prefixes to be included for task execution."""
    exclude_prefix: Optional[list[str]] = rest_field(
        name="excludePrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of object prefixes to be excluded from task execution. If there is a conflict between
     include and exclude prefixes, the exclude prefix will be the determining factor."""

    @overload
    def __init__(
        self,
        *,
        prefix: Optional[list[str]] = None,
        exclude_prefix: 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 ExecutionTrigger(_Model):
    """Execution trigger for storage task assignment.

    :ivar type: The trigger type of the storage task assignment execution. Required. Known values
     are: "RunOnce", "OnSchedule", and "MockRun".
    :vartype type: str or ~azure.mgmt.storage.models.TriggerType
    :ivar parameters: The trigger parameters of the storage task assignment execution. Required.
    :vartype parameters: ~azure.mgmt.storage.models.TriggerParameters
    """

    type: Union[str, "_models.TriggerType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The trigger type of the storage task assignment execution. Required. Known values are:
     \"RunOnce\", \"OnSchedule\", and \"MockRun\"."""
    parameters: "_models.TriggerParameters" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The trigger parameters of the storage task assignment execution. Required."""

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.TriggerType"],
        parameters: "_models.TriggerParameters",
    ) -> None: ...

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

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


class ExecutionTriggerUpdate(_Model):
    """Execution trigger update for storage task assignment.

    :ivar type: The trigger type of the storage task assignment execution. Known values are:
     "RunOnce", "OnSchedule", and "MockRun".
    :vartype type: str or ~azure.mgmt.storage.models.TriggerType
    :ivar parameters: The trigger parameters of the storage task assignment execution.
    :vartype parameters: ~azure.mgmt.storage.models.TriggerParametersUpdate
    """

    type: Optional[Union[str, "_models.TriggerType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The trigger type of the storage task assignment execution. Known values are: \"RunOnce\",
     \"OnSchedule\", and \"MockRun\"."""
    parameters: Optional["_models.TriggerParametersUpdate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The trigger parameters of the storage task assignment execution."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.storage.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 FileServiceItems(_Model):
    """FileServiceItems.

    :ivar value: List of file services returned.
    :vartype value: list[~azure.mgmt.storage.models.FileServiceProperties]
    """

    value: Optional[list["_models.FileServiceProperties"]] = rest_field(visibility=["read"])
    """List of file services returned."""


class FileServiceProperties(ProxyResource):
    """The properties of File services in storage account.

    :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.storage.models.SystemData
    :ivar file_service_properties: The properties of File services in storage account.
    :vartype file_service_properties: ~azure.mgmt.storage.models.FileServicePropertiesProperties
    :ivar sku: Sku name and tier.
    :vartype sku: ~azure.mgmt.storage.models.Sku
    """

    file_service_properties: Optional["_models.FileServicePropertiesProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of File services in storage account."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read"])
    """Sku name and tier."""

    __flattened_items = ["cors", "share_delete_retention_policy", "protocol_settings"]

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

    @overload
    def __init__(self, mapping: Mapping[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.file_service_properties is None:
                return None
            return getattr(self.file_service_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.file_service_properties is None:
                self.file_service_properties = self._attr_to_rest_field["file_service_properties"]._class_type()
            setattr(self.file_service_properties, key, value)
        else:
            super().__setattr__(key, value)


class FileServicePropertiesProperties(_Model):
    """The properties of File services in storage account.

    :ivar cors: Specifies CORS rules for the File service. You can include up to five CorsRule
     elements in the request. If no CorsRule elements are included in the request body, all CORS
     rules will be deleted, and CORS will be disabled for the File service.
    :vartype cors: ~azure.mgmt.storage.models.CorsRules
    :ivar share_delete_retention_policy: The file service properties for share soft delete.
    :vartype share_delete_retention_policy: ~azure.mgmt.storage.models.DeleteRetentionPolicy
    :ivar protocol_settings: Protocol settings for file service.
    :vartype protocol_settings: ~azure.mgmt.storage.models.ProtocolSettings
    """

    cors: Optional["_models.CorsRules"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies CORS rules for the File service. You can include up to five CorsRule elements in the
     request. If no CorsRule elements are included in the request body, all CORS rules will be
     deleted, and CORS will be disabled for the File service."""
    share_delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = rest_field(
        name="shareDeleteRetentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The file service properties for share soft delete."""
    protocol_settings: Optional["_models.ProtocolSettings"] = rest_field(
        name="protocolSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Protocol settings for file service."""

    @overload
    def __init__(
        self,
        *,
        cors: Optional["_models.CorsRules"] = None,
        share_delete_retention_policy: Optional["_models.DeleteRetentionPolicy"] = None,
        protocol_settings: Optional["_models.ProtocolSettings"] = None,
    ) -> None: ...

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

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


class FileServiceUsage(ProxyResource):
    """The usage of file service in storage account.

    :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.storage.models.SystemData
    :ivar properties: File service usage in storage account including account limits, file share
     limits and constants used in recommendations and bursting formula.
    :vartype properties: ~azure.mgmt.storage.models.FileServiceUsageProperties
    """

    properties: Optional["_models.FileServiceUsageProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """File service usage in storage account including account limits, file share limits and constants
     used in recommendations and bursting formula."""

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

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

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


class FileServiceUsageProperties(_Model):
    """File service usage in storage account including account limits, file share limits and constants
    used in recommendations and bursting formula.

    :ivar storage_account_limits: Maximum provisioned storage, IOPS, bandwidth and number of file
     shares limits for the storage account.
    :vartype storage_account_limits: ~azure.mgmt.storage.models.AccountLimits
    :ivar file_share_limits: Minimum and maximum provisioned storage, IOPS and bandwidth limits for
     a file share in the storage account.
    :vartype file_share_limits: ~azure.mgmt.storage.models.FileShareLimits
    :ivar file_share_recommendations: Constants used for calculating recommended provisioned IOPS
     and bandwidth for a file share in the storage account.
    :vartype file_share_recommendations: ~azure.mgmt.storage.models.FileShareRecommendations
    :ivar bursting_constants: Constants used for calculating included burst IOPS and maximum burst
     credits for IOPS for a file share in the storage account.
    :vartype bursting_constants: ~azure.mgmt.storage.models.BurstingConstants
    :ivar storage_account_usage: Usage of provisioned storage, IOPS, bandwidth and number of file
     shares across all live shares and soft-deleted shares in the account.
    :vartype storage_account_usage: ~azure.mgmt.storage.models.AccountUsage
    """

    storage_account_limits: Optional["_models.AccountLimits"] = rest_field(
        name="storageAccountLimits", visibility=["read"]
    )
    """Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage
     account."""
    file_share_limits: Optional["_models.FileShareLimits"] = rest_field(name="fileShareLimits", visibility=["read"])
    """Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the
     storage account."""
    file_share_recommendations: Optional["_models.FileShareRecommendations"] = rest_field(
        name="fileShareRecommendations", visibility=["read"]
    )
    """Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in
     the storage account."""
    bursting_constants: Optional["_models.BurstingConstants"] = rest_field(
        name="burstingConstants", visibility=["read"]
    )
    """Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a
     file share in the storage account."""
    storage_account_usage: Optional["_models.AccountUsage"] = rest_field(
        name="storageAccountUsage", visibility=["read"]
    )
    """Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares
     and soft-deleted shares in the account."""


class FileShare(ProxyResource):
    """Properties of the file share, including Id, resource name, resource type, Etag.

    :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.storage.models.SystemData
    :ivar file_share_properties: Properties of the file share.
    :vartype file_share_properties: ~azure.mgmt.storage.models.FileShareProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    """

    file_share_properties: Optional["_models.FileShareProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the file share."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""

    __flattened_items = [
        "last_modified_time",
        "metadata",
        "share_quota",
        "provisioned_iops",
        "provisioned_bandwidth_mibps",
        "included_burst_iops",
        "max_burst_credits_for_iops",
        "next_allowed_quota_downgrade_time",
        "next_allowed_provisioned_iops_downgrade_time",
        "next_allowed_provisioned_bandwidth_downgrade_time",
        "enabled_protocols",
        "root_squash",
        "version",
        "deleted",
        "deleted_time",
        "remaining_retention_days",
        "access_tier",
        "access_tier_change_time",
        "access_tier_status",
        "share_usage_bytes",
        "lease_status",
        "lease_state",
        "lease_duration",
        "signed_identifiers",
        "snapshot_time",
        "file_share_paid_bursting",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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.file_share_properties is None:
                return None
            return getattr(self.file_share_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.file_share_properties is None:
                self.file_share_properties = self._attr_to_rest_field["file_share_properties"]._class_type()
            setattr(self.file_share_properties, key, value)
        else:
            super().__setattr__(key, value)


class FileShareItem(AzureEntityResource):
    """The file share properties be listed out.

    :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.storage.models.SystemData
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar properties: The file share properties be listed out.
    :vartype properties: ~azure.mgmt.storage.models.FileShareProperties
    """

    properties: Optional["_models.FileShareProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The file share properties be listed out."""

    __flattened_items = [
        "last_modified_time",
        "metadata",
        "share_quota",
        "provisioned_iops",
        "provisioned_bandwidth_mibps",
        "included_burst_iops",
        "max_burst_credits_for_iops",
        "next_allowed_quota_downgrade_time",
        "next_allowed_provisioned_iops_downgrade_time",
        "next_allowed_provisioned_bandwidth_downgrade_time",
        "enabled_protocols",
        "root_squash",
        "version",
        "deleted",
        "deleted_time",
        "remaining_retention_days",
        "access_tier",
        "access_tier_change_time",
        "access_tier_status",
        "share_usage_bytes",
        "lease_status",
        "lease_state",
        "lease_duration",
        "signed_identifiers",
        "snapshot_time",
        "file_share_paid_bursting",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 FileShareLimits(_Model):
    """Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the
    storage account.

    :ivar min_provisioned_storage_gi_b: The minimum provisioned storage quota limit in gibibytes
     for a file share in the storage account.
    :vartype min_provisioned_storage_gi_b: int
    :ivar max_provisioned_storage_gi_b: The maximum provisioned storage quota limit in gibibytes
     for a file share in the storage account.
    :vartype max_provisioned_storage_gi_b: int
    :ivar min_provisioned_iops: The minimum provisioned IOPS limit for a file share in the storage
     account.
    :vartype min_provisioned_iops: int
    :ivar max_provisioned_iops: The maximum provisioned IOPS limit for a file share in the storage
     account.
    :vartype max_provisioned_iops: int
    :ivar min_provisioned_bandwidth_mi_b_per_sec: The minimum provisioned bandwidth limit in
     mebibytes per second for a file share in the storage account.
    :vartype min_provisioned_bandwidth_mi_b_per_sec: int
    :ivar max_provisioned_bandwidth_mi_b_per_sec: The maximum provisioned bandwidth limit in
     mebibytes per second for a file share in the storage account.
    :vartype max_provisioned_bandwidth_mi_b_per_sec: int
    :ivar guardrail_io_scalar: The IO scalar used for guardrail calculations for a file share in
     the storage account.
    :vartype guardrail_io_scalar: float
    :ivar guardrail_bandwidth_scalar: The bandwidth scalar used for guardrail calculations for a
     file share in the storage account.
    :vartype guardrail_bandwidth_scalar: float
    """

    min_provisioned_storage_gi_b: Optional[int] = rest_field(name="minProvisionedStorageGiB", visibility=["read"])
    """The minimum provisioned storage quota limit in gibibytes for a file share in the storage
     account."""
    max_provisioned_storage_gi_b: Optional[int] = rest_field(name="maxProvisionedStorageGiB", visibility=["read"])
    """The maximum provisioned storage quota limit in gibibytes for a file share in the storage
     account."""
    min_provisioned_iops: Optional[int] = rest_field(name="minProvisionedIOPS", visibility=["read"])
    """The minimum provisioned IOPS limit for a file share in the storage account."""
    max_provisioned_iops: Optional[int] = rest_field(name="maxProvisionedIOPS", visibility=["read"])
    """The maximum provisioned IOPS limit for a file share in the storage account."""
    min_provisioned_bandwidth_mi_b_per_sec: Optional[int] = rest_field(
        name="minProvisionedBandwidthMiBPerSec", visibility=["read"]
    )
    """The minimum provisioned bandwidth limit in mebibytes per second for a file share in the storage
     account."""
    max_provisioned_bandwidth_mi_b_per_sec: Optional[int] = rest_field(
        name="maxProvisionedBandwidthMiBPerSec", visibility=["read"]
    )
    """The maximum provisioned bandwidth limit in mebibytes per second for a file share in the storage
     account."""
    guardrail_io_scalar: Optional[float] = rest_field(name="guardrailIOScalar", visibility=["read"])
    """The IO scalar used for guardrail calculations for a file share in the storage account."""
    guardrail_bandwidth_scalar: Optional[float] = rest_field(name="guardrailBandwidthScalar", visibility=["read"])
    """The bandwidth scalar used for guardrail calculations for a file share in the storage account."""


class FileShareProperties(_Model):
    """The properties of the file share.

    :ivar last_modified_time: Returns the date and time the share was last modified.
    :vartype last_modified_time: ~datetime.datetime
    :ivar metadata: A name-value pair to associate with the share as metadata.
    :vartype metadata: dict[str, str]
    :ivar share_quota: The provisioned size of the share, in gibibytes. Must be greater than 0, and
     less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file
     shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage
     API response for the minimum and maximum allowed provisioned storage size.
    :vartype share_quota: int
    :ivar provisioned_iops: The provisioned IOPS of the share. This property is only for file
     shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage
     API response for the minimum and maximum allowed value for provisioned IOPS.
    :vartype provisioned_iops: int
    :ivar provisioned_bandwidth_mibps: The provisioned bandwidth of the share, in mebibytes per
     second. This property is only for file shares created under Files Provisioned v2 account type.
     Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value
     for provisioned bandwidth.
    :vartype provisioned_bandwidth_mibps: int
    :ivar included_burst_iops: The calculated burst IOPS of the share. This property is only for
     file shares created under Files Provisioned v2 account type.
    :vartype included_burst_iops: int
    :ivar max_burst_credits_for_iops: The calculated maximum burst credits for the share. This
     property is only for file shares created under Files Provisioned v2 account type.
    :vartype max_burst_credits_for_iops: int
    :ivar next_allowed_quota_downgrade_time: Returns the next allowed provisioned storage size
     downgrade time for the share. This property is only for file shares created under Files
     Provisioned v1 SSD and Files Provisioned v2 account type.
    :vartype next_allowed_quota_downgrade_time: ~datetime.datetime
    :ivar next_allowed_provisioned_iops_downgrade_time: Returns the next allowed provisioned IOPS
     downgrade time for the share. This property is only for file shares created under Files
     Provisioned v2 account type.
    :vartype next_allowed_provisioned_iops_downgrade_time: ~datetime.datetime
    :ivar next_allowed_provisioned_bandwidth_downgrade_time: Returns the next allowed provisioned
     bandwidth downgrade time for the share. This property is only for file shares created under
     Files Provisioned v2 account type.
    :vartype next_allowed_provisioned_bandwidth_downgrade_time: ~datetime.datetime
    :ivar enabled_protocols: The authentication protocol that is used for the file share. Can only
     be specified when creating a share. Known values are: "SMB" and "NFS".
    :vartype enabled_protocols: str or ~azure.mgmt.storage.models.EnabledProtocols
    :ivar root_squash: The property is for NFS share only. The default is NoRootSquash. Known
     values are: "NoRootSquash", "RootSquash", and "AllSquash".
    :vartype root_squash: str or ~azure.mgmt.storage.models.RootSquashType
    :ivar version: The version of the share.
    :vartype version: str
    :ivar deleted: Indicates whether the share was deleted.
    :vartype deleted: bool
    :ivar deleted_time: The deleted time if the share was deleted.
    :vartype deleted_time: ~datetime.datetime
    :ivar remaining_retention_days: Remaining retention days for share that was soft deleted.
    :vartype remaining_retention_days: int
    :ivar access_tier: Access tier for specific share. GpV2 account can choose between
     TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Known
     values are: "TransactionOptimized", "Hot", "Cool", and "Premium".
    :vartype access_tier: str or ~azure.mgmt.storage.models.ShareAccessTier
    :ivar access_tier_change_time: Indicates the last modification time for share access tier.
    :vartype access_tier_change_time: ~datetime.datetime
    :ivar access_tier_status: Indicates if there is a pending transition for access tier.
    :vartype access_tier_status: str
    :ivar share_usage_bytes: The approximate size of the data stored on the share. Note that this
     value may not include all recently created or recently resized files.
    :vartype share_usage_bytes: int
    :ivar lease_status: The lease status of the share. Known values are: "Locked" and "Unlocked".
    :vartype lease_status: str or ~azure.mgmt.storage.models.LeaseStatus
    :ivar lease_state: Lease state of the share. Known values are: "Available", "Leased",
     "Expired", "Breaking", and "Broken".
    :vartype lease_state: str or ~azure.mgmt.storage.models.LeaseState
    :ivar lease_duration: Specifies whether the lease on a share is of infinite or fixed duration,
     only when the share is leased. Known values are: "Infinite" and "Fixed".
    :vartype lease_duration: str or ~azure.mgmt.storage.models.LeaseDuration
    :ivar signed_identifiers: List of stored access policies specified on the share.
    :vartype signed_identifiers: list[~azure.mgmt.storage.models.SignedIdentifier]
    :ivar snapshot_time: Creation time of share snapshot returned in the response of list shares
     with expand param "snapshots".
    :vartype snapshot_time: ~datetime.datetime
    :ivar file_share_paid_bursting: File Share Paid Bursting properties.
    :vartype file_share_paid_bursting:
     ~azure.mgmt.storage.models.FileSharePropertiesFileSharePaidBursting
    """

    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Returns the date and time the share was last modified."""
    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A name-value pair to associate with the share as metadata."""
    share_quota: Optional[int] = rest_field(
        name="shareQuota", visibility=["read", "create", "update", "delete", "query"]
    )
    """The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal
     to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under
     Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the
     minimum and maximum allowed provisioned storage size."""
    provisioned_iops: Optional[int] = rest_field(
        name="provisionedIops", visibility=["read", "create", "update", "delete", "query"]
    )
    """The provisioned IOPS of the share. This property is only for file shares created under Files
     Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the
     minimum and maximum allowed value for provisioned IOPS."""
    provisioned_bandwidth_mibps: Optional[int] = rest_field(
        name="provisionedBandwidthMibps", visibility=["read", "create", "update", "delete", "query"]
    )
    """The provisioned bandwidth of the share, in mebibytes per second. This property is only for file
     shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage
     API response for the minimum and maximum allowed value for provisioned bandwidth."""
    included_burst_iops: Optional[int] = rest_field(name="includedBurstIops", visibility=["read"])
    """The calculated burst IOPS of the share. This property is only for file shares created under
     Files Provisioned v2 account type."""
    max_burst_credits_for_iops: Optional[int] = rest_field(name="maxBurstCreditsForIops", visibility=["read"])
    """The calculated maximum burst credits for the share. This property is only for file shares
     created under Files Provisioned v2 account type."""
    next_allowed_quota_downgrade_time: Optional[datetime.datetime] = rest_field(
        name="nextAllowedQuotaDowngradeTime", visibility=["read"], format="rfc7231"
    )
    """Returns the next allowed provisioned storage size downgrade time for the share. This property
     is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account
     type."""
    next_allowed_provisioned_iops_downgrade_time: Optional[datetime.datetime] = rest_field(
        name="nextAllowedProvisionedIopsDowngradeTime", visibility=["read"], format="rfc7231"
    )
    """Returns the next allowed provisioned IOPS downgrade time for the share. This property is only
     for file shares created under Files Provisioned v2 account type."""
    next_allowed_provisioned_bandwidth_downgrade_time: Optional[datetime.datetime] = rest_field(
        name="nextAllowedProvisionedBandwidthDowngradeTime", visibility=["read"], format="rfc7231"
    )
    """Returns the next allowed provisioned bandwidth downgrade time for the share. This property is
     only for file shares created under Files Provisioned v2 account type."""
    enabled_protocols: Optional[Union[str, "_models.EnabledProtocols"]] = rest_field(
        name="enabledProtocols", visibility=["read", "create"]
    )
    """The authentication protocol that is used for the file share. Can only be specified when
     creating a share. Known values are: \"SMB\" and \"NFS\"."""
    root_squash: Optional[Union[str, "_models.RootSquashType"]] = rest_field(
        name="rootSquash", visibility=["read", "create", "update", "delete", "query"]
    )
    """The property is for NFS share only. The default is NoRootSquash. Known values are:
     \"NoRootSquash\", \"RootSquash\", and \"AllSquash\"."""
    version: Optional[str] = rest_field(visibility=["read"])
    """The version of the share."""
    deleted: Optional[bool] = rest_field(visibility=["read"])
    """Indicates whether the share was deleted."""
    deleted_time: Optional[datetime.datetime] = rest_field(name="deletedTime", visibility=["read"], format="rfc3339")
    """The deleted time if the share was deleted."""
    remaining_retention_days: Optional[int] = rest_field(name="remainingRetentionDays", visibility=["read"])
    """Remaining retention days for share that was soft deleted."""
    access_tier: Optional[Union[str, "_models.ShareAccessTier"]] = rest_field(
        name="accessTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access tier for specific share. GpV2 account can choose between TransactionOptimized (default),
     Hot, and Cool. FileStorage account can choose Premium. Known values are:
     \"TransactionOptimized\", \"Hot\", \"Cool\", and \"Premium\"."""
    access_tier_change_time: Optional[datetime.datetime] = rest_field(
        name="accessTierChangeTime", visibility=["read"], format="rfc3339"
    )
    """Indicates the last modification time for share access tier."""
    access_tier_status: Optional[str] = rest_field(name="accessTierStatus", visibility=["read"])
    """Indicates if there is a pending transition for access tier."""
    share_usage_bytes: Optional[int] = rest_field(name="shareUsageBytes", visibility=["read"])
    """The approximate size of the data stored on the share. Note that this value may not include all
     recently created or recently resized files."""
    lease_status: Optional[Union[str, "_models.LeaseStatus"]] = rest_field(name="leaseStatus", visibility=["read"])
    """The lease status of the share. Known values are: \"Locked\" and \"Unlocked\"."""
    lease_state: Optional[Union[str, "_models.LeaseState"]] = rest_field(name="leaseState", visibility=["read"])
    """Lease state of the share. Known values are: \"Available\", \"Leased\", \"Expired\",
     \"Breaking\", and \"Broken\"."""
    lease_duration: Optional[Union[str, "_models.LeaseDuration"]] = rest_field(
        name="leaseDuration", visibility=["read"]
    )
    """Specifies whether the lease on a share is of infinite or fixed duration, only when the share is
     leased. Known values are: \"Infinite\" and \"Fixed\"."""
    signed_identifiers: Optional[list["_models.SignedIdentifier"]] = rest_field(
        name="signedIdentifiers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of stored access policies specified on the share."""
    snapshot_time: Optional[datetime.datetime] = rest_field(name="snapshotTime", visibility=["read"], format="rfc3339")
    """Creation time of share snapshot returned in the response of list shares with expand param
     \"snapshots\"."""
    file_share_paid_bursting: Optional["_models.FileSharePropertiesFileSharePaidBursting"] = rest_field(
        name="fileSharePaidBursting", visibility=["read", "create", "update", "delete", "query"]
    )
    """File Share Paid Bursting properties."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        metadata: Optional[dict[str, str]] = None,
        share_quota: Optional[int] = None,
        provisioned_iops: Optional[int] = None,
        provisioned_bandwidth_mibps: Optional[int] = None,
        enabled_protocols: Optional[Union[str, "_models.EnabledProtocols"]] = None,
        root_squash: Optional[Union[str, "_models.RootSquashType"]] = None,
        access_tier: Optional[Union[str, "_models.ShareAccessTier"]] = None,
        signed_identifiers: Optional[list["_models.SignedIdentifier"]] = None,
        file_share_paid_bursting: Optional["_models.FileSharePropertiesFileSharePaidBursting"] = None,
    ) -> None: ...

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

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


class FileSharePropertiesFileSharePaidBursting(_Model):
    """File Share Paid Bursting properties.

    :ivar paid_bursting_enabled: Indicates whether paid bursting is enabled for the share. This
     property is only for file shares created under Files Provisioned v1 SSD account type.
    :vartype paid_bursting_enabled: bool
    :ivar paid_bursting_max_iops: The maximum paid bursting IOPS for the share. This property is
     only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed
     value is 102400 which is the maximum allowed IOPS for a share.
    :vartype paid_bursting_max_iops: int
    :ivar paid_bursting_max_bandwidth_mibps: The maximum paid bursting bandwidth for the share, in
     mebibytes per second. This property is only for file shares created under Files Provisioned v1
     SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for
     a share.
    :vartype paid_bursting_max_bandwidth_mibps: int
    """

    paid_bursting_enabled: Optional[bool] = rest_field(
        name="paidBurstingEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether paid bursting is enabled for the share. This property is only for file shares
     created under Files Provisioned v1 SSD account type."""
    paid_bursting_max_iops: Optional[int] = rest_field(
        name="paidBurstingMaxIops", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum paid bursting IOPS for the share. This property is only for file shares created
     under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the
     maximum allowed IOPS for a share."""
    paid_bursting_max_bandwidth_mibps: Optional[int] = rest_field(
        name="paidBurstingMaxBandwidthMibps", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is
     only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed
     value is 10340 which is the maximum allowed bandwidth for a share."""

    @overload
    def __init__(
        self,
        *,
        paid_bursting_enabled: Optional[bool] = None,
        paid_bursting_max_iops: Optional[int] = None,
        paid_bursting_max_bandwidth_mibps: 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 FileShareRecommendations(_Model):
    """Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in
    the storage account.

    :ivar base_iops: The base IOPS in the file share provisioned IOPS recommendation formula.
    :vartype base_iops: int
    :ivar io_scalar: The scalar for IO in the file share provisioned IOPS recommendation formula.
    :vartype io_scalar: float
    :ivar base_bandwidth_mi_b_per_sec: The base bandwidth in the file share provisioned bandwidth
     recommendation formula.
    :vartype base_bandwidth_mi_b_per_sec: int
    :ivar bandwidth_scalar: The scalar for bandwidth in the file share provisioned bandwidth
     recommendation formula.
    :vartype bandwidth_scalar: float
    """

    base_iops: Optional[int] = rest_field(name="baseIOPS", visibility=["read"])
    """The base IOPS in the file share provisioned IOPS recommendation formula."""
    io_scalar: Optional[float] = rest_field(name="ioScalar", visibility=["read"])
    """The scalar for IO in the file share provisioned IOPS recommendation formula."""
    base_bandwidth_mi_b_per_sec: Optional[int] = rest_field(name="baseBandwidthMiBPerSec", visibility=["read"])
    """The base bandwidth in the file share provisioned bandwidth recommendation formula."""
    bandwidth_scalar: Optional[float] = rest_field(name="bandwidthScalar", visibility=["read"])
    """The scalar for bandwidth in the file share provisioned bandwidth recommendation formula."""


class GeoPriorityReplicationStatus(_Model):
    """Geo Priority Replication enablement status for the storage account.

    :ivar is_blob_enabled: Indicates whether Blob Geo Priority Replication is enabled for the
     storage account.
    :vartype is_blob_enabled: bool
    """

    is_blob_enabled: Optional[bool] = rest_field(
        name="isBlobEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Blob Geo Priority Replication is enabled for the storage account."""

    @overload
    def __init__(
        self,
        *,
        is_blob_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 GeoReplicationStats(_Model):
    """Statistics related to replication for storage account's Blob, Table, Queue and File services.
    It is only available when geo-redundant replication is enabled for the storage account.

    :ivar status: The status of the secondary location. Possible values are: - Live: Indicates that
     the secondary location is active and operational. - Bootstrap: Indicates initial
     synchronization from the primary location to the secondary location is in progress.This
     typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary
     location is temporarily unavailable. Known values are: "Live", "Bootstrap", and "Unavailable".
    :vartype status: str or ~azure.mgmt.storage.models.GeoReplicationStatus
    :ivar last_sync_time: All primary writes preceding this UTC date/time value are guaranteed to
     be available for read operations. Primary writes following this point in time may or may not be
     available for reads. Element may be default value if value of LastSyncTime is not available,
     this can happen if secondary is offline or we are in bootstrap.
    :vartype last_sync_time: ~datetime.datetime
    :ivar can_failover: A boolean flag which indicates whether or not account failover is supported
     for the account.
    :vartype can_failover: bool
    :ivar can_planned_failover: A boolean flag which indicates whether or not planned account
     failover is supported for the account.
    :vartype can_planned_failover: bool
    :ivar post_failover_redundancy: The redundancy type of the account after an account failover is
     performed. Known values are: "Standard_LRS" and "Standard_ZRS".
    :vartype post_failover_redundancy: str or ~azure.mgmt.storage.models.PostFailoverRedundancy
    :ivar post_planned_failover_redundancy: The redundancy type of the account after a planned
     account failover is performed. Known values are: "Standard_GRS", "Standard_GZRS",
     "Standard_RAGRS", and "Standard_RAGZRS".
    :vartype post_planned_failover_redundancy: str or
     ~azure.mgmt.storage.models.PostPlannedFailoverRedundancy
    """

    status: Optional[Union[str, "_models.GeoReplicationStatus"]] = rest_field(visibility=["read"])
    """The status of the secondary location. Possible values are: - Live: Indicates that the secondary
     location is active and operational. - Bootstrap: Indicates initial synchronization from the
     primary location to the secondary location is in progress.This typically occurs when
     replication is first enabled. - Unavailable: Indicates that the secondary location is
     temporarily unavailable. Known values are: \"Live\", \"Bootstrap\", and \"Unavailable\"."""
    last_sync_time: Optional[datetime.datetime] = rest_field(name="lastSyncTime", visibility=["read"], format="rfc3339")
    """All primary writes preceding this UTC date/time value are guaranteed to be available for read
     operations. Primary writes following this point in time may or may not be available for reads.
     Element may be default value if value of LastSyncTime is not available, this can happen if
     secondary is offline or we are in bootstrap."""
    can_failover: Optional[bool] = rest_field(name="canFailover", visibility=["read"])
    """A boolean flag which indicates whether or not account failover is supported for the account."""
    can_planned_failover: Optional[bool] = rest_field(name="canPlannedFailover", visibility=["read"])
    """A boolean flag which indicates whether or not planned account failover is supported for the
     account."""
    post_failover_redundancy: Optional[Union[str, "_models.PostFailoverRedundancy"]] = rest_field(
        name="postFailoverRedundancy", visibility=["read"]
    )
    """The redundancy type of the account after an account failover is performed. Known values are:
     \"Standard_LRS\" and \"Standard_ZRS\"."""
    post_planned_failover_redundancy: Optional[Union[str, "_models.PostPlannedFailoverRedundancy"]] = rest_field(
        name="postPlannedFailoverRedundancy", visibility=["read"]
    )
    """The redundancy type of the account after a planned account failover is performed. Known values
     are: \"Standard_GRS\", \"Standard_GZRS\", \"Standard_RAGRS\", and \"Standard_RAGZRS\"."""


class Identity(_Model):
    """Identity for the resource.

    :ivar principal_id: The principal ID of resource identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of resource.
    :vartype tenant_id: str
    :ivar type: The identity type. Required. Known values are: "None", "SystemAssigned",
     "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.storage.models.IdentityType
    :ivar user_assigned_identities: Gets or sets a list of key value pairs that describe the set of
     User Assigned identities that will be used with this storage account. The key is the ARM
     resource identifier of the identity. Only 1 User Assigned identity is permitted here.
    :vartype user_assigned_identities: dict[str, ~azure.mgmt.storage.models.UserAssignedIdentity]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal ID of resource identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of resource."""
    type: Union[str, "_models.IdentityType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity type. Required. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\",
     and \"SystemAssigned,UserAssigned\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets a list of key value pairs that describe the set of User Assigned identities that
     will be used with this storage account. The key is the ARM resource identifier of the identity.
     Only 1 User Assigned identity is permitted here."""

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

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

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


class ImmutabilityPolicy(ProxyResource):
    """The ImmutabilityPolicy property of a blob container, including Id, resource name, resource
    type, Etag.

    :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.storage.models.SystemData
    :ivar properties: The properties of an ImmutabilityPolicy of a blob container. Required.
    :vartype properties: ~azure.mgmt.storage.models.ImmutabilityPolicyProperty
    :ivar etag: Resource Etag.
    :vartype etag: str
    """

    properties: "_models.ImmutabilityPolicyProperty" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an ImmutabilityPolicy of a blob container. Required."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""

    __flattened_items = [
        "immutability_period_since_creation_in_days",
        "state",
        "allow_protected_append_writes",
        "allow_protected_append_writes_all",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: "_models.ImmutabilityPolicyProperty",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 ImmutabilityPolicyProperties(_Model):
    """The properties of an ImmutabilityPolicy of a blob container.

    :ivar properties: The properties of an ImmutabilityPolicy of a blob container.
    :vartype properties: ~azure.mgmt.storage.models.ImmutabilityPolicyProperty
    :ivar etag: ImmutabilityPolicy Etag.
    :vartype etag: str
    :ivar update_history: The ImmutabilityPolicy update history of the blob container.
    :vartype update_history: list[~azure.mgmt.storage.models.UpdateHistoryProperty]
    """

    properties: Optional["_models.ImmutabilityPolicyProperty"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an ImmutabilityPolicy of a blob container."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """ImmutabilityPolicy Etag."""
    update_history: Optional[list["_models.UpdateHistoryProperty"]] = rest_field(
        name="updateHistory", visibility=["read"]
    )
    """The ImmutabilityPolicy update history of the blob container."""

    __flattened_items = [
        "immutability_period_since_creation_in_days",
        "state",
        "allow_protected_append_writes",
        "allow_protected_append_writes_all",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ImmutabilityPolicyProperty(_Model):
    """The properties of an ImmutabilityPolicy of a blob container.

    :ivar immutability_period_since_creation_in_days: The immutability period for the blobs in the
     container since the policy creation, in days.
    :vartype immutability_period_since_creation_in_days: int
    :ivar state: The ImmutabilityPolicy state of a blob container, possible values include: Locked
     and Unlocked. Known values are: "Locked" and "Unlocked".
    :vartype state: str or ~azure.mgmt.storage.models.ImmutabilityPolicyState
    :ivar allow_protected_append_writes: This property can only be changed for unlocked time-based
     retention policies. When enabled, new blocks can be written to an append blob while maintaining
     immutability protection and compliance. Only new blocks can be added and any existing blocks
     cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy
     API.
    :vartype allow_protected_append_writes: bool
    :ivar allow_protected_append_writes_all: This property can only be changed for unlocked
     time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock
     Blobs' while maintaining immutability protection and compliance. Only new blocks can be added
     and any existing blocks cannot be modified or deleted. This property cannot be changed with
     ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and
     'allowProtectedAppendWritesAll' properties are mutually exclusive.
    :vartype allow_protected_append_writes_all: bool
    """

    immutability_period_since_creation_in_days: Optional[int] = rest_field(
        name="immutabilityPeriodSinceCreationInDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """The immutability period for the blobs in the container since the policy creation, in days."""
    state: Optional[Union[str, "_models.ImmutabilityPolicyState"]] = rest_field(visibility=["read"])
    """The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
     Known values are: \"Locked\" and \"Unlocked\"."""
    allow_protected_append_writes: Optional[bool] = rest_field(
        name="allowProtectedAppendWrites", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can only be changed for unlocked time-based retention policies. When enabled, new
     blocks can be written to an append blob while maintaining immutability protection and
     compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.
     This property cannot be changed with ExtendImmutabilityPolicy API."""
    allow_protected_append_writes_all: Optional[bool] = rest_field(
        name="allowProtectedAppendWritesAll", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can only be changed for unlocked time-based retention policies. When enabled, new
     blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection
     and compliance. Only new blocks can be added and any existing blocks cannot be modified or
     deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The
     'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually
     exclusive."""

    @overload
    def __init__(
        self,
        *,
        immutability_period_since_creation_in_days: Optional[int] = None,
        allow_protected_append_writes: Optional[bool] = None,
        allow_protected_append_writes_all: 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 ImmutableStorageAccount(_Model):
    """This property enables and defines account-level immutability. Enabling the feature auto-enables
    Blob Versioning.

    :ivar enabled: A boolean flag which enables account-level immutability. All the containers
     under such an account have object-level immutability enabled by default.
    :vartype enabled: bool
    :ivar immutability_policy: Specifies the default account-level immutability policy which is
     inherited and applied to objects that do not possess an explicit immutability policy at the
     object level. The object-level immutability policy has higher precedence than the
     container-level immutability policy, which has a higher precedence than the account-level
     immutability policy.
    :vartype immutability_policy: ~azure.mgmt.storage.models.AccountImmutabilityPolicyProperties
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A boolean flag which enables account-level immutability. All the containers under such an
     account have object-level immutability enabled by default."""
    immutability_policy: Optional["_models.AccountImmutabilityPolicyProperties"] = rest_field(
        name="immutabilityPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the default account-level immutability policy which is inherited and applied to
     objects that do not possess an explicit immutability policy at the object level. The
     object-level immutability policy has higher precedence than the container-level immutability
     policy, which has a higher precedence than the account-level immutability policy."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        immutability_policy: Optional["_models.AccountImmutabilityPolicyProperties"] = None,
    ) -> None: ...

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

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


class ImmutableStorageWithVersioning(_Model):
    """Object level immutability properties of the container.

    :ivar enabled: This is an immutable property, when set to true it enables object level
     immutability at the container level.
    :vartype enabled: bool
    :ivar time_stamp: Returns the date and time the object level immutability was enabled.
    :vartype time_stamp: ~datetime.datetime
    :ivar migration_state: This property denotes the container level immutability to object level
     immutability migration state. Known values are: "InProgress" and "Completed".
    :vartype migration_state: str or ~azure.mgmt.storage.models.MigrationState
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is an immutable property, when set to true it enables object level immutability at the
     container level."""
    time_stamp: Optional[datetime.datetime] = rest_field(name="timeStamp", visibility=["read"], format="rfc3339")
    """Returns the date and time the object level immutability was enabled."""
    migration_state: Optional[Union[str, "_models.MigrationState"]] = rest_field(
        name="migrationState", visibility=["read"]
    )
    """This property denotes the container level immutability to object level immutability migration
     state. Known values are: \"InProgress\" and \"Completed\"."""

    @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 IPRule(_Model):
    """IP rule with specific IP or IP range in CIDR format.

    :ivar ip_address_or_range: Specifies the IP or IP range in CIDR format. Required.
    :vartype ip_address_or_range: str
    :ivar action: The action of IP ACL rule. Default value is "Allow".
    :vartype action: str
    """

    ip_address_or_range: str = rest_field(name="value", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the IP or IP range in CIDR format. Required."""
    action: Optional[Literal["Allow"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The action of IP ACL rule. Default value is \"Allow\"."""

    @overload
    def __init__(
        self,
        *,
        ip_address_or_range: str,
        action: Optional[Literal["Allow"]] = None,
    ) -> None: ...

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

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


class KeyCreationTime(_Model):
    """Storage account keys creation time.

    :ivar key1:
    :vartype key1: ~datetime.datetime
    :ivar key2:
    :vartype key2: ~datetime.datetime
    """

    key1: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    key2: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )

    @overload
    def __init__(
        self,
        *,
        key1: Optional[datetime.datetime] = None,
        key2: 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 KeyPolicy(_Model):
    """KeyPolicy assigned to the storage account.

    :ivar key_expiration_period_in_days: The key expiration period in days. Required.
    :vartype key_expiration_period_in_days: int
    """

    key_expiration_period_in_days: int = rest_field(
        name="keyExpirationPeriodInDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """The key expiration period in days. Required."""

    @overload
    def __init__(
        self,
        *,
        key_expiration_period_in_days: int,
    ) -> None: ...

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

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


class KeyVaultProperties(_Model):
    """Properties of key vault.

    :ivar key_name: The name of KeyVault key.
    :vartype key_name: str
    :ivar key_version: The version of KeyVault key.
    :vartype key_version: str
    :ivar key_vault_uri: The Uri of KeyVault.
    :vartype key_vault_uri: str
    :ivar current_versioned_key_identifier: The object identifier of the current versioned Key
     Vault Key in use.
    :vartype current_versioned_key_identifier: str
    :ivar last_key_rotation_timestamp: Timestamp of last rotation of the Key Vault Key.
    :vartype last_key_rotation_timestamp: ~datetime.datetime
    :ivar current_versioned_key_expiration_timestamp: This is a read only property that represents
     the expiration time of the current version of the customer managed key used for encryption.
    :vartype current_versioned_key_expiration_timestamp: ~datetime.datetime
    """

    key_name: Optional[str] = rest_field(name="keyname", visibility=["read", "create", "update", "delete", "query"])
    """The name of KeyVault key."""
    key_version: Optional[str] = rest_field(
        name="keyversion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The version of KeyVault key."""
    key_vault_uri: Optional[str] = rest_field(
        name="keyvaulturi", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Uri of KeyVault."""
    current_versioned_key_identifier: Optional[str] = rest_field(
        name="currentVersionedKeyIdentifier", visibility=["read"]
    )
    """The object identifier of the current versioned Key Vault Key in use."""
    last_key_rotation_timestamp: Optional[datetime.datetime] = rest_field(
        name="lastKeyRotationTimestamp", visibility=["read"], format="rfc3339"
    )
    """Timestamp of last rotation of the Key Vault Key."""
    current_versioned_key_expiration_timestamp: Optional[datetime.datetime] = rest_field(
        name="currentVersionedKeyExpirationTimestamp", visibility=["read"], format="rfc3339"
    )
    """This is a read only property that represents the expiration time of the current version of the
     customer managed key used for encryption."""

    @overload
    def __init__(
        self,
        *,
        key_name: Optional[str] = None,
        key_version: Optional[str] = None,
        key_vault_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 LastAccessTimeTrackingPolicy(_Model):
    """The blob service properties for Last access time based tracking policy.

    :ivar enable: When set to true last access time based tracking is enabled. Required.
    :vartype enable: bool
    :ivar name: Name of the policy. The valid value is AccessTimeTracking. This field is currently
     read only. "AccessTimeTracking"
    :vartype name: str or ~azure.mgmt.storage.models.Name
    :ivar tracking_granularity_in_days: The field specifies blob object tracking granularity in
     days, typically how often the blob object should be tracked.This field is currently read only
     with value as 1.
    :vartype tracking_granularity_in_days: int
    :ivar blob_type: An array of predefined supported blob types. Only blockBlob is the supported
     value. This field is currently read only.
    :vartype blob_type: list[str]
    """

    enable: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """When set to true last access time based tracking is enabled. Required."""
    name: Optional[Union[str, "_models.Name"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the policy. The valid value is AccessTimeTracking. This field is currently read only.
     \"AccessTimeTracking\""""
    tracking_granularity_in_days: Optional[int] = rest_field(
        name="trackingGranularityInDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """The field specifies blob object tracking granularity in days, typically how often the blob
     object should be tracked.This field is currently read only with value as 1."""
    blob_type: Optional[list[str]] = rest_field(
        name="blobType", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of predefined supported blob types. Only blockBlob is the supported value. This field
     is currently read only."""

    @overload
    def __init__(
        self,
        *,
        enable: bool,
        name: Optional[Union[str, "_models.Name"]] = None,
        tracking_granularity_in_days: Optional[int] = None,
        blob_type: 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 LeaseContainerRequest(_Model):
    """Lease Container request schema.

    :ivar action: Specifies the lease action. Can be one of the available actions. Required. Known
     values are: "Acquire", "Renew", "Change", "Release", and "Break".
    :vartype action: str or ~azure.mgmt.storage.models.LeaseContainerRequestAction
    :ivar lease_id: Identifies the lease. Can be specified in any valid GUID string format.
    :vartype lease_id: str
    :ivar break_period: Optional. For a break action, proposed duration the lease should continue
     before it is broken, in seconds, between 0 and 60.
    :vartype break_period: int
    :ivar lease_duration: Required for acquire. Specifies the duration of the lease, in seconds, or
     negative one (-1) for a lease that never expires.
    :vartype lease_duration: int
    :ivar proposed_lease_id: Optional for acquire, required for change. Proposed lease ID, in a
     GUID string format.
    :vartype proposed_lease_id: str
    """

    action: Union[str, "_models.LeaseContainerRequestAction"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the lease action. Can be one of the available actions. Required. Known values are:
     \"Acquire\", \"Renew\", \"Change\", \"Release\", and \"Break\"."""
    lease_id: Optional[str] = rest_field(name="leaseId", visibility=["read", "create", "update", "delete", "query"])
    """Identifies the lease. Can be specified in any valid GUID string format."""
    break_period: Optional[int] = rest_field(
        name="breakPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. For a break action, proposed duration the lease should continue before it is broken,
     in seconds, between 0 and 60."""
    lease_duration: Optional[int] = rest_field(
        name="leaseDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for
     a lease that never expires."""
    proposed_lease_id: Optional[str] = rest_field(
        name="proposedLeaseId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional for acquire, required for change. Proposed lease ID, in a GUID string format."""

    @overload
    def __init__(
        self,
        *,
        action: Union[str, "_models.LeaseContainerRequestAction"],
        lease_id: Optional[str] = None,
        break_period: Optional[int] = None,
        lease_duration: Optional[int] = None,
        proposed_lease_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 LeaseContainerResponse(_Model):
    """Lease Container response schema.

    :ivar lease_id: Returned unique lease ID that must be included with any request to delete the
     container, or to renew, change, or release the lease.
    :vartype lease_id: str
    :ivar lease_time_seconds: Approximate time remaining in the lease period, in seconds.
    :vartype lease_time_seconds: str
    """

    lease_id: Optional[str] = rest_field(name="leaseId", visibility=["read", "create", "update", "delete", "query"])
    """Returned unique lease ID that must be included with any request to delete the container, or to
     renew, change, or release the lease."""
    lease_time_seconds: Optional[str] = rest_field(
        name="leaseTimeSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Approximate time remaining in the lease period, in seconds."""

    @overload
    def __init__(
        self,
        *,
        lease_id: Optional[str] = None,
        lease_time_seconds: 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 LeaseShareRequest(_Model):
    """Lease Share request schema.

    :ivar action: Specifies the lease action. Can be one of the available actions. Required. Known
     values are: "Acquire", "Renew", "Change", "Release", and "Break".
    :vartype action: str or ~azure.mgmt.storage.models.LeaseShareAction
    :ivar lease_id: Identifies the lease. Can be specified in any valid GUID string format.
    :vartype lease_id: str
    :ivar break_period: Optional. For a break action, proposed duration the lease should continue
     before it is broken, in seconds, between 0 and 60.
    :vartype break_period: int
    :ivar lease_duration: Required for acquire. Specifies the duration of the lease, in seconds, or
     negative one (-1) for a lease that never expires.
    :vartype lease_duration: int
    :ivar proposed_lease_id: Optional for acquire, required for change. Proposed lease ID, in a
     GUID string format.
    :vartype proposed_lease_id: str
    """

    action: Union[str, "_models.LeaseShareAction"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the lease action. Can be one of the available actions. Required. Known values are:
     \"Acquire\", \"Renew\", \"Change\", \"Release\", and \"Break\"."""
    lease_id: Optional[str] = rest_field(name="leaseId", visibility=["read", "create", "update", "delete", "query"])
    """Identifies the lease. Can be specified in any valid GUID string format."""
    break_period: Optional[int] = rest_field(
        name="breakPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. For a break action, proposed duration the lease should continue before it is broken,
     in seconds, between 0 and 60."""
    lease_duration: Optional[int] = rest_field(
        name="leaseDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for
     a lease that never expires."""
    proposed_lease_id: Optional[str] = rest_field(
        name="proposedLeaseId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional for acquire, required for change. Proposed lease ID, in a GUID string format."""

    @overload
    def __init__(
        self,
        *,
        action: Union[str, "_models.LeaseShareAction"],
        lease_id: Optional[str] = None,
        break_period: Optional[int] = None,
        lease_duration: Optional[int] = None,
        proposed_lease_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 LeaseShareResponse(_Model):
    """Lease Share response schema.

    :ivar lease_id: Returned unique lease ID that must be included with any request to delete the
     share, or to renew, change, or release the lease.
    :vartype lease_id: str
    :ivar lease_time_seconds: Approximate time remaining in the lease period, in seconds.
    :vartype lease_time_seconds: str
    """

    lease_id: Optional[str] = rest_field(name="leaseId", visibility=["read", "create", "update", "delete", "query"])
    """Returned unique lease ID that must be included with any request to delete the share, or to
     renew, change, or release the lease."""
    lease_time_seconds: Optional[str] = rest_field(
        name="leaseTimeSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Approximate time remaining in the lease period, in seconds."""

    @overload
    def __init__(
        self,
        *,
        lease_id: Optional[str] = None,
        lease_time_seconds: 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 LegalHold(_Model):
    """The LegalHold property of a blob container.

    :ivar has_legal_hold: The hasLegalHold public property is set to true by SRP if there are at
     least one existing tag. The hasLegalHold public property is set to false by SRP if all existing
     legal hold tags are cleared out. There can be a maximum of 1000 blob containers with
     hasLegalHold=true for a given account.
    :vartype has_legal_hold: bool
    :ivar tags: Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case
     at SRP. Required.
    :vartype tags: list[str]
    :ivar allow_protected_append_writes_all: When enabled, new blocks can be written to both
     'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks
     can be added and any existing blocks cannot be modified or deleted.
    :vartype allow_protected_append_writes_all: bool
    """

    has_legal_hold: Optional[bool] = rest_field(name="hasLegalHold", visibility=["read"])
    """The hasLegalHold public property is set to true by SRP if there are at least one existing tag.
     The hasLegalHold public property is set to false by SRP if all existing legal hold tags are
     cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given
     account."""
    tags: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.
     Required."""
    allow_protected_append_writes_all: Optional[bool] = rest_field(
        name="allowProtectedAppendWritesAll", visibility=["read", "create", "update", "delete", "query"]
    )
    """When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal
     hold protection and compliance. Only new blocks can be added and any existing blocks cannot be
     modified or deleted."""

    @overload
    def __init__(
        self,
        *,
        tags: list[str],
        allow_protected_append_writes_all: 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 LegalHoldProperties(_Model):
    """The LegalHold property of a blob container.

    :ivar has_legal_hold: The hasLegalHold public property is set to true by SRP if there are at
     least one existing tag. The hasLegalHold public property is set to false by SRP if all existing
     legal hold tags are cleared out. There can be a maximum of 1000 blob containers with
     hasLegalHold=true for a given account.
    :vartype has_legal_hold: bool
    :ivar tags: The list of LegalHold tags of a blob container.
    :vartype tags: list[~azure.mgmt.storage.models.TagProperty]
    :ivar protected_append_writes_history: Protected append blob writes history.
    :vartype protected_append_writes_history:
     ~azure.mgmt.storage.models.ProtectedAppendWritesHistory
    """

    has_legal_hold: Optional[bool] = rest_field(name="hasLegalHold", visibility=["read"])
    """The hasLegalHold public property is set to true by SRP if there are at least one existing tag.
     The hasLegalHold public property is set to false by SRP if all existing legal hold tags are
     cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given
     account."""
    tags: Optional[list["_models.TagProperty"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of LegalHold tags of a blob container."""
    protected_append_writes_history: Optional["_models.ProtectedAppendWritesHistory"] = rest_field(
        name="protectedAppendWritesHistory", visibility=["read", "create", "update", "delete", "query"]
    )
    """Protected append blob writes history."""

    @overload
    def __init__(
        self,
        *,
        tags: Optional[list["_models.TagProperty"]] = None,
        protected_append_writes_history: Optional["_models.ProtectedAppendWritesHistory"] = None,
    ) -> None: ...

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

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


class ListAccountSasResponse(_Model):
    """The List SAS credentials operation response.

    :ivar account_sas_token: List SAS credentials of storage account.
    :vartype account_sas_token: str
    """

    account_sas_token: Optional[str] = rest_field(name="accountSasToken", visibility=["read"])
    """List SAS credentials of storage account."""


class ListContainerItem(AzureEntityResource):
    """The blob container properties be listed out.

    :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.storage.models.SystemData
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar properties: The blob container properties be listed out.
    :vartype properties: ~azure.mgmt.storage.models.ContainerProperties
    """

    properties: Optional["_models.ContainerProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The blob container properties be listed out."""

    __flattened_items = [
        "version",
        "deleted",
        "deleted_time",
        "remaining_retention_days",
        "default_encryption_scope",
        "deny_encryption_scope_override",
        "public_access",
        "last_modified_time",
        "lease_status",
        "lease_state",
        "lease_duration",
        "metadata",
        "immutability_policy",
        "legal_hold",
        "has_legal_hold",
        "has_immutability_policy",
        "immutable_storage_with_versioning",
        "enable_nfs_v3_root_squash",
        "enable_nfs_v3_all_squash",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ListQueue(ResourceAutoGenerated):
    """ListQueue.

    :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.storage.models.SystemData
    :ivar queue_properties: List Queue resource properties.
    :vartype queue_properties: ~azure.mgmt.storage.models.ListQueueProperties
    """

    queue_properties: Optional["_models.ListQueueProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """List Queue resource properties."""

    __flattened_items = ["metadata"]

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

    @overload
    def __init__(self, mapping: Mapping[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.queue_properties is None:
                return None
            return getattr(self.queue_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.queue_properties is None:
                self.queue_properties = self._attr_to_rest_field["queue_properties"]._class_type()
            setattr(self.queue_properties, key, value)
        else:
            super().__setattr__(key, value)


class ListQueueProperties(_Model):
    """ListQueueProperties.

    :ivar metadata: A name-value pair that represents queue metadata.
    :vartype metadata: dict[str, str]
    """

    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A name-value pair that represents queue metadata."""

    @overload
    def __init__(
        self,
        *,
        metadata: 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 ListQueueServices(_Model):
    """ListQueueServices.

    :ivar value: List of queue services returned.
    :vartype value: list[~azure.mgmt.storage.models.QueueServiceProperties]
    """

    value: Optional[list["_models.QueueServiceProperties"]] = rest_field(visibility=["read"])
    """List of queue services returned."""


class ListServiceSasResponse(_Model):
    """The List service SAS credentials operation response.

    :ivar service_sas_token: List service SAS credentials of specific resource.
    :vartype service_sas_token: str
    """

    service_sas_token: Optional[str] = rest_field(name="serviceSasToken", visibility=["read"])
    """List service SAS credentials of specific resource."""


class ListTableServices(_Model):
    """ListTableServices.

    :ivar value: List of table services returned.
    :vartype value: list[~azure.mgmt.storage.models.TableServiceProperties]
    """

    value: Optional[list["_models.TableServiceProperties"]] = rest_field(visibility=["read"])
    """List of table services returned."""


class LocalUser(ProxyResource):
    """The local user associated with the storage accounts.

    :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.storage.models.SystemData
    :ivar properties: Storage account local user properties.
    :vartype properties: ~azure.mgmt.storage.models.LocalUserProperties
    """

    properties: Optional["_models.LocalUserProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account local user properties."""

    __flattened_items = [
        "permission_scopes",
        "home_directory",
        "ssh_authorized_keys",
        "sid",
        "has_shared_key",
        "has_ssh_key",
        "has_ssh_password",
        "user_id",
        "group_id",
        "allow_acl_authorization",
        "extended_groups",
        "is_nf_sv3_enabled",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 LocalUserKeys(_Model):
    """The Storage Account Local User keys.

    :ivar ssh_authorized_keys: Optional, local user ssh authorized keys for SFTP.
    :vartype ssh_authorized_keys: list[~azure.mgmt.storage.models.SshPublicKey]
    :ivar shared_key: Auto generated by the server for SMB authentication.
    :vartype shared_key: str
    """

    ssh_authorized_keys: Optional[list["_models.SshPublicKey"]] = rest_field(
        name="sshAuthorizedKeys", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, local user ssh authorized keys for SFTP."""
    shared_key: Optional[str] = rest_field(name="sharedKey", visibility=["read"])
    """Auto generated by the server for SMB authentication."""

    @overload
    def __init__(
        self,
        *,
        ssh_authorized_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 LocalUserProperties(_Model):
    """The Storage Account Local User properties.

    :ivar permission_scopes: The permission scopes of the local user.
    :vartype permission_scopes: list[~azure.mgmt.storage.models.PermissionScope]
    :ivar home_directory: Optional, local user home directory.
    :vartype home_directory: str
    :ivar ssh_authorized_keys: Optional, local user ssh authorized keys for SFTP.
    :vartype ssh_authorized_keys: list[~azure.mgmt.storage.models.SshPublicKey]
    :ivar sid: A unique Security Identifier that is generated by the server.
    :vartype sid: str
    :ivar has_shared_key: Indicates whether shared key exists. Set it to false to remove existing
     shared key.
    :vartype has_shared_key: bool
    :ivar has_ssh_key: Indicates whether ssh key exists. Set it to false to remove existing SSH
     key.
    :vartype has_ssh_key: bool
    :ivar has_ssh_password: Indicates whether ssh password exists. Set it to false to remove
     existing SSH password.
    :vartype has_ssh_password: bool
    :ivar user_id: A unique Identifier that is generated by the server.
    :vartype user_id: int
    :ivar group_id: An identifier for associating a group of users.
    :vartype group_id: int
    :ivar allow_acl_authorization: Indicates whether ACL authorization is allowed for this user.
     Set it to false to disallow using ACL authorization.
    :vartype allow_acl_authorization: bool
    :ivar extended_groups: Supplementary group membership. Only applicable for local users enabled
     for NFSv3 access.
    :vartype extended_groups: list[int]
    :ivar is_nf_sv3_enabled: Indicates if the local user is enabled for access with NFSv3 protocol.
    :vartype is_nf_sv3_enabled: bool
    """

    permission_scopes: Optional[list["_models.PermissionScope"]] = rest_field(
        name="permissionScopes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The permission scopes of the local user."""
    home_directory: Optional[str] = rest_field(
        name="homeDirectory", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, local user home directory."""
    ssh_authorized_keys: Optional[list["_models.SshPublicKey"]] = rest_field(
        name="sshAuthorizedKeys", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, local user ssh authorized keys for SFTP."""
    sid: Optional[str] = rest_field(visibility=["read"])
    """A unique Security Identifier that is generated by the server."""
    has_shared_key: Optional[bool] = rest_field(
        name="hasSharedKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether shared key exists. Set it to false to remove existing shared key."""
    has_ssh_key: Optional[bool] = rest_field(
        name="hasSshKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether ssh key exists. Set it to false to remove existing SSH key."""
    has_ssh_password: Optional[bool] = rest_field(
        name="hasSshPassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether ssh password exists. Set it to false to remove existing SSH password."""
    user_id: Optional[int] = rest_field(name="userId", visibility=["read"])
    """A unique Identifier that is generated by the server."""
    group_id: Optional[int] = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"])
    """An identifier for associating a group of users."""
    allow_acl_authorization: Optional[bool] = rest_field(
        name="allowAclAuthorization", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using
     ACL authorization."""
    extended_groups: Optional[list[int]] = rest_field(
        name="extendedGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Supplementary group membership. Only applicable for local users enabled for NFSv3 access."""
    is_nf_sv3_enabled: Optional[bool] = rest_field(
        name="isNFSv3Enabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates if the local user is enabled for access with NFSv3 protocol."""

    @overload
    def __init__(
        self,
        *,
        permission_scopes: Optional[list["_models.PermissionScope"]] = None,
        home_directory: Optional[str] = None,
        ssh_authorized_keys: Optional[list["_models.SshPublicKey"]] = None,
        has_shared_key: Optional[bool] = None,
        has_ssh_key: Optional[bool] = None,
        has_ssh_password: Optional[bool] = None,
        group_id: Optional[int] = None,
        allow_acl_authorization: Optional[bool] = None,
        extended_groups: Optional[list[int]] = None,
        is_nf_sv3_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 LocalUserRegeneratePasswordResult(_Model):
    """The secrets of Storage Account Local User.

    :ivar ssh_password: Auto generated password by the server for SSH authentication if
     hasSshPassword is set to true on the creation of local user.
    :vartype ssh_password: str
    """

    ssh_password: Optional[str] = rest_field(name="sshPassword", visibility=["read"])
    """Auto generated password by the server for SSH authentication if hasSshPassword is set to true
     on the creation of local user."""


class StorageConnectorAuthProperties(_Model):
    """The authentication properties of the backing data source.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ManagedIdentityAuthProperties

    :ivar type: Type of the authentication properties. Controls the type of the authProperties
     object. Required. "ManagedIdentity"
    :vartype type: str or ~azure.mgmt.storage.models.StorageConnectorAuthType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of the authentication properties. Controls the type of the authProperties object.
     Required. \"ManagedIdentity\""""

    @overload
    def __init__(
        self,
        *,
        type: 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 ManagedIdentityAuthProperties(StorageConnectorAuthProperties, discriminator="ManagedIdentity"):
    """The managed identity auth properties for dataShare connection.

    :ivar type: The type of managed identity auth. Required. Managed Identity auth type.
    :vartype type: str or ~azure.mgmt.storage.models.MANAGED_IDENTITY
    :ivar identity_resource_id: ARM ResourceId of the managed identity that should be used to
     authenticate to the backing data source.
    :vartype identity_resource_id: str
    """

    type: Literal[StorageConnectorAuthType.MANAGED_IDENTITY] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of managed identity auth. Required. Managed Identity auth type."""
    identity_resource_id: Optional[str] = rest_field(
        name="identityResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM ResourceId of the managed identity that should be used to authenticate to the backing data
     source."""

    @overload
    def __init__(
        self,
        *,
        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)
        self.type = StorageConnectorAuthType.MANAGED_IDENTITY  # type: ignore


class StorageConnectorAuthPropertiesUpdate(_Model):
    """The authentication properties of the backing data source.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ManagedIdentityAuthPropertiesUpdate

    :ivar type: Type of the authentication properties. Controls the type of the authProperties
     object. Required. "ManagedIdentity"
    :vartype type: str or ~azure.mgmt.storage.models.StorageConnectorAuthType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of the authentication properties. Controls the type of the authProperties object.
     Required. \"ManagedIdentity\""""

    @overload
    def __init__(
        self,
        *,
        type: 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 ManagedIdentityAuthPropertiesUpdate(StorageConnectorAuthPropertiesUpdate, discriminator="ManagedIdentity"):
    """The managed identity auth properties for dataShare connection.

    :ivar type: Discriminator value for ManagedIdentity. Required. Managed Identity auth type.
    :vartype type: str or ~azure.mgmt.storage.models.MANAGED_IDENTITY
    :ivar identity_resource_id: ARM ResourceId of the managed identity that should be used to
     authenticate to the backing data source.
    :vartype identity_resource_id: str
    """

    type: Literal[StorageConnectorAuthType.MANAGED_IDENTITY] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Discriminator value for ManagedIdentity. Required. Managed Identity auth type."""
    identity_resource_id: Optional[str] = rest_field(
        name="identityResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """ARM ResourceId of the managed identity that should be used to authenticate to the backing data
     source."""

    @overload
    def __init__(
        self,
        *,
        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)
        self.type = StorageConnectorAuthType.MANAGED_IDENTITY  # type: ignore


class ManagementPolicy(ProxyResource):
    """The Get Storage Account ManagementPolicies operation response.

    :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.storage.models.SystemData
    :ivar properties: Returns the Storage Account Data Policies Rules.
    :vartype properties: ~azure.mgmt.storage.models.ManagementPolicyProperties
    """

    properties: Optional["_models.ManagementPolicyProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Returns the Storage Account Data Policies Rules."""

    __flattened_items = ["last_modified_time", "policy"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ManagementPolicyAction(_Model):
    """Actions are applied to the filtered blobs when the execution condition is met.

    :ivar base_blob: The management policy action for base blob.
    :vartype base_blob: ~azure.mgmt.storage.models.ManagementPolicyBaseBlob
    :ivar snapshot: The management policy action for snapshot.
    :vartype snapshot: ~azure.mgmt.storage.models.ManagementPolicySnapShot
    :ivar version: The management policy action for version.
    :vartype version: ~azure.mgmt.storage.models.ManagementPolicyVersion
    """

    base_blob: Optional["_models.ManagementPolicyBaseBlob"] = rest_field(
        name="baseBlob", visibility=["read", "create", "update", "delete", "query"]
    )
    """The management policy action for base blob."""
    snapshot: Optional["_models.ManagementPolicySnapShot"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The management policy action for snapshot."""
    version: Optional["_models.ManagementPolicyVersion"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The management policy action for version."""

    @overload
    def __init__(
        self,
        *,
        base_blob: Optional["_models.ManagementPolicyBaseBlob"] = None,
        snapshot: Optional["_models.ManagementPolicySnapShot"] = None,
        version: Optional["_models.ManagementPolicyVersion"] = None,
    ) -> None: ...

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

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


class ManagementPolicyBaseBlob(_Model):
    """Management policy action for base blob.

    :ivar tier_to_cool: The function to tier blobs to cool storage.
    :vartype tier_to_cool: ~azure.mgmt.storage.models.DateAfterModification
    :ivar tier_to_archive: The function to tier blobs to archive storage.
    :vartype tier_to_archive: ~azure.mgmt.storage.models.DateAfterModification
    :ivar tier_to_cold: The function to tier blobs to cold storage.
    :vartype tier_to_cold: ~azure.mgmt.storage.models.DateAfterModification
    :ivar tier_to_hot: The function to tier blobs to hot storage. This action can only be used with
     Premium Block Blob Storage Accounts.
    :vartype tier_to_hot: ~azure.mgmt.storage.models.DateAfterModification
    :ivar delete: The function to delete the blob.
    :vartype delete: ~azure.mgmt.storage.models.DateAfterModification
    :ivar enable_auto_tier_to_hot_from_cool: This property enables auto tiering of a blob from cool
     to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan.
    :vartype enable_auto_tier_to_hot_from_cool: bool
    """

    tier_to_cool: Optional["_models.DateAfterModification"] = rest_field(
        name="tierToCool", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to cool storage."""
    tier_to_archive: Optional["_models.DateAfterModification"] = rest_field(
        name="tierToArchive", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to archive storage."""
    tier_to_cold: Optional["_models.DateAfterModification"] = rest_field(
        name="tierToCold", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to cold storage."""
    tier_to_hot: Optional["_models.DateAfterModification"] = rest_field(
        name="tierToHot", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to hot storage. This action can only be used with Premium Block Blob
     Storage Accounts."""
    delete: Optional["_models.DateAfterModification"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to delete the blob."""
    enable_auto_tier_to_hot_from_cool: Optional[bool] = rest_field(
        name="enableAutoTierToHotFromCool", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property enables auto tiering of a blob from cool to hot on a blob access. This property
     requires tierToCool.daysAfterLastAccessTimeGreaterThan."""

    @overload
    def __init__(
        self,
        *,
        tier_to_cool: Optional["_models.DateAfterModification"] = None,
        tier_to_archive: Optional["_models.DateAfterModification"] = None,
        tier_to_cold: Optional["_models.DateAfterModification"] = None,
        tier_to_hot: Optional["_models.DateAfterModification"] = None,
        delete: Optional["_models.DateAfterModification"] = None,
        enable_auto_tier_to_hot_from_cool: 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 ManagementPolicyDefinition(_Model):
    """An object that defines the Lifecycle rule. Each definition is made up with a filters set and an
    actions set.

    :ivar actions: An object that defines the action set. Required.
    :vartype actions: ~azure.mgmt.storage.models.ManagementPolicyAction
    :ivar filters: An object that defines the filter set.
    :vartype filters: ~azure.mgmt.storage.models.ManagementPolicyFilter
    """

    actions: "_models.ManagementPolicyAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An object that defines the action set. Required."""
    filters: Optional["_models.ManagementPolicyFilter"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An object that defines the filter set."""

    @overload
    def __init__(
        self,
        *,
        actions: "_models.ManagementPolicyAction",
        filters: Optional["_models.ManagementPolicyFilter"] = None,
    ) -> None: ...

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

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


class ManagementPolicyFilter(_Model):
    """Filters limit rule actions to a subset of blobs within the storage account. If multiple filters
    are defined, a logical AND is performed on all filters.

    :ivar prefix_match: An array of strings for prefixes to be match.
    :vartype prefix_match: list[str]
    :ivar blob_types: An array of predefined enum values. Currently blockBlob supports all tiering
     and delete actions. Only delete actions are supported for appendBlob. Required.
    :vartype blob_types: list[str]
    :ivar blob_index_match: An array of blob index tag based filters, there can be at most 10 tag
     filters.
    :vartype blob_index_match: list[~azure.mgmt.storage.models.TagFilter]
    """

    prefix_match: Optional[list[str]] = rest_field(
        name="prefixMatch", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of strings for prefixes to be match."""
    blob_types: list[str] = rest_field(name="blobTypes", visibility=["read", "create", "update", "delete", "query"])
    """An array of predefined enum values. Currently blockBlob supports all tiering and delete
     actions. Only delete actions are supported for appendBlob. Required."""
    blob_index_match: Optional[list["_models.TagFilter"]] = rest_field(
        name="blobIndexMatch", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of blob index tag based filters, there can be at most 10 tag filters."""

    @overload
    def __init__(
        self,
        *,
        blob_types: list[str],
        prefix_match: Optional[list[str]] = None,
        blob_index_match: Optional[list["_models.TagFilter"]] = None,
    ) -> None: ...

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

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


class ManagementPolicyProperties(_Model):
    """The Storage Account ManagementPolicy properties.

    :ivar last_modified_time: Returns the date and time the ManagementPolicies was last modified.
    :vartype last_modified_time: ~datetime.datetime
    :ivar policy: The Storage Account ManagementPolicy, in JSON format. See more details in:
     `https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview
     <https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview>`_. Required.
    :vartype policy: ~azure.mgmt.storage.models.ManagementPolicySchema
    """

    last_modified_time: Optional[datetime.datetime] = rest_field(
        name="lastModifiedTime", visibility=["read"], format="rfc3339"
    )
    """Returns the date and time the ManagementPolicies was last modified."""
    policy: "_models.ManagementPolicySchema" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Storage Account ManagementPolicy, in JSON format. See more details in:
     `https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview
     <https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview>`_. Required."""

    @overload
    def __init__(
        self,
        *,
        policy: "_models.ManagementPolicySchema",
    ) -> None: ...

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

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


class ManagementPolicyRule(_Model):
    """An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.

    :ivar enabled: Rule is enabled if set to true.
    :vartype enabled: bool
    :ivar name: A rule name can contain any combination of alpha numeric characters. Rule name is
     case-sensitive. It must be unique within a policy. Required.
    :vartype name: str
    :ivar type: The valid value is Lifecycle. Required. "Lifecycle"
    :vartype type: str or ~azure.mgmt.storage.models.RuleType
    :ivar definition: An object that defines the Lifecycle rule. Required.
    :vartype definition: ~azure.mgmt.storage.models.ManagementPolicyDefinition
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Rule is enabled if set to true."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A rule name can contain any combination of alpha numeric characters. Rule name is
     case-sensitive. It must be unique within a policy. Required."""
    type: Union[str, "_models.RuleType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The valid value is Lifecycle. Required. \"Lifecycle\""""
    definition: "_models.ManagementPolicyDefinition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An object that defines the Lifecycle rule. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        type: Union[str, "_models.RuleType"],
        definition: "_models.ManagementPolicyDefinition",
        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 ManagementPolicySchema(_Model):
    """The Storage Account ManagementPolicies Rules. See more details in:
    `https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview
    <https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview>`_.

    :ivar rules: The Storage Account ManagementPolicies Rules. See more details in:
     `https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview
     <https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview>`_. Required.
    :vartype rules: list[~azure.mgmt.storage.models.ManagementPolicyRule]
    """

    rules: list["_models.ManagementPolicyRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Storage Account ManagementPolicies Rules. See more details in:
     `https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview
     <https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview>`_. Required."""

    @overload
    def __init__(
        self,
        *,
        rules: list["_models.ManagementPolicyRule"],
    ) -> None: ...

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

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


class ManagementPolicySnapShot(_Model):
    """Management policy action for snapshot.

    :ivar tier_to_cool: The function to tier blob snapshot to cool storage.
    :vartype tier_to_cool: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_archive: The function to tier blob snapshot to archive storage.
    :vartype tier_to_archive: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_cold: The function to tier blobs to cold storage.
    :vartype tier_to_cold: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_hot: The function to tier blobs to hot storage. This action can only be used with
     Premium Block Blob Storage Accounts.
    :vartype tier_to_hot: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar delete: The function to delete the blob snapshot.
    :vartype delete: ~azure.mgmt.storage.models.DateAfterCreation
    """

    tier_to_cool: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToCool", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blob snapshot to cool storage."""
    tier_to_archive: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToArchive", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blob snapshot to archive storage."""
    tier_to_cold: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToCold", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to cold storage."""
    tier_to_hot: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToHot", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to hot storage. This action can only be used with Premium Block Blob
     Storage Accounts."""
    delete: Optional["_models.DateAfterCreation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to delete the blob snapshot."""

    @overload
    def __init__(
        self,
        *,
        tier_to_cool: Optional["_models.DateAfterCreation"] = None,
        tier_to_archive: Optional["_models.DateAfterCreation"] = None,
        tier_to_cold: Optional["_models.DateAfterCreation"] = None,
        tier_to_hot: Optional["_models.DateAfterCreation"] = None,
        delete: Optional["_models.DateAfterCreation"] = None,
    ) -> None: ...

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

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


class ManagementPolicyVersion(_Model):
    """Management policy action for blob version.

    :ivar tier_to_cool: The function to tier blob version to cool storage.
    :vartype tier_to_cool: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_archive: The function to tier blob version to archive storage.
    :vartype tier_to_archive: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_cold: The function to tier blobs to cold storage.
    :vartype tier_to_cold: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar tier_to_hot: The function to tier blobs to hot storage. This action can only be used with
     Premium Block Blob Storage Accounts.
    :vartype tier_to_hot: ~azure.mgmt.storage.models.DateAfterCreation
    :ivar delete: The function to delete the blob version.
    :vartype delete: ~azure.mgmt.storage.models.DateAfterCreation
    """

    tier_to_cool: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToCool", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blob version to cool storage."""
    tier_to_archive: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToArchive", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blob version to archive storage."""
    tier_to_cold: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToCold", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to cold storage."""
    tier_to_hot: Optional["_models.DateAfterCreation"] = rest_field(
        name="tierToHot", visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to tier blobs to hot storage. This action can only be used with Premium Block Blob
     Storage Accounts."""
    delete: Optional["_models.DateAfterCreation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The function to delete the blob version."""

    @overload
    def __init__(
        self,
        *,
        tier_to_cool: Optional["_models.DateAfterCreation"] = None,
        tier_to_archive: Optional["_models.DateAfterCreation"] = None,
        tier_to_cold: Optional["_models.DateAfterCreation"] = None,
        tier_to_hot: Optional["_models.DateAfterCreation"] = None,
        delete: Optional["_models.DateAfterCreation"] = None,
    ) -> None: ...

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

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


class MetricSpecification(_Model):
    """Metric specification of operation.

    :ivar name: Name of metric specification.
    :vartype name: str
    :ivar display_name: Display name of metric specification.
    :vartype display_name: str
    :ivar display_description: Display description of metric specification.
    :vartype display_description: str
    :ivar unit: Unit could be Bytes or Count.
    :vartype unit: str
    :ivar dimensions: Dimensions of blobs, including blob type and access tier.
    :vartype dimensions: list[~azure.mgmt.storage.models.Dimension]
    :ivar aggregation_type: Aggregation type could be Average.
    :vartype aggregation_type: str
    :ivar fill_gap_with_zero: The property to decide fill gap with zero or not.
    :vartype fill_gap_with_zero: bool
    :ivar category: The category this metric specification belong to, could be Capacity.
    :vartype category: str
    :ivar resource_id_dimension_name_override: Account Resource Id.
    :vartype resource_id_dimension_name_override: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of metric specification."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Display name of metric specification."""
    display_description: Optional[str] = rest_field(
        name="displayDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """Display description of metric specification."""
    unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unit could be Bytes or Count."""
    dimensions: Optional[list["_models.Dimension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Dimensions of blobs, including blob type and access tier."""
    aggregation_type: Optional[str] = rest_field(
        name="aggregationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Aggregation type could be Average."""
    fill_gap_with_zero: Optional[bool] = rest_field(
        name="fillGapWithZero", visibility=["read", "create", "update", "delete", "query"]
    )
    """The property to decide fill gap with zero or not."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The category this metric specification belong to, could be Capacity."""
    resource_id_dimension_name_override: Optional[str] = rest_field(
        name="resourceIdDimensionNameOverride", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account Resource Id."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        display_name: Optional[str] = None,
        display_description: Optional[str] = None,
        unit: Optional[str] = None,
        dimensions: Optional[list["_models.Dimension"]] = None,
        aggregation_type: Optional[str] = None,
        fill_gap_with_zero: Optional[bool] = None,
        category: Optional[str] = None,
        resource_id_dimension_name_override: 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 Multichannel(_Model):
    """Multichannel setting. Applies to Premium FileStorage only.

    :ivar enabled: Indicates whether multichannel is enabled.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether multichannel is enabled."""

    @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 NetworkRuleSet(_Model):
    """Network rule set.

    :ivar bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible
     values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"),
     or None to bypass none of those traffics. Known values are: "None", "Logging", "Metrics", and
     "AzureServices".
    :vartype bypass: str or ~azure.mgmt.storage.models.Bypass
    :ivar resource_access_rules: Sets the resource access rules.
    :vartype resource_access_rules: list[~azure.mgmt.storage.models.ResourceAccessRule]
    :ivar virtual_network_rules: Sets the virtual network rules.
    :vartype virtual_network_rules: list[~azure.mgmt.storage.models.VirtualNetworkRule]
    :ivar ip_rules: Sets the IP ACL rules.
    :vartype ip_rules: list[~azure.mgmt.storage.models.IPRule]
    :ivar ipv6_rules: Sets the IPv6 ACL rules.
    :vartype ipv6_rules: list[~azure.mgmt.storage.models.IPRule]
    :ivar default_action: Specifies the default action of allow or deny when no other rules match.
     Required. Known values are: "Allow" and "Deny".
    :vartype default_action: str or ~azure.mgmt.storage.models.DefaultAction
    """

    bypass: Optional[Union[str, "_models.Bypass"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are
     any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None
     to bypass none of those traffics. Known values are: \"None\", \"Logging\", \"Metrics\", and
     \"AzureServices\"."""
    resource_access_rules: Optional[list["_models.ResourceAccessRule"]] = rest_field(
        name="resourceAccessRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sets the resource access rules."""
    virtual_network_rules: Optional[list["_models.VirtualNetworkRule"]] = rest_field(
        name="virtualNetworkRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sets the virtual network rules."""
    ip_rules: Optional[list["_models.IPRule"]] = rest_field(
        name="ipRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sets the IP ACL rules."""
    ipv6_rules: Optional[list["_models.IPRule"]] = rest_field(
        name="ipv6Rules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sets the IPv6 ACL rules."""
    default_action: Union[str, "_models.DefaultAction"] = rest_field(
        name="defaultAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the default action of allow or deny when no other rules match. Required. Known values
     are: \"Allow\" and \"Deny\"."""

    @overload
    def __init__(
        self,
        *,
        default_action: Union[str, "_models.DefaultAction"],
        bypass: Optional[Union[str, "_models.Bypass"]] = None,
        resource_access_rules: Optional[list["_models.ResourceAccessRule"]] = None,
        virtual_network_rules: Optional[list["_models.VirtualNetworkRule"]] = None,
        ip_rules: Optional[list["_models.IPRule"]] = None,
        ipv6_rules: Optional[list["_models.IPRule"]] = None,
    ) -> None: ...

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

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


class NetworkSecurityPerimeter(_Model):
    """NetworkSecurityPerimeter related information.

    :ivar id: The ARM identifier of the resource.
    :vartype id: str
    :ivar perimeter_guid: Guid of the resource.
    :vartype perimeter_guid: str
    :ivar location: Location of the resource.
    :vartype location: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ARM identifier of the resource."""
    perimeter_guid: Optional[str] = rest_field(
        name="perimeterGuid", visibility=["read", "create", "update", "delete", "query"]
    )
    """Guid of the resource."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """Location of the resource."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        perimeter_guid: Optional[str] = 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:
        super().__init__(*args, **kwargs)


class NetworkSecurityPerimeterConfiguration(ProxyResource):
    """The Network Security Perimeter configuration 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.storage.models.SystemData
    :ivar properties: Properties of the Network Security Perimeter Configuration.
    :vartype properties: ~azure.mgmt.storage.models.NetworkSecurityPerimeterConfigurationProperties
    """

    properties: Optional["_models.NetworkSecurityPerimeterConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the Network Security Perimeter Configuration."""

    __flattened_items = [
        "provisioning_state",
        "provisioning_issues",
        "network_security_perimeter",
        "resource_association",
        "profile",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 NetworkSecurityPerimeterConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Properties of the Network Security Perimeter Configuration.

    :ivar provisioning_state: Provisioning state of Network Security Perimeter configuration
     propagation. Known values are: "Accepted", "Succeeded", "Failed", "Deleting", and "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.storage.models.NetworkSecurityPerimeterConfigurationProvisioningState
    :ivar provisioning_issues: List of Provisioning Issues if any.
    :vartype provisioning_issues: list[~azure.mgmt.storage.models.ProvisioningIssue]
    :ivar network_security_perimeter: NetworkSecurityPerimeter related information.
    :vartype network_security_perimeter: ~azure.mgmt.storage.models.NetworkSecurityPerimeter
    :ivar resource_association: Information about resource association.
    :vartype resource_association:
     ~azure.mgmt.storage.models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation
    :ivar profile: Network Security Perimeter profile.
    :vartype profile:
     ~azure.mgmt.storage.models.NetworkSecurityPerimeterConfigurationPropertiesProfile
    """

    provisioning_state: Optional[Union[str, "_models.NetworkSecurityPerimeterConfigurationProvisioningState"]] = (
        rest_field(name="provisioningState", visibility=["read"])
    )
    """Provisioning state of Network Security Perimeter configuration propagation. Known values are:
     \"Accepted\", \"Succeeded\", \"Failed\", \"Deleting\", and \"Canceled\"."""
    provisioning_issues: Optional[list["_models.ProvisioningIssue"]] = rest_field(
        name="provisioningIssues", visibility=["read"]
    )
    """List of Provisioning Issues if any."""
    network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = rest_field(
        name="networkSecurityPerimeter", visibility=["read"]
    )
    """NetworkSecurityPerimeter related information."""
    resource_association: Optional["_models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation"] = (
        rest_field(name="resourceAssociation", visibility=["read"])
    )
    """Information about resource association."""
    profile: Optional["_models.NetworkSecurityPerimeterConfigurationPropertiesProfile"] = rest_field(
        visibility=["read"]
    )
    """Network Security Perimeter profile."""


class NetworkSecurityPerimeterConfigurationPropertiesProfile(_Model):  # pylint: disable=name-too-long
    """Network Security Perimeter profile.

    :ivar name: Name of the resource.
    :vartype name: str
    :ivar access_rules_version: Current access rules version.
    :vartype access_rules_version: float
    :ivar access_rules: List of Access Rules.
    :vartype access_rules: list[~azure.mgmt.storage.models.NspAccessRule]
    :ivar diagnostic_settings_version: Diagnostic settings version.
    :vartype diagnostic_settings_version: float
    :ivar enabled_log_categories: Enabled logging categories.
    :vartype enabled_log_categories: list[str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource."""
    access_rules_version: Optional[float] = rest_field(
        name="accessRulesVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Current access rules version."""
    access_rules: Optional[list["_models.NspAccessRule"]] = rest_field(
        name="accessRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Access Rules."""
    diagnostic_settings_version: Optional[float] = rest_field(
        name="diagnosticSettingsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Diagnostic settings version."""
    enabled_log_categories: Optional[list[str]] = rest_field(
        name="enabledLogCategories", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enabled logging categories."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        access_rules_version: Optional[float] = None,
        access_rules: Optional[list["_models.NspAccessRule"]] = None,
        diagnostic_settings_version: Optional[float] = None,
        enabled_log_categories: 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 NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(_Model):  # pylint: disable=name-too-long
    """Information about resource association.

    :ivar name: Name of the resource association.
    :vartype name: str
    :ivar access_mode: Access Mode of the resource association. Known values are: "Enforced",
     "Learning", and "Audit".
    :vartype access_mode: str or ~azure.mgmt.storage.models.ResourceAssociationAccessMode
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource association."""
    access_mode: Optional[Union[str, "_models.ResourceAssociationAccessMode"]] = rest_field(
        name="accessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access Mode of the resource association. Known values are: \"Enforced\", \"Learning\", and
     \"Audit\"."""

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

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

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


class NfsSetting(_Model):
    """Setting for NFS protocol.

    :ivar encryption_in_transit: Encryption in transit setting.
    :vartype encryption_in_transit: ~azure.mgmt.storage.models.EncryptionInTransit
    """

    encryption_in_transit: Optional["_models.EncryptionInTransit"] = rest_field(
        name="encryptionInTransit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption in transit setting."""

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

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

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


class NspAccessRule(_Model):
    """Information of Access Rule in Network Security Perimeter profile.

    :ivar name: Name of the resource.
    :vartype name: str
    :ivar properties: Properties of Access Rule.
    :vartype properties: ~azure.mgmt.storage.models.NspAccessRuleProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource."""
    properties: Optional["_models.NspAccessRuleProperties"] = rest_field(visibility=["read"])
    """Properties of Access Rule."""

    @overload
    def __init__(
        self,
        *,
        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 NspAccessRuleProperties(_Model):
    """Properties of Access Rule.

    :ivar direction: Direction of Access Rule. Known values are: "Inbound" and "Outbound".
    :vartype direction: str or ~azure.mgmt.storage.models.NspAccessRuleDirection
    :ivar address_prefixes: Address prefixes in the CIDR format for inbound rules.
    :vartype address_prefixes: list[str]
    :ivar subscriptions: Subscriptions for inbound rules.
    :vartype subscriptions:
     list[~azure.mgmt.storage.models.NspAccessRulePropertiesSubscriptionsItem]
    :ivar network_security_perimeters: NetworkSecurityPerimeters for inbound rules.
    :vartype network_security_perimeters: list[~azure.mgmt.storage.models.NetworkSecurityPerimeter]
    :ivar fully_qualified_domain_names: FQDN for outbound rules.
    :vartype fully_qualified_domain_names: list[str]
    """

    direction: Optional[Union[str, "_models.NspAccessRuleDirection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Direction of Access Rule. Known values are: \"Inbound\" and \"Outbound\"."""
    address_prefixes: Optional[list[str]] = rest_field(
        name="addressPrefixes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Address prefixes in the CIDR format for inbound rules."""
    subscriptions: Optional[list["_models.NspAccessRulePropertiesSubscriptionsItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Subscriptions for inbound rules."""
    network_security_perimeters: Optional[list["_models.NetworkSecurityPerimeter"]] = rest_field(
        name="networkSecurityPerimeters", visibility=["read"]
    )
    """NetworkSecurityPerimeters for inbound rules."""
    fully_qualified_domain_names: Optional[list[str]] = rest_field(
        name="fullyQualifiedDomainNames", visibility=["read"]
    )
    """FQDN for outbound rules."""

    @overload
    def __init__(
        self,
        *,
        direction: Optional[Union[str, "_models.NspAccessRuleDirection"]] = None,
        address_prefixes: Optional[list[str]] = None,
        subscriptions: Optional[list["_models.NspAccessRulePropertiesSubscriptionsItem"]] = None,
    ) -> None: ...

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

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


class NspAccessRulePropertiesSubscriptionsItem(_Model):
    """Subscription for inbound rule.

    :ivar id: The ARM identifier of subscription.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ARM identifier of subscription."""

    @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 ObjectReplicationPolicy(ProxyResource):
    """The replication policy between two storage accounts. Multiple rules can be defined in one
    policy.

    :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.storage.models.SystemData
    :ivar properties: Returns the Storage Account Object Replication Policy.
    :vartype properties: ~azure.mgmt.storage.models.ObjectReplicationPolicyProperties
    """

    properties: Optional["_models.ObjectReplicationPolicyProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Returns the Storage Account Object Replication Policy."""

    __flattened_items = [
        "policy_id",
        "enabled_time",
        "source_account",
        "destination_account",
        "rules",
        "metrics",
        "priority_replication",
        "tags_replication",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ObjectReplicationPolicyFilter(_Model):
    """Filters limit replication to a subset of blobs within the storage account. A logical OR is
    performed on values in the filter. If multiple filters are defined, a logical AND is performed
    on all filters.

    :ivar prefix_match: Optional. Filters the results to replicate only blobs whose names begin
     with the specified prefix.
    :vartype prefix_match: list[str]
    :ivar min_creation_time: Blobs created after the time will be replicated to the destination. It
     must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z.
    :vartype min_creation_time: str
    """

    prefix_match: Optional[list[str]] = rest_field(
        name="prefixMatch", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Filters the results to replicate only blobs whose names begin with the specified
     prefix."""
    min_creation_time: Optional[str] = rest_field(
        name="minCreationTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """Blobs created after the time will be replicated to the destination. It must be in datetime
     format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z."""

    @overload
    def __init__(
        self,
        *,
        prefix_match: Optional[list[str]] = None,
        min_creation_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 ObjectReplicationPolicyProperties(_Model):
    """The Storage Account ObjectReplicationPolicy properties.

    :ivar policy_id: A unique id for object replication policy.
    :vartype policy_id: str
    :ivar enabled_time: Indicates when the policy is enabled on the source account.
    :vartype enabled_time: ~datetime.datetime
    :ivar source_account: Required. Source account name. It should be full resource id if
     allowCrossTenantReplication set to false. Required.
    :vartype source_account: str
    :ivar destination_account: Required. Destination account name. It should be full resource id if
     allowCrossTenantReplication set to false. Required.
    :vartype destination_account: str
    :ivar rules: The storage account object replication rules.
    :vartype rules: list[~azure.mgmt.storage.models.ObjectReplicationPolicyRule]
    :ivar metrics: Optional. The object replication policy metrics feature options.
    :vartype metrics: ~azure.mgmt.storage.models.ObjectReplicationPolicyPropertiesMetrics
    :ivar priority_replication: Optional. The object replication policy priority replication
     feature options.
    :vartype priority_replication:
     ~azure.mgmt.storage.models.ObjectReplicationPolicyPropertiesPriorityReplication
    :ivar tags_replication: Optional. The object replication policy tags replication feature
     options.
    :vartype tags_replication:
     ~azure.mgmt.storage.models.ObjectReplicationPolicyPropertiesTagsReplication
    """

    policy_id: Optional[str] = rest_field(name="policyId", visibility=["read"])
    """A unique id for object replication policy."""
    enabled_time: Optional[datetime.datetime] = rest_field(name="enabledTime", visibility=["read"], format="rfc3339")
    """Indicates when the policy is enabled on the source account."""
    source_account: str = rest_field(name="sourceAccount", visibility=["read", "create", "update", "delete", "query"])
    """Required. Source account name. It should be full resource id if allowCrossTenantReplication set
     to false. Required."""
    destination_account: str = rest_field(
        name="destinationAccount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Destination account name. It should be full resource id if
     allowCrossTenantReplication set to false. Required."""
    rules: Optional[list["_models.ObjectReplicationPolicyRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage account object replication rules."""
    metrics: Optional["_models.ObjectReplicationPolicyPropertiesMetrics"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The object replication policy metrics feature options."""
    priority_replication: Optional["_models.ObjectReplicationPolicyPropertiesPriorityReplication"] = rest_field(
        name="priorityReplication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The object replication policy priority replication feature options."""
    tags_replication: Optional["_models.ObjectReplicationPolicyPropertiesTagsReplication"] = rest_field(
        name="tagsReplication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The object replication policy tags replication feature options."""

    @overload
    def __init__(
        self,
        *,
        source_account: str,
        destination_account: str,
        rules: Optional[list["_models.ObjectReplicationPolicyRule"]] = None,
        metrics: Optional["_models.ObjectReplicationPolicyPropertiesMetrics"] = None,
        priority_replication: Optional["_models.ObjectReplicationPolicyPropertiesPriorityReplication"] = None,
        tags_replication: Optional["_models.ObjectReplicationPolicyPropertiesTagsReplication"] = None,
    ) -> None: ...

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

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


class ObjectReplicationPolicyPropertiesMetrics(_Model):
    """Optional. The object replication policy metrics feature options.

    :ivar enabled: Indicates whether object replication metrics feature is enabled for the policy.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether object replication metrics feature is enabled for the policy."""

    @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 ObjectReplicationPolicyPropertiesPriorityReplication(_Model):  # pylint: disable=name-too-long
    """Optional. The object replication policy priority replication feature options.

    :ivar enabled: Indicates whether object replication priority replication feature is enabled for
     the policy.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether object replication priority replication feature is enabled for the policy."""

    @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 ObjectReplicationPolicyPropertiesTagsReplication(_Model):  # pylint: disable=name-too-long
    """Optional. The object replication policy tags replication feature options.

    :ivar enabled: Indicates whether object replication tags replication feature is enabled for the
     policy.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether object replication tags replication feature is enabled for the policy."""

    @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 ObjectReplicationPolicyRule(_Model):
    """The replication policy rule between two containers.

    :ivar rule_id: Rule Id is auto-generated for each new rule on destination account. It is
     required for put policy on source account.
    :vartype rule_id: str
    :ivar source_container: Required. Source container name. Required.
    :vartype source_container: str
    :ivar destination_container: Required. Destination container name. Required.
    :vartype destination_container: str
    :ivar filters: Optional. An object that defines the filter set.
    :vartype filters: ~azure.mgmt.storage.models.ObjectReplicationPolicyFilter
    """

    rule_id: Optional[str] = rest_field(name="ruleId", visibility=["read", "create", "update", "delete", "query"])
    """Rule Id is auto-generated for each new rule on destination account. It is required for put
     policy on source account."""
    source_container: str = rest_field(
        name="sourceContainer", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Source container name. Required."""
    destination_container: str = rest_field(
        name="destinationContainer", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Destination container name. Required."""
    filters: Optional["_models.ObjectReplicationPolicyFilter"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. An object that defines the filter set."""

    @overload
    def __init__(
        self,
        *,
        source_container: str,
        destination_container: str,
        rule_id: Optional[str] = None,
        filters: Optional["_models.ObjectReplicationPolicyFilter"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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):
    """Storage REST API operation definition.

    :ivar name: Operation name: {provider}/{resource}/{operation}.
    :vartype name: str
    :ivar display: Display metadata associated with the operation.
    :vartype display: ~azure.mgmt.storage.models.OperationDisplay
    :ivar origin: The origin of operations.
    :vartype origin: str
    :ivar operation_properties: Properties of operation, include metric specifications.
    :vartype operation_properties: ~azure.mgmt.storage.models.OperationProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Operation name: {provider}/{resource}/{operation}."""
    display: Optional["_models.OperationDisplay"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Display metadata associated with the operation."""
    origin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The origin of operations."""
    operation_properties: Optional["_models.OperationProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of operation, include metric specifications."""

    __flattened_items = ["service_specification"]

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        display: Optional["_models.OperationDisplay"] = None,
        origin: Optional[str] = None,
        operation_properties: Optional["_models.OperationProperties"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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.operation_properties is None:
                return None
            return getattr(self.operation_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.operation_properties is None:
                self.operation_properties = self._attr_to_rest_field["operation_properties"]._class_type()
            setattr(self.operation_properties, key, value)
        else:
            super().__setattr__(key, value)


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

    :ivar provider: Service provider: Microsoft Storage.
    :vartype provider: str
    :ivar resource: Resource on which the operation is performed etc.
    :vartype resource: str
    :ivar operation: Type of operation: get, read, delete, etc.
    :vartype operation: str
    :ivar description: Description of the operation.
    :vartype description: str
    """

    provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Service provider: Microsoft Storage."""
    resource: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource on which the operation is performed etc."""
    operation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of operation: get, read, delete, etc."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the operation."""

    @overload
    def __init__(
        self,
        *,
        provider: Optional[str] = None,
        resource: Optional[str] = None,
        operation: 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 OperationProperties(_Model):
    """Properties of operation, include metric specifications.

    :ivar service_specification: One property of operation, include metric specifications.
    :vartype service_specification: ~azure.mgmt.storage.models.ServiceSpecification
    """

    service_specification: Optional["_models.ServiceSpecification"] = rest_field(
        name="serviceSpecification", visibility=["read", "create", "update", "delete", "query"]
    )
    """One property of operation, include metric specifications."""

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

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

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


class PermissionScope(_Model):
    """PermissionScope.

    :ivar permissions: The permissions for the local user. Possible values include: Read (r), Write
     (w), Delete (d), List (l), Create (c), Modify Ownership (o), and Modify Permissions (p).
     Required.
    :vartype permissions: str
    :ivar service: The service used by the local user, e.g. blob, file. Required.
    :vartype service: str
    :ivar resource_name: The name of resource, normally the container name or the file share name,
     used by the local user. Required.
    :vartype resource_name: str
    """

    permissions: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d),
     List (l), Create (c), Modify Ownership (o), and Modify Permissions (p). Required."""
    service: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The service used by the local user, e.g. blob, file. Required."""
    resource_name: str = rest_field(name="resourceName", visibility=["read", "create", "update", "delete", "query"])
    """The name of resource, normally the container name or the file share name, used by the local
     user. Required."""

    @overload
    def __init__(
        self,
        *,
        permissions: str,
        service: str,
        resource_name: 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 Placement(_Model):
    """The complex type of the zonal placement details.

    :ivar zone_placement_policy: The availability zone pinning policy for the storage account.
     Known values are: "Any" and "None".
    :vartype zone_placement_policy: str or ~azure.mgmt.storage.models.ZonePlacementPolicy
    """

    zone_placement_policy: Optional[Union[str, "_models.ZonePlacementPolicy"]] = rest_field(
        name="zonePlacementPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The availability zone pinning policy for the storage account. Known values are: \"Any\" and
     \"None\"."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.storage.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.storage.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.storage.models.PrivateEndpoint
    :ivar private_link_service_connection_state: A collection of information about the state of the
     connection between service consumer and provider. Required.
    :vartype private_link_service_connection_state:
     ~azure.mgmt.storage.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.storage.models.PrivateEndpointConnectionProvisioningState
    """

    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(
        name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """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 service consumer and
     provider. 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",
        private_endpoint: Optional["_models.PrivateEndpoint"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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(ResourceAutoGenerated):
    """A private link 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.storage.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.storage.models.PrivateLinkResourceProperties
    """

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

    __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.storage.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 Private link 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 Private link 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.storage.models.PrivateEndpointServiceConnectionStatus
    :ivar description: The reason for approval/rejection of the connection.
    :vartype description: str
    :ivar action_required: A message indicating if changes on the service provider require any
     updates on the consumer.
    :vartype action_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."""
    action_required: Optional[str] = rest_field(
        name="actionRequired", 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,
        action_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 ProtectedAppendWritesHistory(_Model):
    """Protected append writes history setting for the blob container with Legal holds.

    :ivar allow_protected_append_writes_all: When enabled, new blocks can be written to both
     'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks
     can be added and any existing blocks cannot be modified or deleted.
    :vartype allow_protected_append_writes_all: bool
    :ivar timestamp: Returns the date and time the tag was added.
    :vartype timestamp: ~datetime.datetime
    """

    allow_protected_append_writes_all: Optional[bool] = rest_field(
        name="allowProtectedAppendWritesAll", visibility=["read", "create", "update", "delete", "query"]
    )
    """When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal
     hold protection and compliance. Only new blocks can be added and any existing blocks cannot be
     modified or deleted."""
    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Returns the date and time the tag was added."""

    @overload
    def __init__(
        self,
        *,
        allow_protected_append_writes_all: 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 ProtocolSettings(_Model):
    """Protocol settings for file service.

    :ivar smb: Setting for SMB protocol.
    :vartype smb: ~azure.mgmt.storage.models.SmbSetting
    :ivar nfs: Setting for NFS protocol.
    :vartype nfs: ~azure.mgmt.storage.models.NfsSetting
    """

    smb: Optional["_models.SmbSetting"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Setting for SMB protocol."""
    nfs: Optional["_models.NfsSetting"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Setting for NFS protocol."""

    @overload
    def __init__(
        self,
        *,
        smb: Optional["_models.SmbSetting"] = None,
        nfs: Optional["_models.NfsSetting"] = None,
    ) -> None: ...

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

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


class ProvisioningIssue(_Model):
    """Describes provisioning issue for given NetworkSecurityPerimeterConfiguration.

    :ivar name: Name of the issue.
    :vartype name: str
    :ivar properties: Properties of provisioning issue.
    :vartype properties: ~azure.mgmt.storage.models.ProvisioningIssueProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the issue."""
    properties: Optional["_models.ProvisioningIssueProperties"] = rest_field(visibility=["read"])
    """Properties of provisioning issue."""

    @overload
    def __init__(
        self,
        *,
        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 ProvisioningIssueProperties(_Model):
    """Properties of provisioning issue.

    :ivar issue_type: Type of issue. Known values are: "Unknown" and
     "ConfigurationPropagationFailure".
    :vartype issue_type: str or ~azure.mgmt.storage.models.IssueType
    :ivar severity: Severity of the issue. Known values are: "Warning" and "Error".
    :vartype severity: str or ~azure.mgmt.storage.models.Severity
    :ivar description: Description of the issue.
    :vartype description: str
    """

    issue_type: Optional[Union[str, "_models.IssueType"]] = rest_field(
        name="issueType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of issue. Known values are: \"Unknown\" and \"ConfigurationPropagationFailure\"."""
    severity: Optional[Union[str, "_models.Severity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Severity of the issue. Known values are: \"Warning\" and \"Error\"."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the issue."""

    @overload
    def __init__(
        self,
        *,
        issue_type: Optional[Union[str, "_models.IssueType"]] = None,
        severity: Optional[Union[str, "_models.Severity"]] = 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 QueueProperties(_Model):
    """QueueProperties.

    :ivar metadata: A name-value pair that represents queue metadata.
    :vartype metadata: dict[str, str]
    :ivar approximate_message_count: Integer indicating an approximate number of messages in the
     queue. This number is not lower than the actual number of messages in the queue, but could be
     higher.
    :vartype approximate_message_count: int
    """

    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A name-value pair that represents queue metadata."""
    approximate_message_count: Optional[int] = rest_field(name="approximateMessageCount", visibility=["read"])
    """Integer indicating an approximate number of messages in the queue. This number is not lower
     than the actual number of messages in the queue, but could be higher."""

    @overload
    def __init__(
        self,
        *,
        metadata: 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 QueueServiceProperties(ProxyResource):
    """The properties of a storage account’s Queue service.

    :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.storage.models.SystemData
    :ivar queue_service_properties: The properties of a storage account’s Queue service.
    :vartype queue_service_properties: ~azure.mgmt.storage.models.QueueServicePropertiesProperties
    """

    queue_service_properties: Optional["_models.QueueServicePropertiesProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of a storage account’s Queue service."""

    __flattened_items = ["cors"]

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

    @overload
    def __init__(self, mapping: Mapping[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.queue_service_properties is None:
                return None
            return getattr(self.queue_service_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.queue_service_properties is None:
                self.queue_service_properties = self._attr_to_rest_field["queue_service_properties"]._class_type()
            setattr(self.queue_service_properties, key, value)
        else:
            super().__setattr__(key, value)


class QueueServicePropertiesProperties(_Model):
    """The properties of a storage account’s Queue service.

    :ivar cors: Specifies CORS rules for the Queue service. You can include up to five CorsRule
     elements in the request. If no CorsRule elements are included in the request body, all CORS
     rules will be deleted, and CORS will be disabled for the Queue service.
    :vartype cors: ~azure.mgmt.storage.models.CorsRules
    """

    cors: Optional["_models.CorsRules"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the
     request. If no CorsRule elements are included in the request body, all CORS rules will be
     deleted, and CORS will be disabled for the Queue service."""

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

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

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


class ResourceAccessRule(_Model):
    """Resource Access Rule.

    :ivar tenant_id: Tenant Id.
    :vartype tenant_id: str
    :ivar resource_id: Resource Id.
    :vartype resource_id: str
    """

    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """Tenant Id."""
    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Id."""

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

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

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


class RestorePolicyProperties(_Model):
    """The blob service properties for blob restore policy.

    :ivar enabled: Blob restore is enabled if set to true. Required.
    :vartype enabled: bool
    :ivar days: how long this blob can be restored. It should be great than zero and less than
     DeleteRetentionPolicy.days.
    :vartype days: int
    :ivar last_enabled_time: Deprecated in favor of minRestoreTime property.
    :vartype last_enabled_time: ~datetime.datetime
    :ivar min_restore_time: Returns the minimum date and time that the restore can be started.
    :vartype min_restore_time: ~datetime.datetime
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Blob restore is enabled if set to true. Required."""
    days: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """how long this blob can be restored. It should be great than zero and less than
     DeleteRetentionPolicy.days."""
    last_enabled_time: Optional[datetime.datetime] = rest_field(
        name="lastEnabledTime", visibility=["read"], format="rfc3339"
    )
    """Deprecated in favor of minRestoreTime property."""
    min_restore_time: Optional[datetime.datetime] = rest_field(
        name="minRestoreTime", visibility=["read"], format="rfc3339"
    )
    """Returns the minimum date and time that the restore can be started."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        days: 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 Restriction(_Model):
    """The restriction because of which SKU cannot be used.

    :ivar type: The type of restrictions. As of now only possible value for this is location.
    :vartype type: str
    :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 reason_code: The reason for the restriction. As of now this can be "QuotaId" or
     "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the
     subscription does not belong to that quota. The "NotAvailableForSubscription" is related to
     capacity at DC. Known values are: "QuotaId" and "NotAvailableForSubscription".
    :vartype reason_code: str or ~azure.mgmt.storage.models.ReasonCode
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """The type of restrictions. As of now only possible value for this is location."""
    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."""
    reason_code: Optional[Union[str, "_models.ReasonCode"]] = rest_field(
        name="reasonCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The reason for the restriction. As of now this can be \"QuotaId\" or
     \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as
     the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related
     to capacity at DC. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\"."""

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

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

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


class RoutingPreference(_Model):
    """Routing preference defines the type of network, either microsoft or internet routing to be used
    to deliver the user data, the default option is microsoft routing.

    :ivar routing_choice: Routing Choice defines the kind of network routing opted by the user.
     Known values are: "MicrosoftRouting" and "InternetRouting".
    :vartype routing_choice: str or ~azure.mgmt.storage.models.RoutingChoice
    :ivar publish_microsoft_endpoints: A boolean flag which indicates whether microsoft routing
     storage endpoints are to be published.
    :vartype publish_microsoft_endpoints: bool
    :ivar publish_internet_endpoints: A boolean flag which indicates whether internet routing
     storage endpoints are to be published.
    :vartype publish_internet_endpoints: bool
    """

    routing_choice: Optional[Union[str, "_models.RoutingChoice"]] = rest_field(
        name="routingChoice", visibility=["read", "create", "update", "delete", "query"]
    )
    """Routing Choice defines the kind of network routing opted by the user. Known values are:
     \"MicrosoftRouting\" and \"InternetRouting\"."""
    publish_microsoft_endpoints: Optional[bool] = rest_field(
        name="publishMicrosoftEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether microsoft routing storage endpoints are to be published."""
    publish_internet_endpoints: Optional[bool] = rest_field(
        name="publishInternetEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether internet routing storage endpoints are to be published."""

    @overload
    def __init__(
        self,
        *,
        routing_choice: Optional[Union[str, "_models.RoutingChoice"]] = None,
        publish_microsoft_endpoints: Optional[bool] = None,
        publish_internet_endpoints: 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 SasPolicy(_Model):
    """SasPolicy assigned to the storage account.

    :ivar sas_expiration_period: The SAS expiration period, DD.HH:MM:SS. Required.
    :vartype sas_expiration_period: str
    :ivar expiration_action: The SAS Expiration Action defines the action to be performed when
     sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and
     the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to
     the sas policy expiration period. Required. Known values are: "Log" and "Block".
    :vartype expiration_action: str or ~azure.mgmt.storage.models.ExpirationAction
    """

    sas_expiration_period: str = rest_field(
        name="sasExpirationPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """The SAS expiration period, DD.HH:MM:SS. Required."""
    expiration_action: Union[str, "_models.ExpirationAction"] = rest_field(
        name="expirationAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod
     is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used
     to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration
     period. Required. Known values are: \"Log\" and \"Block\"."""

    @overload
    def __init__(
        self,
        *,
        sas_expiration_period: str,
        expiration_action: Union[str, "_models.ExpirationAction"],
    ) -> None: ...

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

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


class ServiceSasParameters(_Model):
    """The parameters to list service SAS credentials of a specific resource.

    :ivar canonicalized_resource: The canonical path to the signed resource. Required.
    :vartype canonicalized_resource: str
    :ivar resource: The signed services accessible with the service SAS. Possible values include:
     Blob (b), Container (c), File (f), Share (s). Known values are: "b", "c", "f", and "s".
    :vartype resource: str or ~azure.mgmt.storage.models.SignedResource
    :ivar permissions: The signed permissions for the service SAS. Possible values include: Read
     (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Known
     values are: "r", "d", "w", "l", "a", "c", "u", and "p".
    :vartype permissions: str or ~azure.mgmt.storage.models.Permissions
    :ivar ip_address_or_range: An IP address or a range of IP addresses from which to accept
     requests.
    :vartype ip_address_or_range: str
    :ivar protocols: The protocol permitted for a request made with the account SAS. Known values
     are: "https,http" and "https".
    :vartype protocols: str or ~azure.mgmt.storage.models.HttpProtocol
    :ivar shared_access_start_time: The time at which the SAS becomes valid.
    :vartype shared_access_start_time: ~datetime.datetime
    :ivar shared_access_expiry_time: The time at which the shared access signature becomes invalid.
    :vartype shared_access_expiry_time: ~datetime.datetime
    :ivar identifier: A unique value up to 64 characters in length that correlates to an access
     policy specified for the container, queue, or table.
    :vartype identifier: str
    :ivar partition_key_start: The start of partition key.
    :vartype partition_key_start: str
    :ivar partition_key_end: The end of partition key.
    :vartype partition_key_end: str
    :ivar row_key_start: The start of row key.
    :vartype row_key_start: str
    :ivar row_key_end: The end of row key.
    :vartype row_key_end: str
    :ivar key_to_sign: The key to sign the account SAS token with.
    :vartype key_to_sign: str
    :ivar cache_control: The response header override for cache control.
    :vartype cache_control: str
    :ivar content_disposition: The response header override for content disposition.
    :vartype content_disposition: str
    :ivar content_encoding: The response header override for content encoding.
    :vartype content_encoding: str
    :ivar content_language: The response header override for content language.
    :vartype content_language: str
    :ivar content_type: The response header override for content type.
    :vartype content_type: str
    """

    canonicalized_resource: str = rest_field(
        name="canonicalizedResource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The canonical path to the signed resource. Required."""
    resource: Optional[Union[str, "_models.SignedResource"]] = rest_field(
        name="signedResource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The signed services accessible with the service SAS. Possible values include: Blob (b),
     Container (c), File (f), Share (s). Known values are: \"b\", \"c\", \"f\", and \"s\"."""
    permissions: Optional[Union[str, "_models.Permissions"]] = rest_field(
        name="signedPermission", visibility=["read", "create", "update", "delete", "query"]
    )
    """The signed permissions for the service SAS. Possible values include: Read (r), Write (w),
     Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Known values are: \"r\",
     \"d\", \"w\", \"l\", \"a\", \"c\", \"u\", and \"p\"."""
    ip_address_or_range: Optional[str] = rest_field(
        name="signedIp", visibility=["read", "create", "update", "delete", "query"]
    )
    """An IP address or a range of IP addresses from which to accept requests."""
    protocols: Optional[Union[str, "_models.HttpProtocol"]] = rest_field(
        name="signedProtocol", visibility=["read", "create", "update", "delete", "query"]
    )
    """The protocol permitted for a request made with the account SAS. Known values are:
     \"https,http\" and \"https\"."""
    shared_access_start_time: Optional[datetime.datetime] = rest_field(
        name="signedStart", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time at which the SAS becomes valid."""
    shared_access_expiry_time: Optional[datetime.datetime] = rest_field(
        name="signedExpiry", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time at which the shared access signature becomes invalid."""
    identifier: Optional[str] = rest_field(
        name="signedIdentifier", visibility=["read", "create", "update", "delete", "query"]
    )
    """A unique value up to 64 characters in length that correlates to an access policy specified for
     the container, queue, or table."""
    partition_key_start: Optional[str] = rest_field(
        name="startPk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The start of partition key."""
    partition_key_end: Optional[str] = rest_field(
        name="endPk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The end of partition key."""
    row_key_start: Optional[str] = rest_field(
        name="startRk", visibility=["read", "create", "update", "delete", "query"]
    )
    """The start of row key."""
    row_key_end: Optional[str] = rest_field(name="endRk", visibility=["read", "create", "update", "delete", "query"])
    """The end of row key."""
    key_to_sign: Optional[str] = rest_field(
        name="keyToSign", visibility=["read", "create", "update", "delete", "query"]
    )
    """The key to sign the account SAS token with."""
    cache_control: Optional[str] = rest_field(name="rscc", visibility=["read", "create", "update", "delete", "query"])
    """The response header override for cache control."""
    content_disposition: Optional[str] = rest_field(
        name="rscd", visibility=["read", "create", "update", "delete", "query"]
    )
    """The response header override for content disposition."""
    content_encoding: Optional[str] = rest_field(
        name="rsce", visibility=["read", "create", "update", "delete", "query"]
    )
    """The response header override for content encoding."""
    content_language: Optional[str] = rest_field(
        name="rscl", visibility=["read", "create", "update", "delete", "query"]
    )
    """The response header override for content language."""
    content_type: Optional[str] = rest_field(name="rsct", visibility=["read", "create", "update", "delete", "query"])
    """The response header override for content type."""

    @overload
    def __init__(
        self,
        *,
        canonicalized_resource: str,
        resource: Optional[Union[str, "_models.SignedResource"]] = None,
        permissions: Optional[Union[str, "_models.Permissions"]] = None,
        ip_address_or_range: Optional[str] = None,
        protocols: Optional[Union[str, "_models.HttpProtocol"]] = None,
        shared_access_start_time: Optional[datetime.datetime] = None,
        shared_access_expiry_time: Optional[datetime.datetime] = None,
        identifier: Optional[str] = None,
        partition_key_start: Optional[str] = None,
        partition_key_end: Optional[str] = None,
        row_key_start: Optional[str] = None,
        row_key_end: Optional[str] = None,
        key_to_sign: Optional[str] = None,
        cache_control: Optional[str] = None,
        content_disposition: Optional[str] = None,
        content_encoding: Optional[str] = None,
        content_language: Optional[str] = None,
        content_type: 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 ServiceSharedKeyAccessProperties(_Model):
    """Defines shared key access settings for an individual storage service.

    :ivar enabled: Indicates whether shared key access is enabled for the service.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether shared key access is enabled for the service."""

    @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 ServiceSpecification(_Model):
    """One property of operation, include metric specifications.

    :ivar metric_specifications: Metric specifications of operation.
    :vartype metric_specifications: list[~azure.mgmt.storage.models.MetricSpecification]
    """

    metric_specifications: Optional[list["_models.MetricSpecification"]] = rest_field(
        name="metricSpecifications", visibility=["read", "create", "update", "delete", "query"]
    )
    """Metric specifications of operation."""

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

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

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


class SignedIdentifier(_Model):
    """SignedIdentifier.

    :ivar id: An unique identifier of the stored access policy.
    :vartype id: str
    :ivar access_policy: Access policy.
    :vartype access_policy: ~azure.mgmt.storage.models.AccessPolicy
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An unique identifier of the stored access policy."""
    access_policy: Optional["_models.AccessPolicy"] = rest_field(
        name="accessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access policy."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        access_policy: Optional["_models.AccessPolicy"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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):
    """The SKU of the storage account.

    :ivar name: The SKU name. Required for account creation; optional for update. Note that in
     older versions, SKU name was called accountType. Required. Known values are: "Standard_LRS",
     "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS",
     "Standard_GZRS", "Standard_RAGZRS", "StandardV2_LRS", "StandardV2_GRS", "StandardV2_ZRS",
     "StandardV2_GZRS", "PremiumV2_LRS", and "PremiumV2_ZRS".
    :vartype name: str or ~azure.mgmt.storage.models.SkuName
    :ivar tier: The SKU tier. This is based on the SKU name. Known values are: "Standard" and
     "Premium".
    :vartype tier: str or ~azure.mgmt.storage.models.SkuTier
    """

    name: Union[str, "_models.SkuName"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU name. Required for account creation; optional for update. Note that in older versions,
     SKU name was called accountType. Required. Known values are: \"Standard_LRS\",
     \"Standard_GRS\", \"Standard_RAGRS\", \"Standard_ZRS\", \"Premium_LRS\", \"Premium_ZRS\",
     \"Standard_GZRS\", \"Standard_RAGZRS\", \"StandardV2_LRS\", \"StandardV2_GRS\",
     \"StandardV2_ZRS\", \"StandardV2_GZRS\", \"PremiumV2_LRS\", and \"PremiumV2_ZRS\"."""
    tier: Optional[Union[str, "_models.SkuTier"]] = rest_field(visibility=["read"])
    """The SKU tier. This is based on the SKU name. Known values are: \"Standard\" and \"Premium\"."""

    @overload
    def __init__(
        self,
        *,
        name: Union[str, "_models.SkuName"],
    ) -> None: ...

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

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


class SKUCapability(_Model):
    """The capability information in the specified SKU, including file encryption, network ACLs,
    change notification, etc.

    :ivar name: The name of capability, The capability information in the specified SKU, including
     file encryption, network ACLs, change notification, etc.
    :vartype name: str
    :ivar value: A string value to indicate states of given capability. Possibly 'true' or 'false'.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """The name of capability, The capability information in the specified SKU, including file
     encryption, network ACLs, change notification, etc."""
    value: Optional[str] = rest_field(visibility=["read"])
    """A string value to indicate states of given capability. Possibly 'true' or 'false'."""


class SkuInformation(_Model):
    """Storage SKU and its properties.

    :ivar name: The SKU name. Required for account creation; optional for update. Note that in
     older versions, SKU name was called accountType. Required. Known values are: "Standard_LRS",
     "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS",
     "Standard_GZRS", "Standard_RAGZRS", "StandardV2_LRS", "StandardV2_GRS", "StandardV2_ZRS",
     "StandardV2_GZRS", "PremiumV2_LRS", and "PremiumV2_ZRS".
    :vartype name: str or ~azure.mgmt.storage.models.SkuName
    :ivar tier: The SKU tier. This is based on the SKU name. Known values are: "Standard" and
     "Premium".
    :vartype tier: str or ~azure.mgmt.storage.models.SkuTier
    :ivar resource_type: The type of the resource, usually it is 'storageAccounts'.
    :vartype resource_type: str
    :ivar kind: Indicates the type of storage account. Known values are: "Storage", "StorageV2",
     "BlobStorage", "FileStorage", and "BlockBlobStorage".
    :vartype kind: str or ~azure.mgmt.storage.models.Kind
    :ivar locations: The set of locations that the SKU is available. This will be supported and
     registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
    :vartype locations: list[str]
    :ivar location_info:
    :vartype location_info: list[~azure.mgmt.storage.models.SkuInformationLocationInfoItem]
    :ivar capabilities: The capability information in the specified SKU, including file encryption,
     network ACLs, change notification, etc.
    :vartype capabilities: list[~azure.mgmt.storage.models.SKUCapability]
    :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if
     there are no restrictions.
    :vartype restrictions: list[~azure.mgmt.storage.models.Restriction]
    """

    name: Union[str, "_models.SkuName"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU name. Required for account creation; optional for update. Note that in older versions,
     SKU name was called accountType. Required. Known values are: \"Standard_LRS\",
     \"Standard_GRS\", \"Standard_RAGRS\", \"Standard_ZRS\", \"Premium_LRS\", \"Premium_ZRS\",
     \"Standard_GZRS\", \"Standard_RAGZRS\", \"StandardV2_LRS\", \"StandardV2_GRS\",
     \"StandardV2_ZRS\", \"StandardV2_GZRS\", \"PremiumV2_LRS\", and \"PremiumV2_ZRS\"."""
    tier: Optional[Union[str, "_models.SkuTier"]] = rest_field(visibility=["read"])
    """The SKU tier. This is based on the SKU name. Known values are: \"Standard\" and \"Premium\"."""
    resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"])
    """The type of the resource, usually it is 'storageAccounts'."""
    kind: Optional[Union[str, "_models.Kind"]] = rest_field(visibility=["read"])
    """Indicates the type of storage account. Known values are: \"Storage\", \"StorageV2\",
     \"BlobStorage\", \"FileStorage\", and \"BlockBlobStorage\"."""
    locations: Optional[list[str]] = rest_field(visibility=["read"])
    """The set of locations that the SKU is available. This will be supported and registered Azure Geo
     Regions (e.g. West US, East US, Southeast Asia, etc.)."""
    location_info: Optional[list["_models.SkuInformationLocationInfoItem"]] = rest_field(
        name="locationInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    capabilities: Optional[list["_models.SKUCapability"]] = rest_field(visibility=["read"])
    """The capability information in the specified SKU, including file encryption, network ACLs,
     change notification, etc."""
    restrictions: Optional[list["_models.Restriction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The restrictions because of which SKU cannot be used. This is empty if there are no
     restrictions."""

    @overload
    def __init__(
        self,
        *,
        name: Union[str, "_models.SkuName"],
        location_info: Optional[list["_models.SkuInformationLocationInfoItem"]] = None,
        restrictions: Optional[list["_models.Restriction"]] = None,
    ) -> None: ...

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

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


class SkuInformationLocationInfoItem(_Model):
    """SkuInformationLocationInfoItem.

    :ivar location: Describes the location for the product where storage account resource can be
     created.
    :vartype location: str
    :ivar zones: Describes the available zones for the product where storage account resource can
     be created.
    :vartype zones: list[str]
    """

    location: Optional[str] = rest_field(visibility=["read"])
    """Describes the location for the product where storage account resource can be created."""
    zones: Optional[list[str]] = rest_field(visibility=["read"])
    """Describes the available zones for the product where storage account resource can be created."""


class SmbOAuthSettings(_Model):
    """Setting property for Managed Identity access over SMB using OAuth.

    :ivar is_smb_o_auth_enabled: Specifies if managed identities can access SMB shares using OAuth.
     The default interpretation is false for this property.
    :vartype is_smb_o_auth_enabled: bool
    """

    is_smb_o_auth_enabled: Optional[bool] = rest_field(
        name="isSmbOAuthEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies if managed identities can access SMB shares using OAuth. The default interpretation
     is false for this property."""

    @overload
    def __init__(
        self,
        *,
        is_smb_o_auth_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 SmbSetting(_Model):
    """Setting for SMB protocol.

    :ivar multichannel: Multichannel setting. Applies to Premium FileStorage only.
    :vartype multichannel: ~azure.mgmt.storage.models.Multichannel
    :ivar versions: SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0,
     SMB3.1.1. Should be passed as a string with delimiter ';'.
    :vartype versions: str
    :ivar authentication_methods: SMB authentication methods supported by server. Valid values are
     NTLMv2, Kerberos. Should be passed as a string with delimiter ';'.
    :vartype authentication_methods: str
    :ivar kerberos_ticket_encryption: Kerberos ticket encryption supported by server. Valid values
     are RC4-HMAC, AES-256. Should be passed as a string with delimiter ';'.
    :vartype kerberos_ticket_encryption: str
    :ivar channel_encryption: SMB channel encryption supported by server. Valid values are
     AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as a string with delimiter ';'.
    :vartype channel_encryption: str
    :ivar encryption_in_transit: Encryption in transit setting.
    :vartype encryption_in_transit: ~azure.mgmt.storage.models.EncryptionInTransit
    """

    multichannel: Optional["_models.Multichannel"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Multichannel setting. Applies to Premium FileStorage only."""
    versions: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be
     passed as a string with delimiter ';'."""
    authentication_methods: Optional[str] = rest_field(
        name="authenticationMethods", visibility=["read", "create", "update", "delete", "query"]
    )
    """SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be
     passed as a string with delimiter ';'."""
    kerberos_ticket_encryption: Optional[str] = rest_field(
        name="kerberosTicketEncryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be
     passed as a string with delimiter ';'."""
    channel_encryption: Optional[str] = rest_field(
        name="channelEncryption", visibility=["read", "create", "update", "delete", "query"]
    )
    """SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM,
     AES-256-GCM. Should be passed as a string with delimiter ';'."""
    encryption_in_transit: Optional["_models.EncryptionInTransit"] = rest_field(
        name="encryptionInTransit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Encryption in transit setting."""

    @overload
    def __init__(
        self,
        *,
        multichannel: Optional["_models.Multichannel"] = None,
        versions: Optional[str] = None,
        authentication_methods: Optional[str] = None,
        kerberos_ticket_encryption: Optional[str] = None,
        channel_encryption: Optional[str] = None,
        encryption_in_transit: Optional["_models.EncryptionInTransit"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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):
    """SshPublicKey.

    :ivar description: Optional. It is used to store the function/usage of the key.
    :vartype description: str
    :ivar key: Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g.
     ssh-rsa AAAABBBB.
    :vartype key: str
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. It is used to store the function/usage of the key."""
    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g. ssh-rsa
     AAAABBBB."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        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 StaticWebsite(_Model):
    """The static website properties for blob storage.

    :ivar enabled: Indicates whether static website support is enabled for the specified account.
     Required.
    :vartype enabled: bool
    :ivar index_document: The webpage that Azure Storage serves for requests to the root of a
     website or any subfolder (for example, index.html). The value is case-sensitive.
    :vartype index_document: str
    :ivar default_index_document_path: The absolute path where the default index file is present.
     This absolute path is mutually exclusive to "indexDocument" and it is case-sensitive.
    :vartype default_index_document_path: str
    :ivar error_document404_path: The absolute path to a webpage that Azure Storage serves for
     requests that don't correspond to an existing file. The contents of the page are returned with
     HTTP 404 Not Found. Only a single custom 404 page is supported in each static website.
    :vartype error_document404_path: str
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether static website support is enabled for the specified account. Required."""
    index_document: Optional[str] = rest_field(
        name="indexDocument", visibility=["read", "create", "update", "delete", "query"]
    )
    """The webpage that Azure Storage serves for requests to the root of a website or any subfolder
     (for example, index.html). The value is case-sensitive."""
    default_index_document_path: Optional[str] = rest_field(
        name="defaultIndexDocumentPath", visibility=["read", "create", "update", "delete", "query"]
    )
    """The absolute path where the default index file is present. This absolute path is mutually
     exclusive to \"indexDocument\" and it is case-sensitive."""
    error_document404_path: Optional[str] = rest_field(
        name="errorDocument404Path", visibility=["read", "create", "update", "delete", "query"]
    )
    """The absolute path to a webpage that Azure Storage serves for requests that don't correspond to
     an existing file. The contents of the page are returned with HTTP 404 Not Found. Only a single
     custom 404 page is supported in each static website."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        index_document: Optional[str] = None,
        default_index_document_path: Optional[str] = None,
        error_document404_path: 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 StorageAccount(TrackedResource):
    """The storage account.

    :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.storage.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 storage account.
    :vartype properties: ~azure.mgmt.storage.models.StorageAccountProperties
    :ivar sku: Gets the SKU.
    :vartype sku: ~azure.mgmt.storage.models.Sku
    :ivar kind: Gets the Kind. Known values are: "Storage", "StorageV2", "BlobStorage",
     "FileStorage", and "BlockBlobStorage".
    :vartype kind: str or ~azure.mgmt.storage.models.Kind
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.storage.models.Identity
    :ivar extended_location: The extendedLocation of the resource.
    :vartype extended_location: ~azure.mgmt.storage.models.ExtendedLocation
    :ivar zones: The availability zones.
    :vartype zones: list[str]
    :ivar placement: Optional. Gets or sets the zonal placement details for the storage account.
    :vartype placement: ~azure.mgmt.storage.models.Placement
    """

    properties: Optional["_models.StorageAccountProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the storage account."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read"])
    """Gets the SKU."""
    kind: Optional[Union[str, "_models.Kind"]] = rest_field(visibility=["read"])
    """Gets the Kind. Known values are: \"Storage\", \"StorageV2\", \"BlobStorage\", \"FileStorage\",
     and \"BlockBlobStorage\"."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extendedLocation of the resource."""
    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"])
    """Optional. Gets or sets the zonal placement details for the storage account."""

    __flattened_items = [
        "provisioning_state",
        "primary_endpoints",
        "primary_location",
        "status_of_primary",
        "last_geo_failover_time",
        "secondary_location",
        "status_of_secondary",
        "creation_time",
        "custom_domain",
        "sas_policy",
        "key_policy",
        "key_creation_time",
        "secondary_endpoints",
        "encryption",
        "access_tier",
        "azure_files_identity_based_authentication",
        "enable_https_traffic_only",
        "network_rule_set",
        "is_sftp_enabled",
        "is_local_user_enabled",
        "enable_extended_groups",
        "is_hns_enabled",
        "geo_replication_stats",
        "failover_in_progress",
        "large_file_shares_state",
        "private_endpoint_connections",
        "routing_preference",
        "dual_stack_endpoint_preference",
        "blob_restore_status",
        "allow_blob_public_access",
        "minimum_tls_version",
        "allow_shared_key_access",
        "enable_nfs_v3",
        "allow_cross_tenant_replication",
        "default_to_o_auth_authentication",
        "public_network_access",
        "immutable_storage_with_versioning",
        "allowed_copy_scope",
        "storage_account_sku_conversion_status",
        "dns_endpoint_type",
        "is_sku_conversion_blocked",
        "account_migration_in_progress",
        "geo_priority_replication_status",
        "allow_shared_key_access_for_services",
        "data_collaboration_policy_properties",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.StorageAccountProperties"] = None,
        identity: Optional["_models.Identity"] = None,
        extended_location: Optional["_models.ExtendedLocation"] = 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 StorageAccountCheckNameAvailabilityParameters(_Model):  # pylint: disable=name-too-long
    """The parameters used to check the availability of the storage account name.

    :ivar name: The storage account name. Required.
    :vartype name: str
    :ivar type: The type of resource, Microsoft.Storage/storageAccounts. Required. Default value is
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The storage account name. Required."""
    type: Literal["Microsoft.Storage/storageAccounts"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of resource, Microsoft.Storage/storageAccounts. Required. Default value is
     \"Microsoft.Storage/storageAccounts\"."""

    @overload
    def __init__(
        self,
        *,
        name: 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)
        self.type: Literal["Microsoft.Storage/storageAccounts"] = "Microsoft.Storage/storageAccounts"


class StorageAccountCreateParameters(_Model):
    """The parameters used when creating a storage account.

    :ivar sku: Required. Gets or sets the SKU name. Required.
    :vartype sku: ~azure.mgmt.storage.models.Sku
    :ivar kind: Required. Indicates the type of storage account. Required. Known values are:
     "Storage", "StorageV2", "BlobStorage", "FileStorage", and "BlockBlobStorage".
    :vartype kind: str or ~azure.mgmt.storage.models.Kind
    :ivar location: Required. Gets or sets the location of the resource. This will be one of the
     supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The
     geo region of a resource cannot be changed once it is created, but if an identical geo region
     is specified on update, the request will succeed. Required.
    :vartype location: str
    :ivar extended_location: Optional. Set the extended location of the resource. If not set, the
     storage account will be created in Azure main region. Otherwise it will be created in the
     specified extended location.
    :vartype extended_location: ~azure.mgmt.storage.models.ExtendedLocation
    :ivar zones: Optional. Gets or sets the pinned logical availability zone for the storage
     account.
    :vartype zones: list[str]
    :ivar placement: Optional. Gets or sets the zonal placement details for the storage account.
    :vartype placement: ~azure.mgmt.storage.models.Placement
    :ivar tags: Gets or sets a list of key value pairs that describe the resource. These tags can
     be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags
     can be provided for a resource. Each tag must have a key with a length no greater than 128
     characters and a value with a length no greater than 256 characters.
    :vartype tags: dict[str, str]
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.storage.models.Identity
    :ivar properties: The parameters used to create the storage account.
    :vartype properties: ~azure.mgmt.storage.models.StorageAccountPropertiesCreateParameters
    """

    sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Gets or sets the SKU name. Required."""
    kind: Union[str, "_models.Kind"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Indicates the type of storage account. Required. Known values are: \"Storage\",
     \"StorageV2\", \"BlobStorage\", \"FileStorage\", and \"BlockBlobStorage\"."""
    location: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Gets or sets the location of the resource. This will be one of the supported and
     registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
     resource cannot be changed once it is created, but if an identical geo region is specified on
     update, the request will succeed. Required."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Set the extended location of the resource. If not set, the storage account will be
     created in Azure main region. Otherwise it will be created in the specified extended location."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Gets or sets the pinned logical availability zone for the storage account."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Gets or sets the zonal placement details for the storage account."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets a list of key value pairs that describe the resource. These tags can be used for
     viewing and grouping this resource (across resource groups). A maximum of 15 tags can be
     provided for a resource. Each tag must have a key with a length no greater than 128 characters
     and a value with a length no greater than 256 characters."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    properties: Optional["_models.StorageAccountPropertiesCreateParameters"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters used to create the storage account."""

    __flattened_items = [
        "allowed_copy_scope",
        "public_network_access",
        "sas_policy",
        "key_policy",
        "custom_domain",
        "encryption",
        "network_rule_set",
        "access_tier",
        "azure_files_identity_based_authentication",
        "enable_https_traffic_only",
        "is_sftp_enabled",
        "is_local_user_enabled",
        "enable_extended_groups",
        "is_hns_enabled",
        "large_file_shares_state",
        "routing_preference",
        "dual_stack_endpoint_preference",
        "allow_blob_public_access",
        "minimum_tls_version",
        "allow_shared_key_access",
        "enable_nfs_v3",
        "allow_cross_tenant_replication",
        "default_to_o_auth_authentication",
        "immutable_storage_with_versioning",
        "dns_endpoint_type",
        "geo_priority_replication_status",
        "allow_shared_key_access_for_services",
        "data_collaboration_policy_properties",
    ]

    @overload
    def __init__(
        self,
        *,
        sku: "_models.Sku",
        kind: Union[str, "_models.Kind"],
        location: str,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        zones: Optional[list[str]] = None,
        placement: Optional["_models.Placement"] = None,
        tags: Optional[dict[str, str]] = None,
        identity: Optional["_models.Identity"] = None,
        properties: Optional["_models.StorageAccountPropertiesCreateParameters"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 StorageAccountInternetEndpoints(_Model):
    """The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a
    internet routing endpoint.

    :ivar blob: Gets the blob endpoint.
    :vartype blob: str
    :ivar file: Gets the file endpoint.
    :vartype file: str
    :ivar web: Gets the web endpoint.
    :vartype web: str
    :ivar dfs: Gets the dfs endpoint.
    :vartype dfs: str
    """

    blob: Optional[str] = rest_field(visibility=["read"])
    """Gets the blob endpoint."""
    file: Optional[str] = rest_field(visibility=["read"])
    """Gets the file endpoint."""
    web: Optional[str] = rest_field(visibility=["read"])
    """Gets the web endpoint."""
    dfs: Optional[str] = rest_field(visibility=["read"])
    """Gets the dfs endpoint."""


class StorageAccountIpv6Endpoints(_Model):
    """The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object
    via an IPv6 endpoint.

    :ivar blob: Gets the blob endpoint.
    :vartype blob: str
    :ivar queue: Gets the queue endpoint.
    :vartype queue: str
    :ivar table: Gets the table endpoint.
    :vartype table: str
    :ivar file: Gets the file endpoint.
    :vartype file: str
    :ivar web: Gets the web endpoint.
    :vartype web: str
    :ivar dfs: Gets the dfs endpoint.
    :vartype dfs: str
    :ivar microsoft_endpoints: Gets the microsoft routing storage endpoints.
    :vartype microsoft_endpoints: ~azure.mgmt.storage.models.StorageAccountMicrosoftEndpoints
    :ivar internet_endpoints: Gets the internet routing storage endpoints.
    :vartype internet_endpoints: ~azure.mgmt.storage.models.StorageAccountInternetEndpoints
    """

    blob: Optional[str] = rest_field(visibility=["read"])
    """Gets the blob endpoint."""
    queue: Optional[str] = rest_field(visibility=["read"])
    """Gets the queue endpoint."""
    table: Optional[str] = rest_field(visibility=["read"])
    """Gets the table endpoint."""
    file: Optional[str] = rest_field(visibility=["read"])
    """Gets the file endpoint."""
    web: Optional[str] = rest_field(visibility=["read"])
    """Gets the web endpoint."""
    dfs: Optional[str] = rest_field(visibility=["read"])
    """Gets the dfs endpoint."""
    microsoft_endpoints: Optional["_models.StorageAccountMicrosoftEndpoints"] = rest_field(
        name="microsoftEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the microsoft routing storage endpoints."""
    internet_endpoints: Optional["_models.StorageAccountInternetEndpoints"] = rest_field(
        name="internetEndpoints", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the internet routing storage endpoints."""

    @overload
    def __init__(
        self,
        *,
        microsoft_endpoints: Optional["_models.StorageAccountMicrosoftEndpoints"] = None,
        internet_endpoints: Optional["_models.StorageAccountInternetEndpoints"] = None,
    ) -> None: ...

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

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


class StorageAccountKey(_Model):
    """An access key for the storage account.

    :ivar key_name: Name of the key.
    :vartype key_name: str
    :ivar value: Base 64-encoded value of the key.
    :vartype value: str
    :ivar permissions: Permissions for the key -- read-only or full permissions. Known values are:
     "Read" and "Full".
    :vartype permissions: str or ~azure.mgmt.storage.models.KeyPermission
    :ivar creation_time: Creation time of the key, in round trip date format.
    :vartype creation_time: ~datetime.datetime
    """

    key_name: Optional[str] = rest_field(name="keyName", visibility=["read"])
    """Name of the key."""
    value: Optional[str] = rest_field(visibility=["read"])
    """Base 64-encoded value of the key."""
    permissions: Optional[Union[str, "_models.KeyPermission"]] = rest_field(visibility=["read"])
    """Permissions for the key -- read-only or full permissions. Known values are: \"Read\" and
     \"Full\"."""
    creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", visibility=["read"], format="rfc3339")
    """Creation time of the key, in round trip date format."""


class StorageAccountListKeysResult(_Model):
    """The response from the ListKeys operation.

    :ivar keys_property: Gets the list of storage account keys and their properties for the
     specified storage account.
    :vartype keys_property: list[~azure.mgmt.storage.models.StorageAccountKey]
    """

    keys_property: Optional[list["_models.StorageAccountKey"]] = rest_field(
        name="keys", visibility=["read"], original_tsp_name="keys"
    )
    """Gets the list of storage account keys and their properties for the specified storage account."""


class StorageAccountMicrosoftEndpoints(_Model):
    """The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object
    via a microsoft routing endpoint.

    :ivar blob: Gets the blob endpoint.
    :vartype blob: str
    :ivar queue: Gets the queue endpoint.
    :vartype queue: str
    :ivar table: Gets the table endpoint.
    :vartype table: str
    :ivar file: Gets the file endpoint.
    :vartype file: str
    :ivar web: Gets the web endpoint.
    :vartype web: str
    :ivar dfs: Gets the dfs endpoint.
    :vartype dfs: str
    """

    blob: Optional[str] = rest_field(visibility=["read"])
    """Gets the blob endpoint."""
    queue: Optional[str] = rest_field(visibility=["read"])
    """Gets the queue endpoint."""
    table: Optional[str] = rest_field(visibility=["read"])
    """Gets the table endpoint."""
    file: Optional[str] = rest_field(visibility=["read"])
    """Gets the file endpoint."""
    web: Optional[str] = rest_field(visibility=["read"])
    """Gets the web endpoint."""
    dfs: Optional[str] = rest_field(visibility=["read"])
    """Gets the dfs endpoint."""


class StorageAccountMigration(ProxyResource):
    """The parameters or status associated with an ongoing or enqueued storage account migration in
    order to update its current SKU or region.

    :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.storage.models.SystemData
    :ivar storage_account_migration_details: The properties of a storage account’s ongoing or
     enqueued migration. Required.
    :vartype storage_account_migration_details:
     ~azure.mgmt.storage.models.StorageAccountMigrationProperties
    """

    storage_account_migration_details: "_models.StorageAccountMigrationProperties" = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of a storage account’s ongoing or enqueued migration. Required."""

    __flattened_items = [
        "target_sku_name",
        "migration_status",
        "migration_failed_reason",
        "migration_failed_detailed_reason",
    ]

    @overload
    def __init__(
        self,
        *,
        storage_account_migration_details: "_models.StorageAccountMigrationProperties",
    ) -> None: ...

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


class StorageAccountMigrationProperties(_Model):
    """The properties of a storage account's ongoing or enqueued migration.

    :ivar target_sku_name: Target sku name for the account. Required. Known values are:
     "Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS",
     "Standard_GZRS", "Standard_RAGZRS", "StandardV2_LRS", "StandardV2_GRS", "StandardV2_ZRS",
     "StandardV2_GZRS", "PremiumV2_LRS", and "PremiumV2_ZRS".
    :vartype target_sku_name: str or ~azure.mgmt.storage.models.SkuName
    :ivar migration_status: Current status of migration. Known values are: "Invalid",
     "SubmittedForConversion", "InProgress", "Complete", and "Failed".
    :vartype migration_status: str or ~azure.mgmt.storage.models.MigrationStatus
    :ivar migration_failed_reason: Error code for migration failure.
    :vartype migration_failed_reason: str
    :ivar migration_failed_detailed_reason: Reason for migration failure.
    :vartype migration_failed_detailed_reason: str
    """

    target_sku_name: Union[str, "_models.SkuName"] = rest_field(
        name="targetSkuName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Target sku name for the account. Required. Known values are: \"Standard_LRS\",
     \"Standard_GRS\", \"Standard_RAGRS\", \"Standard_ZRS\", \"Premium_LRS\", \"Premium_ZRS\",
     \"Standard_GZRS\", \"Standard_RAGZRS\", \"StandardV2_LRS\", \"StandardV2_GRS\",
     \"StandardV2_ZRS\", \"StandardV2_GZRS\", \"PremiumV2_LRS\", and \"PremiumV2_ZRS\"."""
    migration_status: Optional[Union[str, "_models.MigrationStatus"]] = rest_field(
        name="migrationStatus", visibility=["read"]
    )
    """Current status of migration. Known values are: \"Invalid\", \"SubmittedForConversion\",
     \"InProgress\", \"Complete\", and \"Failed\"."""
    migration_failed_reason: Optional[str] = rest_field(name="migrationFailedReason", visibility=["read"])
    """Error code for migration failure."""
    migration_failed_detailed_reason: Optional[str] = rest_field(
        name="migrationFailedDetailedReason", visibility=["read"]
    )
    """Reason for migration failure."""

    @overload
    def __init__(
        self,
        *,
        target_sku_name: Union[str, "_models.SkuName"],
    ) -> None: ...

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

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


class StorageAccountProperties(_Model):
    """Properties of the storage account.

    :ivar provisioning_state: Gets the status of the storage account at the time the operation was
     called. Known values are: "Creating", "ResolvingDNS", and "Succeeded".
    :vartype provisioning_state: str or ~azure.mgmt.storage.models.ProvisioningState
    :ivar primary_endpoints: Gets the URLs that are used to perform a retrieval of a public blob,
     queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob
     endpoint.
    :vartype primary_endpoints: ~azure.mgmt.storage.models.Endpoints
    :ivar primary_location: Gets the location of the primary data center for the storage account.
    :vartype primary_location: str
    :ivar status_of_primary: Gets the status indicating whether the primary location of the storage
     account is available or unavailable. Known values are: "available" and "unavailable".
    :vartype status_of_primary: str or ~azure.mgmt.storage.models.AccountStatus
    :ivar last_geo_failover_time: Gets the timestamp of the most recent instance of a failover to
     the secondary location. Only the most recent timestamp is retained. This element is not
     returned if there has never been a failover instance. Only available if the accountType is
     Standard_GRS or Standard_RAGRS.
    :vartype last_geo_failover_time: ~datetime.datetime
    :ivar secondary_location: Gets the location of the geo-replicated secondary for the storage
     account. Only available if the accountType is Standard_GRS or Standard_RAGRS.
    :vartype secondary_location: str
    :ivar status_of_secondary: Gets the status indicating whether the secondary location of the
     storage account is available or unavailable. Only available if the SKU name is Standard_GRS or
     Standard_RAGRS. Known values are: "available" and "unavailable".
    :vartype status_of_secondary: str or ~azure.mgmt.storage.models.AccountStatus
    :ivar creation_time: Gets the creation date and time of the storage account in UTC.
    :vartype creation_time: ~datetime.datetime
    :ivar custom_domain: Gets the custom domain the user assigned to this storage account.
    :vartype custom_domain: ~azure.mgmt.storage.models.CustomDomain
    :ivar sas_policy: SasPolicy assigned to the storage account.
    :vartype sas_policy: ~azure.mgmt.storage.models.SasPolicy
    :ivar key_policy: KeyPolicy assigned to the storage account.
    :vartype key_policy: ~azure.mgmt.storage.models.KeyPolicy
    :ivar key_creation_time: Storage account keys creation time.
    :vartype key_creation_time: ~azure.mgmt.storage.models.KeyCreationTime
    :ivar secondary_endpoints: Gets the URLs that are used to perform a retrieval of a public blob,
     queue, or table object from the secondary location of the storage account. Only available if
     the SKU name is Standard_RAGRS.
    :vartype secondary_endpoints: ~azure.mgmt.storage.models.Endpoints
    :ivar encryption: Encryption settings to be used for server-side encryption for the storage
     account.
    :vartype encryption: ~azure.mgmt.storage.models.Encryption
    :ivar access_tier: Required for storage accounts where kind = BlobStorage. The access tier is
     used for billing. The 'Premium' access tier is the default value for premium block blobs
     storage account type and it cannot be changed for the premium block blobs storage account type.
     Known values are: "Hot", "Cool", "Premium", "Cold", and "Smart".
    :vartype access_tier: str or ~azure.mgmt.storage.models.AccessTier
    :ivar azure_files_identity_based_authentication: Provides the identity based authentication
     settings for Azure Files.
    :vartype azure_files_identity_based_authentication:
     ~azure.mgmt.storage.models.AzureFilesIdentityBasedAuthentication
    :ivar enable_https_traffic_only: Allows https traffic only to storage service if sets to true.
    :vartype enable_https_traffic_only: bool
    :ivar network_rule_set: Network rule set.
    :vartype network_rule_set: ~azure.mgmt.storage.models.NetworkRuleSet
    :ivar is_sftp_enabled: Enables Secure File Transfer Protocol, if set to true.
    :vartype is_sftp_enabled: bool
    :ivar is_local_user_enabled: Enables local users feature, if set to true.
    :vartype is_local_user_enabled: bool
    :ivar enable_extended_groups: Enables extended group support with local users feature, if set
     to true.
    :vartype enable_extended_groups: bool
    :ivar is_hns_enabled: Account HierarchicalNamespace enabled if sets to true.
    :vartype is_hns_enabled: bool
    :ivar geo_replication_stats: Geo Replication Stats.
    :vartype geo_replication_stats: ~azure.mgmt.storage.models.GeoReplicationStats
    :ivar failover_in_progress: If the failover is in progress, the value will be true, otherwise,
     it will be null.
    :vartype failover_in_progress: bool
    :ivar large_file_shares_state: Allow large file shares if sets to Enabled. It cannot be
     disabled once it is enabled. Known values are: "Disabled" and "Enabled".
    :vartype large_file_shares_state: str or ~azure.mgmt.storage.models.LargeFileSharesState
    :ivar private_endpoint_connections: List of private endpoint connection associated with the
     specified storage account.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.storage.models.PrivateEndpointConnection]
    :ivar routing_preference: Maintains information about the network routing choice opted by the
     user for data transfer.
    :vartype routing_preference: ~azure.mgmt.storage.models.RoutingPreference
    :ivar dual_stack_endpoint_preference: Maintains information about the Internet protocol opted
     by the user.
    :vartype dual_stack_endpoint_preference: ~azure.mgmt.storage.models.DualStackEndpointPreference
    :ivar blob_restore_status: Blob restore status.
    :vartype blob_restore_status: ~azure.mgmt.storage.models.BlobRestoreStatus
    :ivar allow_blob_public_access: Allow or disallow public access to all blobs or containers in
     the storage account. The default interpretation is false for this property.
    :vartype allow_blob_public_access: bool
    :ivar minimum_tls_version: Set the minimum TLS version to be permitted on requests to storage.
     The default interpretation is TLS 1.0 for this property. Minimum TLS version 1.3 version is not
     supported. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLS1_3".
    :vartype minimum_tls_version: str or ~azure.mgmt.storage.models.MinimumTlsVersion
    :ivar allow_shared_key_access: Indicates whether the storage account permits requests to be
     authorized with the account access key via Shared Key. If false, then all requests, including
     shared access signatures, must be authorized with Azure Active Directory (Azure AD). The
     default value is null, which is equivalent to true.
    :vartype allow_shared_key_access: bool
    :ivar enable_nfs_v3: NFS 3.0 protocol support enabled if set to true.
    :vartype enable_nfs_v3: bool
    :ivar allow_cross_tenant_replication: Allow or disallow cross AAD tenant object replication.
     Set this property to true for new or existing accounts only if object replication policies will
     involve storage accounts in different AAD tenants. The default interpretation is false for new
     accounts to follow best security practices by default.
    :vartype allow_cross_tenant_replication: bool
    :ivar default_to_o_auth_authentication: A boolean flag which indicates whether the default
     authentication is OAuth or not. The default interpretation is false for this property.
    :vartype default_to_o_auth_authentication: bool
    :ivar public_network_access: Allow, disallow, or let Network Security Perimeter configuration
     to evaluate public network access to Storage Account. Known values are: "Enabled", "Disabled",
     and "SecuredByPerimeter".
    :vartype public_network_access: str or ~azure.mgmt.storage.models.PublicNetworkAccess
    :ivar immutable_storage_with_versioning: The property is immutable and can only be set to true
     at the account creation time. When set to true, it enables object level immutability for all
     the containers in the account by default.
    :vartype immutable_storage_with_versioning: ~azure.mgmt.storage.models.ImmutableStorageAccount
    :ivar allowed_copy_scope: Restrict copy to and from Storage Accounts within an AAD tenant or
     with Private Links to the same VNet. Known values are: "PrivateLink", "AAD", and "All".
    :vartype allowed_copy_scope: str or ~azure.mgmt.storage.models.AllowedCopyScope
    :ivar storage_account_sku_conversion_status: This property is readOnly and is set by server
     during asynchronous storage account sku conversion operations.
    :vartype storage_account_sku_conversion_status:
     ~azure.mgmt.storage.models.StorageAccountSkuConversionStatus
    :ivar dns_endpoint_type: Allows you to specify the type of endpoint. Set this to AzureDNSZone
     to create a large number of accounts in a single subscription, which creates accounts in an
     Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Known values
     are: "Standard" and "AzureDnsZone".
    :vartype dns_endpoint_type: str or ~azure.mgmt.storage.models.DnsEndpointType
    :ivar is_sku_conversion_blocked: This property will be set to true or false on an event of
     ongoing migration. Default value is null.
    :vartype is_sku_conversion_blocked: bool
    :ivar account_migration_in_progress: If customer initiated account migration is in progress,
     the value will be true else it will be null.
    :vartype account_migration_in_progress: bool
    :ivar geo_priority_replication_status: Status indicating whether Geo Priority Replication is
     enabled for the account.
    :vartype geo_priority_replication_status:
     ~azure.mgmt.storage.models.GeoPriorityReplicationStatus
    :ivar allow_shared_key_access_for_services: Indicate shared key access properties at service
     level.
    :vartype allow_shared_key_access_for_services:
     ~azure.mgmt.storage.models.StorageAccountSharedKeyAccessProperties
    :ivar data_collaboration_policy_properties: Data Collaboration policy for the storage account.
    :vartype data_collaboration_policy_properties:
     ~azure.mgmt.storage.models.StorageDataCollaborationPolicyProperties
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the storage account at the time the operation was called. Known values are:
     \"Creating\", \"ResolvingDNS\", and \"Succeeded\"."""
    primary_endpoints: Optional["_models.Endpoints"] = rest_field(name="primaryEndpoints", visibility=["read"])
    """Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object.
     Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint."""
    primary_location: Optional[str] = rest_field(name="primaryLocation", visibility=["read"])
    """Gets the location of the primary data center for the storage account."""
    status_of_primary: Optional[Union[str, "_models.AccountStatus"]] = rest_field(
        name="statusOfPrimary", visibility=["read"]
    )
    """Gets the status indicating whether the primary location of the storage account is available or
     unavailable. Known values are: \"available\" and \"unavailable\"."""
    last_geo_failover_time: Optional[datetime.datetime] = rest_field(
        name="lastGeoFailoverTime", visibility=["read"], format="rfc3339"
    )
    """Gets the timestamp of the most recent instance of a failover to the secondary location. Only
     the most recent timestamp is retained. This element is not returned if there has never been a
     failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS."""
    secondary_location: Optional[str] = rest_field(name="secondaryLocation", visibility=["read"])
    """Gets the location of the geo-replicated secondary for the storage account. Only available if
     the accountType is Standard_GRS or Standard_RAGRS."""
    status_of_secondary: Optional[Union[str, "_models.AccountStatus"]] = rest_field(
        name="statusOfSecondary", visibility=["read"]
    )
    """Gets the status indicating whether the secondary location of the storage account is available
     or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Known values
     are: \"available\" and \"unavailable\"."""
    creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", visibility=["read"], format="rfc3339")
    """Gets the creation date and time of the storage account in UTC."""
    custom_domain: Optional["_models.CustomDomain"] = rest_field(name="customDomain", visibility=["read"])
    """Gets the custom domain the user assigned to this storage account."""
    sas_policy: Optional["_models.SasPolicy"] = rest_field(name="sasPolicy", visibility=["read"])
    """SasPolicy assigned to the storage account."""
    key_policy: Optional["_models.KeyPolicy"] = rest_field(name="keyPolicy", visibility=["read"])
    """KeyPolicy assigned to the storage account."""
    key_creation_time: Optional["_models.KeyCreationTime"] = rest_field(name="keyCreationTime", visibility=["read"])
    """Storage account keys creation time."""
    secondary_endpoints: Optional["_models.Endpoints"] = rest_field(name="secondaryEndpoints", visibility=["read"])
    """Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object
     from the secondary location of the storage account. Only available if the SKU name is
     Standard_RAGRS."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read"])
    """Encryption settings to be used for server-side encryption for the storage account."""
    access_tier: Optional[Union[str, "_models.AccessTier"]] = rest_field(name="accessTier", visibility=["read"])
    """Required for storage accounts where kind = BlobStorage. The access tier is used for billing.
     The 'Premium' access tier is the default value for premium block blobs storage account type and
     it cannot be changed for the premium block blobs storage account type. Known values are:
     \"Hot\", \"Cool\", \"Premium\", \"Cold\", and \"Smart\"."""
    azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = rest_field(
        name="azureFilesIdentityBasedAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Provides the identity based authentication settings for Azure Files."""
    enable_https_traffic_only: Optional[bool] = rest_field(
        name="supportsHttpsTrafficOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows https traffic only to storage service if sets to true."""
    network_rule_set: Optional["_models.NetworkRuleSet"] = rest_field(name="networkAcls", visibility=["read"])
    """Network rule set."""
    is_sftp_enabled: Optional[bool] = rest_field(
        name="isSftpEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables Secure File Transfer Protocol, if set to true."""
    is_local_user_enabled: Optional[bool] = rest_field(
        name="isLocalUserEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables local users feature, if set to true."""
    enable_extended_groups: Optional[bool] = rest_field(
        name="enableExtendedGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables extended group support with local users feature, if set to true."""
    is_hns_enabled: Optional[bool] = rest_field(
        name="isHnsEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account HierarchicalNamespace enabled if sets to true."""
    geo_replication_stats: Optional["_models.GeoReplicationStats"] = rest_field(
        name="geoReplicationStats", visibility=["read"]
    )
    """Geo Replication Stats."""
    failover_in_progress: Optional[bool] = rest_field(name="failoverInProgress", visibility=["read"])
    """If the failover is in progress, the value will be true, otherwise, it will be null."""
    large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = rest_field(
        name="largeFileSharesState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Known
     values are: \"Disabled\" and \"Enabled\"."""
    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """List of private endpoint connection associated with the specified storage account."""
    routing_preference: Optional["_models.RoutingPreference"] = rest_field(
        name="routingPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the network routing choice opted by the user for data transfer."""
    dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = rest_field(
        name="dualStackEndpointPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the Internet protocol opted by the user."""
    blob_restore_status: Optional["_models.BlobRestoreStatus"] = rest_field(
        name="blobRestoreStatus", visibility=["read"]
    )
    """Blob restore status."""
    allow_blob_public_access: Optional[bool] = rest_field(
        name="allowBlobPublicAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow public access to all blobs or containers in the storage account. The default
     interpretation is false for this property."""
    minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = rest_field(
        name="minimumTlsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set the minimum TLS version to be permitted on requests to storage. The default interpretation
     is TLS 1.0 for this property. Minimum TLS version 1.3 version is not supported. Known values
     are: \"TLS1_0\", \"TLS1_1\", \"TLS1_2\", and \"TLS1_3\"."""
    allow_shared_key_access: Optional[bool] = rest_field(
        name="allowSharedKeyAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the storage account permits requests to be authorized with the account access
     key via Shared Key. If false, then all requests, including shared access signatures, must be
     authorized with Azure Active Directory (Azure AD). The default value is null, which is
     equivalent to true."""
    enable_nfs_v3: Optional[bool] = rest_field(
        name="isNfsV3Enabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """NFS 3.0 protocol support enabled if set to true."""
    allow_cross_tenant_replication: Optional[bool] = rest_field(
        name="allowCrossTenantReplication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow cross AAD tenant object replication. Set this property to true for new or
     existing accounts only if object replication policies will involve storage accounts in
     different AAD tenants. The default interpretation is false for new accounts to follow best
     security practices by default."""
    default_to_o_auth_authentication: Optional[bool] = rest_field(
        name="defaultToOAuthAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether the default authentication is OAuth or not. The default
     interpretation is false for this property."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow, disallow, or let Network Security Perimeter configuration to evaluate public network
     access to Storage Account. Known values are: \"Enabled\", \"Disabled\", and
     \"SecuredByPerimeter\"."""
    immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = rest_field(
        name="immutableStorageWithVersioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The property is immutable and can only be set to true at the account creation time. When set to
     true, it enables object level immutability for all the containers in the account by default."""
    allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = rest_field(
        name="allowedCopyScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the
     same VNet. Known values are: \"PrivateLink\", \"AAD\", and \"All\"."""
    storage_account_sku_conversion_status: Optional["_models.StorageAccountSkuConversionStatus"] = rest_field(
        name="storageAccountSkuConversionStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property is readOnly and is set by server during asynchronous storage account sku
     conversion operations."""
    dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = rest_field(
        name="dnsEndpointType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number
     of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the
     endpoint URL will have an alphanumeric DNS Zone identifier. Known values are: \"Standard\" and
     \"AzureDnsZone\"."""
    is_sku_conversion_blocked: Optional[bool] = rest_field(name="isSkuConversionBlocked", visibility=["read"])
    """This property will be set to true or false on an event of ongoing migration. Default value is
     null."""
    account_migration_in_progress: Optional[bool] = rest_field(name="accountMigrationInProgress", visibility=["read"])
    """If customer initiated account migration is in progress, the value will be true else it will be
     null."""
    geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = rest_field(
        name="geoPriorityReplicationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Status indicating whether Geo Priority Replication is enabled for the account."""
    allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = rest_field(
        name="allowSharedKeyAccessForServices", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicate shared key access properties at service level."""
    data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = rest_field(
        name="dataCollaborationPolicyProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Data Collaboration policy for the storage account."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = None,
        enable_https_traffic_only: Optional[bool] = None,
        is_sftp_enabled: Optional[bool] = None,
        is_local_user_enabled: Optional[bool] = None,
        enable_extended_groups: Optional[bool] = None,
        is_hns_enabled: Optional[bool] = None,
        large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = None,
        routing_preference: Optional["_models.RoutingPreference"] = None,
        dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = None,
        allow_blob_public_access: Optional[bool] = None,
        minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None,
        allow_shared_key_access: Optional[bool] = None,
        enable_nfs_v3: Optional[bool] = None,
        allow_cross_tenant_replication: Optional[bool] = None,
        default_to_o_auth_authentication: Optional[bool] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = None,
        allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = None,
        storage_account_sku_conversion_status: Optional["_models.StorageAccountSkuConversionStatus"] = None,
        dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = None,
        geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = None,
        allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = None,
        data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = None,
    ) -> None: ...

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

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


class StorageAccountPropertiesCreateParameters(_Model):
    """The parameters used to create the storage account.

    :ivar allowed_copy_scope: Restrict copy to and from Storage Accounts within an AAD tenant or
     with Private Links to the same VNet. Known values are: "PrivateLink", "AAD", and "All".
    :vartype allowed_copy_scope: str or ~azure.mgmt.storage.models.AllowedCopyScope
    :ivar public_network_access: Allow, disallow, or let Network Security Perimeter configuration
     to evaluate public network access to Storage Account. Value is optional but if passed in, must
     be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. Known values are: "Enabled", "Disabled", and
     "SecuredByPerimeter".
    :vartype public_network_access: str or ~azure.mgmt.storage.models.PublicNetworkAccess
    :ivar sas_policy: SasPolicy assigned to the storage account.
    :vartype sas_policy: ~azure.mgmt.storage.models.SasPolicy
    :ivar key_policy: KeyPolicy assigned to the storage account.
    :vartype key_policy: ~azure.mgmt.storage.models.KeyPolicy
    :ivar custom_domain: User domain assigned to the storage account. Name is the CNAME source.
     Only one custom domain is supported per storage account at this time. To clear the existing
     custom domain, use an empty string for the custom domain name property.
    :vartype custom_domain: ~azure.mgmt.storage.models.CustomDomain
    :ivar encryption: Encryption settings to be used for server-side encryption for the storage
     account.
    :vartype encryption: ~azure.mgmt.storage.models.Encryption
    :ivar network_rule_set: Network rule set.
    :vartype network_rule_set: ~azure.mgmt.storage.models.NetworkRuleSet
    :ivar access_tier: Required for storage accounts where kind = BlobStorage. The access tier is
     used for billing. The 'Premium' access tier is the default value for premium block blobs
     storage account type and it cannot be changed for the premium block blobs storage account type.
     Known values are: "Hot", "Cool", "Premium", "Cold", and "Smart".
    :vartype access_tier: str or ~azure.mgmt.storage.models.AccessTier
    :ivar azure_files_identity_based_authentication: Provides the identity based authentication
     settings for Azure Files.
    :vartype azure_files_identity_based_authentication:
     ~azure.mgmt.storage.models.AzureFilesIdentityBasedAuthentication
    :ivar enable_https_traffic_only: Allows https traffic only to storage service if sets to true.
     The default value is true since API version 2019-04-01.
    :vartype enable_https_traffic_only: bool
    :ivar is_sftp_enabled: Enables Secure File Transfer Protocol, if set to true.
    :vartype is_sftp_enabled: bool
    :ivar is_local_user_enabled: Enables local users feature, if set to true.
    :vartype is_local_user_enabled: bool
    :ivar enable_extended_groups: Enables extended group support with local users feature, if set
     to true.
    :vartype enable_extended_groups: bool
    :ivar is_hns_enabled: Account HierarchicalNamespace enabled if sets to true.
    :vartype is_hns_enabled: bool
    :ivar large_file_shares_state: Allow large file shares if sets to Enabled. It cannot be
     disabled once it is enabled. Known values are: "Disabled" and "Enabled".
    :vartype large_file_shares_state: str or ~azure.mgmt.storage.models.LargeFileSharesState
    :ivar routing_preference: Maintains information about the network routing choice opted by the
     user for data transfer.
    :vartype routing_preference: ~azure.mgmt.storage.models.RoutingPreference
    :ivar dual_stack_endpoint_preference: Maintains information about the Internet protocol opted
     by the user.
    :vartype dual_stack_endpoint_preference: ~azure.mgmt.storage.models.DualStackEndpointPreference
    :ivar allow_blob_public_access: Allow or disallow public access to all blobs or containers in
     the storage account. The default interpretation is false for this property.
    :vartype allow_blob_public_access: bool
    :ivar minimum_tls_version: Set the minimum TLS version to be permitted on requests to storage.
     The default interpretation is TLS 1.0 for this property. Minimum TLS version 1.3 version is not
     supported. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLS1_3".
    :vartype minimum_tls_version: str or ~azure.mgmt.storage.models.MinimumTlsVersion
    :ivar allow_shared_key_access: Indicates whether the storage account permits requests to be
     authorized with the account access key via Shared Key. If false, then all requests, including
     shared access signatures, must be authorized with Azure Active Directory (Azure AD). The
     default value is null, which is equivalent to true.
    :vartype allow_shared_key_access: bool
    :ivar enable_nfs_v3: NFS 3.0 protocol support enabled if set to true.
    :vartype enable_nfs_v3: bool
    :ivar allow_cross_tenant_replication: Allow or disallow cross AAD tenant object replication.
     Set this property to true for new or existing accounts only if object replication policies will
     involve storage accounts in different AAD tenants. The default interpretation is false for new
     accounts to follow best security practices by default.
    :vartype allow_cross_tenant_replication: bool
    :ivar default_to_o_auth_authentication: A boolean flag which indicates whether the default
     authentication is OAuth or not. The default interpretation is false for this property.
    :vartype default_to_o_auth_authentication: bool
    :ivar immutable_storage_with_versioning: The property is immutable and can only be set to true
     at the account creation time. When set to true, it enables object level immutability for all
     the new containers in the account by default.
    :vartype immutable_storage_with_versioning: ~azure.mgmt.storage.models.ImmutableStorageAccount
    :ivar dns_endpoint_type: Allows you to specify the type of endpoint. Set this to AzureDNSZone
     to create a large number of accounts in a single subscription, which creates accounts in an
     Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Known values
     are: "Standard" and "AzureDnsZone".
    :vartype dns_endpoint_type: str or ~azure.mgmt.storage.models.DnsEndpointType
    :ivar geo_priority_replication_status: Status indicating whether Geo Priority Replication is
     enabled for the account.
    :vartype geo_priority_replication_status:
     ~azure.mgmt.storage.models.GeoPriorityReplicationStatus
    :ivar allow_shared_key_access_for_services: Indicate shared key access properties at service
     level.
    :vartype allow_shared_key_access_for_services:
     ~azure.mgmt.storage.models.StorageAccountSharedKeyAccessProperties
    :ivar data_collaboration_policy_properties: Data Collaboration policy for the storage account.
    :vartype data_collaboration_policy_properties:
     ~azure.mgmt.storage.models.StorageDataCollaborationPolicyProperties
    """

    allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = rest_field(
        name="allowedCopyScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the
     same VNet. Known values are: \"PrivateLink\", \"AAD\", and \"All\"."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow, disallow, or let Network Security Perimeter configuration to evaluate public network
     access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or
     'SecuredByPerimeter'. Known values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\"."""
    sas_policy: Optional["_models.SasPolicy"] = rest_field(
        name="sasPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """SasPolicy assigned to the storage account."""
    key_policy: Optional["_models.KeyPolicy"] = rest_field(
        name="keyPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """KeyPolicy assigned to the storage account."""
    custom_domain: Optional["_models.CustomDomain"] = rest_field(
        name="customDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """User domain assigned to the storage account. Name is the CNAME source. Only one custom domain
     is supported per storage account at this time. To clear the existing custom domain, use an
     empty string for the custom domain name property."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Encryption settings to be used for server-side encryption for the storage account."""
    network_rule_set: Optional["_models.NetworkRuleSet"] = rest_field(
        name="networkAcls", visibility=["read", "create", "update", "delete", "query"]
    )
    """Network rule set."""
    access_tier: Optional[Union[str, "_models.AccessTier"]] = rest_field(
        name="accessTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required for storage accounts where kind = BlobStorage. The access tier is used for billing.
     The 'Premium' access tier is the default value for premium block blobs storage account type and
     it cannot be changed for the premium block blobs storage account type. Known values are:
     \"Hot\", \"Cool\", \"Premium\", \"Cold\", and \"Smart\"."""
    azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = rest_field(
        name="azureFilesIdentityBasedAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Provides the identity based authentication settings for Azure Files."""
    enable_https_traffic_only: Optional[bool] = rest_field(
        name="supportsHttpsTrafficOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows https traffic only to storage service if sets to true. The default value is true since
     API version 2019-04-01."""
    is_sftp_enabled: Optional[bool] = rest_field(
        name="isSftpEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables Secure File Transfer Protocol, if set to true."""
    is_local_user_enabled: Optional[bool] = rest_field(
        name="isLocalUserEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables local users feature, if set to true."""
    enable_extended_groups: Optional[bool] = rest_field(
        name="enableExtendedGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables extended group support with local users feature, if set to true."""
    is_hns_enabled: Optional[bool] = rest_field(
        name="isHnsEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account HierarchicalNamespace enabled if sets to true."""
    large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = rest_field(
        name="largeFileSharesState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Known
     values are: \"Disabled\" and \"Enabled\"."""
    routing_preference: Optional["_models.RoutingPreference"] = rest_field(
        name="routingPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the network routing choice opted by the user for data transfer."""
    dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = rest_field(
        name="dualStackEndpointPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the Internet protocol opted by the user."""
    allow_blob_public_access: Optional[bool] = rest_field(
        name="allowBlobPublicAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow public access to all blobs or containers in the storage account. The default
     interpretation is false for this property."""
    minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = rest_field(
        name="minimumTlsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set the minimum TLS version to be permitted on requests to storage. The default interpretation
     is TLS 1.0 for this property. Minimum TLS version 1.3 version is not supported. Known values
     are: \"TLS1_0\", \"TLS1_1\", \"TLS1_2\", and \"TLS1_3\"."""
    allow_shared_key_access: Optional[bool] = rest_field(
        name="allowSharedKeyAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the storage account permits requests to be authorized with the account access
     key via Shared Key. If false, then all requests, including shared access signatures, must be
     authorized with Azure Active Directory (Azure AD). The default value is null, which is
     equivalent to true."""
    enable_nfs_v3: Optional[bool] = rest_field(
        name="isNfsV3Enabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """NFS 3.0 protocol support enabled if set to true."""
    allow_cross_tenant_replication: Optional[bool] = rest_field(
        name="allowCrossTenantReplication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow cross AAD tenant object replication. Set this property to true for new or
     existing accounts only if object replication policies will involve storage accounts in
     different AAD tenants. The default interpretation is false for new accounts to follow best
     security practices by default."""
    default_to_o_auth_authentication: Optional[bool] = rest_field(
        name="defaultToOAuthAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether the default authentication is OAuth or not. The default
     interpretation is false for this property."""
    immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = rest_field(
        name="immutableStorageWithVersioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The property is immutable and can only be set to true at the account creation time. When set to
     true, it enables object level immutability for all the new containers in the account by
     default."""
    dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = rest_field(
        name="dnsEndpointType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number
     of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the
     endpoint URL will have an alphanumeric DNS Zone identifier. Known values are: \"Standard\" and
     \"AzureDnsZone\"."""
    geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = rest_field(
        name="geoPriorityReplicationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Status indicating whether Geo Priority Replication is enabled for the account."""
    allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = rest_field(
        name="allowSharedKeyAccessForServices", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicate shared key access properties at service level."""
    data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = rest_field(
        name="dataCollaborationPolicyProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Data Collaboration policy for the storage account."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        sas_policy: Optional["_models.SasPolicy"] = None,
        key_policy: Optional["_models.KeyPolicy"] = None,
        custom_domain: Optional["_models.CustomDomain"] = None,
        encryption: Optional["_models.Encryption"] = None,
        network_rule_set: Optional["_models.NetworkRuleSet"] = None,
        access_tier: Optional[Union[str, "_models.AccessTier"]] = None,
        azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = None,
        enable_https_traffic_only: Optional[bool] = None,
        is_sftp_enabled: Optional[bool] = None,
        is_local_user_enabled: Optional[bool] = None,
        enable_extended_groups: Optional[bool] = None,
        is_hns_enabled: Optional[bool] = None,
        large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = None,
        routing_preference: Optional["_models.RoutingPreference"] = None,
        dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = None,
        allow_blob_public_access: Optional[bool] = None,
        minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None,
        allow_shared_key_access: Optional[bool] = None,
        enable_nfs_v3: Optional[bool] = None,
        allow_cross_tenant_replication: Optional[bool] = None,
        default_to_o_auth_authentication: Optional[bool] = None,
        immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = None,
        dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = None,
        geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = None,
        allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = None,
        data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = None,
    ) -> None: ...

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

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


class StorageAccountPropertiesUpdateParameters(_Model):
    """The parameters used when updating a storage account.

    :ivar custom_domain: Custom domain assigned to the storage account by the user. Name is the
     CNAME source. Only one custom domain is supported per storage account at this time. To clear
     the existing custom domain, use an empty string for the custom domain name property.
    :vartype custom_domain: ~azure.mgmt.storage.models.CustomDomain
    :ivar encryption: Not applicable. Azure Storage encryption at rest is enabled by default for
     all storage accounts and cannot be disabled.
    :vartype encryption: ~azure.mgmt.storage.models.Encryption
    :ivar sas_policy: SasPolicy assigned to the storage account.
    :vartype sas_policy: ~azure.mgmt.storage.models.SasPolicy
    :ivar key_policy: KeyPolicy assigned to the storage account.
    :vartype key_policy: ~azure.mgmt.storage.models.KeyPolicy
    :ivar access_tier: Required for storage accounts where kind = BlobStorage. The access tier is
     used for billing. The 'Premium' access tier is the default value for premium block blobs
     storage account type and it cannot be changed for the premium block blobs storage account type.
     Known values are: "Hot", "Cool", "Premium", "Cold", and "Smart".
    :vartype access_tier: str or ~azure.mgmt.storage.models.AccessTier
    :ivar azure_files_identity_based_authentication: Provides the identity based authentication
     settings for Azure Files.
    :vartype azure_files_identity_based_authentication:
     ~azure.mgmt.storage.models.AzureFilesIdentityBasedAuthentication
    :ivar enable_https_traffic_only: Allows https traffic only to storage service if sets to true.
    :vartype enable_https_traffic_only: bool
    :ivar is_sftp_enabled: Enables Secure File Transfer Protocol, if set to true.
    :vartype is_sftp_enabled: bool
    :ivar is_local_user_enabled: Enables local users feature, if set to true.
    :vartype is_local_user_enabled: bool
    :ivar enable_extended_groups: Enables extended group support with local users feature, if set
     to true.
    :vartype enable_extended_groups: bool
    :ivar network_rule_set: Network rule set.
    :vartype network_rule_set: ~azure.mgmt.storage.models.NetworkRuleSet
    :ivar large_file_shares_state: Allow large file shares if sets to Enabled. It cannot be
     disabled once it is enabled. Known values are: "Disabled" and "Enabled".
    :vartype large_file_shares_state: str or ~azure.mgmt.storage.models.LargeFileSharesState
    :ivar routing_preference: Maintains information about the network routing choice opted by the
     user for data transfer.
    :vartype routing_preference: ~azure.mgmt.storage.models.RoutingPreference
    :ivar dual_stack_endpoint_preference: Maintains information about the Internet protocol opted
     by the user.
    :vartype dual_stack_endpoint_preference: ~azure.mgmt.storage.models.DualStackEndpointPreference
    :ivar allow_blob_public_access: Allow or disallow public access to all blobs or containers in
     the storage account. The default interpretation is false for this property.
    :vartype allow_blob_public_access: bool
    :ivar minimum_tls_version: Set the minimum TLS version to be permitted on requests to storage.
     The default interpretation is TLS 1.0 for this property. Minimum TLS version 1.3 version is not
     supported. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLS1_3".
    :vartype minimum_tls_version: str or ~azure.mgmt.storage.models.MinimumTlsVersion
    :ivar allow_shared_key_access: Indicates whether the storage account permits requests to be
     authorized with the account access key via Shared Key. If false, then all requests, including
     shared access signatures, must be authorized with Azure Active Directory (Azure AD). The
     default value is null, which is equivalent to true.
    :vartype allow_shared_key_access: bool
    :ivar allow_cross_tenant_replication: Allow or disallow cross AAD tenant object replication.
     Set this property to true for new or existing accounts only if object replication policies will
     involve storage accounts in different AAD tenants. The default interpretation is false for new
     accounts to follow best security practices by default.
    :vartype allow_cross_tenant_replication: bool
    :ivar default_to_o_auth_authentication: A boolean flag which indicates whether the default
     authentication is OAuth or not. The default interpretation is false for this property.
    :vartype default_to_o_auth_authentication: bool
    :ivar public_network_access: Allow, disallow, or let Network Security Perimeter configuration
     to evaluate public network access to Storage Account. Value is optional but if passed in, must
     be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. Known values are: "Enabled", "Disabled", and
     "SecuredByPerimeter".
    :vartype public_network_access: str or ~azure.mgmt.storage.models.PublicNetworkAccess
    :ivar immutable_storage_with_versioning: The property is immutable and can only be set to true
     at the account creation time. When set to true, it enables object level immutability for all
     the containers in the account by default.
    :vartype immutable_storage_with_versioning: ~azure.mgmt.storage.models.ImmutableStorageAccount
    :ivar allowed_copy_scope: Restrict copy to and from Storage Accounts within an AAD tenant or
     with Private Links to the same VNet. Known values are: "PrivateLink", "AAD", and "All".
    :vartype allowed_copy_scope: str or ~azure.mgmt.storage.models.AllowedCopyScope
    :ivar dns_endpoint_type: Allows you to specify the type of endpoint. Set this to AzureDNSZone
     to create a large number of accounts in a single subscription, which creates accounts in an
     Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. Known values
     are: "Standard" and "AzureDnsZone".
    :vartype dns_endpoint_type: str or ~azure.mgmt.storage.models.DnsEndpointType
    :ivar geo_priority_replication_status: Status indicating whether Geo Priority Replication is
     enabled for the account.
    :vartype geo_priority_replication_status:
     ~azure.mgmt.storage.models.GeoPriorityReplicationStatus
    :ivar allow_shared_key_access_for_services: Indicate shared key access properties at service
     level.
    :vartype allow_shared_key_access_for_services:
     ~azure.mgmt.storage.models.StorageAccountSharedKeyAccessProperties
    :ivar data_collaboration_policy_properties: Data Collaboration policy for the storage account.
    :vartype data_collaboration_policy_properties:
     ~azure.mgmt.storage.models.StorageDataCollaborationPolicyProperties
    """

    custom_domain: Optional["_models.CustomDomain"] = rest_field(
        name="customDomain", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one
     custom domain is supported per storage account at this time. To clear the existing custom
     domain, use an empty string for the custom domain name property."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts
     and cannot be disabled."""
    sas_policy: Optional["_models.SasPolicy"] = rest_field(
        name="sasPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """SasPolicy assigned to the storage account."""
    key_policy: Optional["_models.KeyPolicy"] = rest_field(
        name="keyPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """KeyPolicy assigned to the storage account."""
    access_tier: Optional[Union[str, "_models.AccessTier"]] = rest_field(
        name="accessTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required for storage accounts where kind = BlobStorage. The access tier is used for billing.
     The 'Premium' access tier is the default value for premium block blobs storage account type and
     it cannot be changed for the premium block blobs storage account type. Known values are:
     \"Hot\", \"Cool\", \"Premium\", \"Cold\", and \"Smart\"."""
    azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = rest_field(
        name="azureFilesIdentityBasedAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Provides the identity based authentication settings for Azure Files."""
    enable_https_traffic_only: Optional[bool] = rest_field(
        name="supportsHttpsTrafficOnly", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows https traffic only to storage service if sets to true."""
    is_sftp_enabled: Optional[bool] = rest_field(
        name="isSftpEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables Secure File Transfer Protocol, if set to true."""
    is_local_user_enabled: Optional[bool] = rest_field(
        name="isLocalUserEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables local users feature, if set to true."""
    enable_extended_groups: Optional[bool] = rest_field(
        name="enableExtendedGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables extended group support with local users feature, if set to true."""
    network_rule_set: Optional["_models.NetworkRuleSet"] = rest_field(
        name="networkAcls", visibility=["read", "create", "update", "delete", "query"]
    )
    """Network rule set."""
    large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = rest_field(
        name="largeFileSharesState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Known
     values are: \"Disabled\" and \"Enabled\"."""
    routing_preference: Optional["_models.RoutingPreference"] = rest_field(
        name="routingPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the network routing choice opted by the user for data transfer."""
    dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = rest_field(
        name="dualStackEndpointPreference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maintains information about the Internet protocol opted by the user."""
    allow_blob_public_access: Optional[bool] = rest_field(
        name="allowBlobPublicAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow public access to all blobs or containers in the storage account. The default
     interpretation is false for this property."""
    minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = rest_field(
        name="minimumTlsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Set the minimum TLS version to be permitted on requests to storage. The default interpretation
     is TLS 1.0 for this property. Minimum TLS version 1.3 version is not supported. Known values
     are: \"TLS1_0\", \"TLS1_1\", \"TLS1_2\", and \"TLS1_3\"."""
    allow_shared_key_access: Optional[bool] = rest_field(
        name="allowSharedKeyAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the storage account permits requests to be authorized with the account access
     key via Shared Key. If false, then all requests, including shared access signatures, must be
     authorized with Azure Active Directory (Azure AD). The default value is null, which is
     equivalent to true."""
    allow_cross_tenant_replication: Optional[bool] = rest_field(
        name="allowCrossTenantReplication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow or disallow cross AAD tenant object replication. Set this property to true for new or
     existing accounts only if object replication policies will involve storage accounts in
     different AAD tenants. The default interpretation is false for new accounts to follow best
     security practices by default."""
    default_to_o_auth_authentication: Optional[bool] = rest_field(
        name="defaultToOAuthAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """A boolean flag which indicates whether the default authentication is OAuth or not. The default
     interpretation is false for this property."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allow, disallow, or let Network Security Perimeter configuration to evaluate public network
     access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or
     'SecuredByPerimeter'. Known values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\"."""
    immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = rest_field(
        name="immutableStorageWithVersioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The property is immutable and can only be set to true at the account creation time. When set to
     true, it enables object level immutability for all the containers in the account by default."""
    allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = rest_field(
        name="allowedCopyScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the
     same VNet. Known values are: \"PrivateLink\", \"AAD\", and \"All\"."""
    dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = rest_field(
        name="dnsEndpointType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number
     of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the
     endpoint URL will have an alphanumeric DNS Zone identifier. Known values are: \"Standard\" and
     \"AzureDnsZone\"."""
    geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = rest_field(
        name="geoPriorityReplicationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Status indicating whether Geo Priority Replication is enabled for the account."""
    allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = rest_field(
        name="allowSharedKeyAccessForServices", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicate shared key access properties at service level."""
    data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = rest_field(
        name="dataCollaborationPolicyProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Data Collaboration policy for the storage account."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        custom_domain: Optional["_models.CustomDomain"] = None,
        encryption: Optional["_models.Encryption"] = None,
        sas_policy: Optional["_models.SasPolicy"] = None,
        key_policy: Optional["_models.KeyPolicy"] = None,
        access_tier: Optional[Union[str, "_models.AccessTier"]] = None,
        azure_files_identity_based_authentication: Optional["_models.AzureFilesIdentityBasedAuthentication"] = None,
        enable_https_traffic_only: Optional[bool] = None,
        is_sftp_enabled: Optional[bool] = None,
        is_local_user_enabled: Optional[bool] = None,
        enable_extended_groups: Optional[bool] = None,
        network_rule_set: Optional["_models.NetworkRuleSet"] = None,
        large_file_shares_state: Optional[Union[str, "_models.LargeFileSharesState"]] = None,
        routing_preference: Optional["_models.RoutingPreference"] = None,
        dual_stack_endpoint_preference: Optional["_models.DualStackEndpointPreference"] = None,
        allow_blob_public_access: Optional[bool] = None,
        minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None,
        allow_shared_key_access: Optional[bool] = None,
        allow_cross_tenant_replication: Optional[bool] = None,
        default_to_o_auth_authentication: Optional[bool] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        immutable_storage_with_versioning: Optional["_models.ImmutableStorageAccount"] = None,
        allowed_copy_scope: Optional[Union[str, "_models.AllowedCopyScope"]] = None,
        dns_endpoint_type: Optional[Union[str, "_models.DnsEndpointType"]] = None,
        geo_priority_replication_status: Optional["_models.GeoPriorityReplicationStatus"] = None,
        allow_shared_key_access_for_services: Optional["_models.StorageAccountSharedKeyAccessProperties"] = None,
        data_collaboration_policy_properties: Optional["_models.StorageDataCollaborationPolicyProperties"] = None,
    ) -> None: ...

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

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


class StorageAccountRegenerateKeyParameters(_Model):
    """The parameters used to regenerate the storage account key.

    :ivar key_name: The name of storage keys that want to be regenerated, possible values are key1,
     key2, kerb1, kerb2. Required.
    :vartype key_name: str
    """

    key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
    """The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1,
     kerb2. Required."""

    @overload
    def __init__(
        self,
        *,
        key_name: 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 StorageAccountSharedKeyAccessProperties(_Model):
    """Defines shared key access properties for a storage account.

    :ivar blob: Shared key access settings for Blob service.
    :vartype blob: ~azure.mgmt.storage.models.ServiceSharedKeyAccessProperties
    :ivar file: Shared key access settings for File service.
    :vartype file: ~azure.mgmt.storage.models.ServiceSharedKeyAccessProperties
    :ivar table: Shared key access settings for Table service.
    :vartype table: ~azure.mgmt.storage.models.ServiceSharedKeyAccessProperties
    :ivar queue: Shared key access settings for Queue service.
    :vartype queue: ~azure.mgmt.storage.models.ServiceSharedKeyAccessProperties
    """

    blob: Optional["_models.ServiceSharedKeyAccessProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Shared key access settings for Blob service."""
    file: Optional["_models.ServiceSharedKeyAccessProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Shared key access settings for File service."""
    table: Optional["_models.ServiceSharedKeyAccessProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Shared key access settings for Table service."""
    queue: Optional["_models.ServiceSharedKeyAccessProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Shared key access settings for Queue service."""

    @overload
    def __init__(
        self,
        *,
        blob: Optional["_models.ServiceSharedKeyAccessProperties"] = None,
        file: Optional["_models.ServiceSharedKeyAccessProperties"] = None,
        table: Optional["_models.ServiceSharedKeyAccessProperties"] = None,
        queue: Optional["_models.ServiceSharedKeyAccessProperties"] = None,
    ) -> None: ...

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

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


class StorageAccountSkuConversionStatus(_Model):
    """This defines the sku conversion status object for asynchronous sku conversions.

    :ivar sku_conversion_status: This property indicates the current sku conversion status. Known
     values are: "InProgress", "Succeeded", and "Failed".
    :vartype sku_conversion_status: str or ~azure.mgmt.storage.models.SkuConversionStatus
    :ivar target_sku_name: This property represents the target sku name to which the account sku is
     being converted asynchronously. Known values are: "Standard_LRS", "Standard_GRS",
     "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS", "Standard_GZRS",
     "Standard_RAGZRS", "StandardV2_LRS", "StandardV2_GRS", "StandardV2_ZRS", "StandardV2_GZRS",
     "PremiumV2_LRS", and "PremiumV2_ZRS".
    :vartype target_sku_name: str or ~azure.mgmt.storage.models.SkuName
    :ivar start_time: This property represents the sku conversion start time.
    :vartype start_time: str
    :ivar end_time: This property represents the sku conversion end time.
    :vartype end_time: str
    """

    sku_conversion_status: Optional[Union[str, "_models.SkuConversionStatus"]] = rest_field(
        name="skuConversionStatus", visibility=["read"]
    )
    """This property indicates the current sku conversion status. Known values are: \"InProgress\",
     \"Succeeded\", and \"Failed\"."""
    target_sku_name: Optional[Union[str, "_models.SkuName"]] = rest_field(
        name="targetSkuName", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property represents the target sku name to which the account sku is being converted
     asynchronously. Known values are: \"Standard_LRS\", \"Standard_GRS\", \"Standard_RAGRS\",
     \"Standard_ZRS\", \"Premium_LRS\", \"Premium_ZRS\", \"Standard_GZRS\", \"Standard_RAGZRS\",
     \"StandardV2_LRS\", \"StandardV2_GRS\", \"StandardV2_ZRS\", \"StandardV2_GZRS\",
     \"PremiumV2_LRS\", and \"PremiumV2_ZRS\"."""
    start_time: Optional[str] = rest_field(name="startTime", visibility=["read"])
    """This property represents the sku conversion start time."""
    end_time: Optional[str] = rest_field(name="endTime", visibility=["read"])
    """This property represents the sku conversion end time."""

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

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

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


class StorageAccountUpdateParameters(_Model):
    """The parameters that can be provided when updating the storage account properties.

    :ivar sku: Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS,
     Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value.
    :vartype sku: ~azure.mgmt.storage.models.Sku
    :ivar tags: Gets or sets a list of key value pairs that describe the resource. These tags can
     be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags
     can be provided for a resource. Each tag must have a key no greater in length than 128
     characters and a value no greater in length than 256 characters.
    :vartype tags: dict[str, str]
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.storage.models.Identity
    :ivar properties: The parameters used when updating a storage account.
    :vartype properties: ~azure.mgmt.storage.models.StorageAccountPropertiesUpdateParameters
    :ivar kind: Optional. Indicates the type of storage account. Currently only StorageV2 value
     supported by server. Known values are: "Storage", "StorageV2", "BlobStorage", "FileStorage",
     and "BlockBlobStorage".
    :vartype kind: str or ~azure.mgmt.storage.models.Kind
    :ivar zones: Optional. Gets or sets the pinned logical availability zone for the storage
     account.
    :vartype zones: list[str]
    :ivar placement: Optional. Gets or sets the zonal placement details for the storage account.
    :vartype placement: ~azure.mgmt.storage.models.Placement
    """

    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS,
     Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets a list of key value pairs that describe the resource. These tags can be used in
     viewing and grouping this resource (across resource groups). A maximum of 15 tags can be
     provided for a resource. Each tag must have a key no greater in length than 128 characters and
     a value no greater in length than 256 characters."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    properties: Optional["_models.StorageAccountPropertiesUpdateParameters"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The parameters used when updating a storage account."""
    kind: Optional[Union[str, "_models.Kind"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Indicates the type of storage account. Currently only StorageV2 value supported by
     server. Known values are: \"Storage\", \"StorageV2\", \"BlobStorage\", \"FileStorage\", and
     \"BlockBlobStorage\"."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Gets or sets the pinned logical availability zone for the storage account."""
    placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Gets or sets the zonal placement details for the storage account."""

    __flattened_items = [
        "custom_domain",
        "encryption",
        "sas_policy",
        "key_policy",
        "access_tier",
        "azure_files_identity_based_authentication",
        "enable_https_traffic_only",
        "is_sftp_enabled",
        "is_local_user_enabled",
        "enable_extended_groups",
        "network_rule_set",
        "large_file_shares_state",
        "routing_preference",
        "dual_stack_endpoint_preference",
        "allow_blob_public_access",
        "minimum_tls_version",
        "allow_shared_key_access",
        "allow_cross_tenant_replication",
        "default_to_o_auth_authentication",
        "public_network_access",
        "immutable_storage_with_versioning",
        "allowed_copy_scope",
        "dns_endpoint_type",
        "geo_priority_replication_status",
        "allow_shared_key_access_for_services",
        "data_collaboration_policy_properties",
    ]

    @overload
    def __init__(
        self,
        *,
        sku: Optional["_models.Sku"] = None,
        tags: Optional[dict[str, str]] = None,
        identity: Optional["_models.Identity"] = None,
        properties: Optional["_models.StorageAccountPropertiesUpdateParameters"] = None,
        kind: Optional[Union[str, "_models.Kind"]] = 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 StorageConnectorProperties(_Model):
    """The storage connector properties.

    :ivar unique_id: System-generated GUID identifier for the Storage Connector. Not a valid input
     parameter when creating.
    :vartype unique_id: str
    :ivar state: State - Active or Inactive. Whether or not the Storage Connector should start as
     active (default: Active) (While set to false on the Storage Connector, all data plane requests
     using this Storage Connector fail, and this Storage Connector is not billed if it would be
     otherwise. Known values are: "Active" and "Inactive".
    :vartype state: str or ~azure.mgmt.storage.models.StorageConnectorState
    :ivar creation_time: System-generated creation time of the Storage Connector in ISO 8601
     date-time format (YYYY-MM-DDTHH:mm:ssZ). Not a valid input parameter during creating.
    :vartype creation_time: str
    :ivar description: Arbitrary description of this Storage Connector. Max 250 characters.
    :vartype description: str
    :ivar test_connection: Test connection to backing data source before creating the storage
     connector.
    :vartype test_connection: bool
    :ivar data_source_type: The type of backing data source for this Storage Connector. Required.
     "Azure_DataShare"
    :vartype data_source_type: str or ~azure.mgmt.storage.models.StorageConnectorDataSourceType
    :ivar source: Information about how to communicate with and authenticate to the backing data
     store. Required.
    :vartype source: ~azure.mgmt.storage.models.StorageConnectorSource
    :ivar provisioning_state: Represents the provisioning state of the storage connector. Known
     values are: "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.storage.models.NativeDataSharingProvisioningState
    """

    unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read"])
    """System-generated GUID identifier for the Storage Connector. Not a valid input parameter when
     creating."""
    state: Optional[Union[str, "_models.StorageConnectorState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """State - Active or Inactive. Whether or not the Storage Connector should start as active
     (default: Active) (While set to false on the Storage Connector, all data plane requests using
     this Storage Connector fail, and this Storage Connector is not billed if it would be otherwise.
     Known values are: \"Active\" and \"Inactive\"."""
    creation_time: Optional[str] = rest_field(name="creationTime", visibility=["read"])
    """System-generated creation time of the Storage Connector in ISO 8601 date-time format
     (YYYY-MM-DDTHH:mm:ssZ). Not a valid input parameter during creating."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Arbitrary description of this Storage Connector. Max 250 characters."""
    test_connection: Optional[bool] = rest_field(name="testConnection", visibility=["create", "update"])
    """Test connection to backing data source before creating the storage connector."""
    data_source_type: Union[str, "_models.StorageConnectorDataSourceType"] = rest_field(
        name="dataSourceType", visibility=["read", "create"]
    )
    """The type of backing data source for this Storage Connector. Required. \"Azure_DataShare\""""
    source: "_models.StorageConnectorSource" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Information about how to communicate with and authenticate to the backing data store. Required."""
    provisioning_state: Optional[Union[str, "_models.NativeDataSharingProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Represents the provisioning state of the storage connector. Known values are: \"Accepted\",
     \"Creating\", \"Succeeded\", \"Deleting\", \"Canceled\", and \"Failed\"."""

    @overload
    def __init__(
        self,
        *,
        data_source_type: Union[str, "_models.StorageConnectorDataSourceType"],
        source: "_models.StorageConnectorSource",
        state: Optional[Union[str, "_models.StorageConnectorState"]] = None,
        description: Optional[str] = None,
        test_connection: 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 StorageConnectorPropertiesUpdate(_Model):
    """The storage connector properties.

    :ivar state: State - Active or Inactive. Whether or not the Storage Connector should start as
     active (default: Active) (While set to false on the Storage Connector, all data plane requests
     using this Storage Connector fail, and this Storage Connector is not billed if it would be
     otherwise. Known values are: "Active" and "Inactive".
    :vartype state: str or ~azure.mgmt.storage.models.StorageConnectorState
    :ivar description: Arbitrary description of this Storage Connector. Max 250 characters.
    :vartype description: str
    :ivar test_connection: Test connection to backing data source before creating the storage
     connector.
    :vartype test_connection: bool
    :ivar source: Information about how to communicate with and authenticate to the backing data
     store.
    :vartype source: ~azure.mgmt.storage.models.StorageConnectorSourceUpdate
    """

    state: Optional[Union[str, "_models.StorageConnectorState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """State - Active or Inactive. Whether or not the Storage Connector should start as active
     (default: Active) (While set to false on the Storage Connector, all data plane requests using
     this Storage Connector fail, and this Storage Connector is not billed if it would be otherwise.
     Known values are: \"Active\" and \"Inactive\"."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Arbitrary description of this Storage Connector. Max 250 characters."""
    test_connection: Optional[bool] = rest_field(name="testConnection", visibility=["create", "update"])
    """Test connection to backing data source before creating the storage connector."""
    source: Optional["_models.StorageConnectorSourceUpdate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Information about how to communicate with and authenticate to the backing data store."""

    @overload
    def __init__(
        self,
        *,
        state: Optional[Union[str, "_models.StorageConnectorState"]] = None,
        description: Optional[str] = None,
        test_connection: Optional[bool] = None,
        source: Optional["_models.StorageConnectorSourceUpdate"] = None,
    ) -> None: ...

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

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


class StorageDataCollaborationPolicyProperties(_Model):
    """Defines Data Collaboration Policy for a storage account.

    :ivar allow_storage_connectors: Indicates whether storage connectors are allowed to created or
     managed on the storage account.
    :vartype allow_storage_connectors: bool
    :ivar allow_storage_data_shares: Indicates whether data shares are allowed to be created or
     managed on the storage account.
    :vartype allow_storage_data_shares: bool
    :ivar allow_cross_tenant_data_sharing: Indicates whether cross-entra tenant data sharing is
     allowed on the storage account.
    :vartype allow_cross_tenant_data_sharing: bool
    """

    allow_storage_connectors: Optional[bool] = rest_field(
        name="allowStorageConnectors", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether storage connectors are allowed to created or managed on the storage account."""
    allow_storage_data_shares: Optional[bool] = rest_field(
        name="allowStorageDataShares", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether data shares are allowed to be created or managed on the storage account."""
    allow_cross_tenant_data_sharing: Optional[bool] = rest_field(
        name="allowCrossTenantDataSharing", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether cross-entra tenant data sharing is allowed on the storage account."""

    @overload
    def __init__(
        self,
        *,
        allow_storage_connectors: Optional[bool] = None,
        allow_storage_data_shares: Optional[bool] = None,
        allow_cross_tenant_data_sharing: 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 StorageDataShareAccessPolicy(_Model):
    """Policy that specify the permission allowed to a managed identity.

    :ivar principal_id: The AAD principal ID of the Managed Identity. Required.
    :vartype principal_id: str
    :ivar tenant_id: The AAD tenant ID of the Managed Identity. Required.
    :vartype tenant_id: str
    :ivar permission: Allowed permissions. Currently, only supported value is Read. Required. Known
     values are: "None" and "Read".
    :vartype permission: str or ~azure.mgmt.storage.models.StorageDataShareAccessPolicyPermission
    """

    principal_id: str = rest_field(name="principalId", visibility=["read", "create", "update", "delete", "query"])
    """The AAD principal ID of the Managed Identity. Required."""
    tenant_id: str = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """The AAD tenant ID of the Managed Identity. Required."""
    permission: Union[str, "_models.StorageDataShareAccessPolicyPermission"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Allowed permissions. Currently, only supported value is Read. Required. Known values are:
     \"None\" and \"Read\"."""

    @overload
    def __init__(
        self,
        *,
        principal_id: str,
        tenant_id: str,
        permission: Union[str, "_models.StorageDataShareAccessPolicyPermission"],
    ) -> None: ...

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

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


class StorageDataShareAsset(_Model):
    """Properties of a shared resource.

    :ivar asset_path: Source Path to be shared. It can be a folder or a blob. The asset path should
     contain container name followed by path within the container, e.g. /container1/logs/external.
     Required.
    :vartype asset_path: str
    :ivar display_name: Consumer visible name of the original path. Required.
    :vartype display_name: str
    """

    asset_path: str = rest_field(name="assetPath", visibility=["read", "create", "update", "delete", "query"])
    """Source Path to be shared. It can be a folder or a blob. The asset path should contain container
     name followed by path within the container, e.g. /container1/logs/external. Required."""
    display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"])
    """Consumer visible name of the original path. Required."""

    @overload
    def __init__(
        self,
        *,
        asset_path: str,
        display_name: 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 StorageDataShareProperties(_Model):
    """The storage datashare properties.

    :ivar data_share_identifier: System-generated GUID identifier for the Storage DataShare. Not a
     valid input parameter when creating.
    :vartype data_share_identifier: str
    :ivar description: Arbitrary description of this Data Share. Max 250 characters.
    :vartype description: str
    :ivar data_share_uri: The DataShare URI to be shared with the consumer. URI Format -
     'azds://<location>:<dataShareName>:<dataShareIdentifier>'.
    :vartype data_share_uri: str
    :ivar access_policies: List of access policies that specify the permission allowed to a managed
     identity. For Create - This property is required and cannot be null. If no access policies are
     provided at creation time, specify an empty array. For Update - This property is optional. If
     set to null or not passed, the existing access policies are left unchanged. If provided with a
     non-null value, the existing access policies are replaced with the specified list. Required.
    :vartype access_policies: list[~azure.mgmt.storage.models.StorageDataShareAccessPolicy]
    :ivar assets: List of assets that specify the properties of the shared resources. For Create -
     This property is required and cannot be null. If no assets are provided at creation time,
     specify an empty array. For Update - This property is optional. If set to null or not passed,
     the existing assets are left unchanged. If provided with a non-null value, the existing assets
     are replaced with the specified list. Required.
    :vartype assets: list[~azure.mgmt.storage.models.StorageDataShareAsset]
    :ivar provisioning_state: Represents the provisioning state of the storage datashare. Known
     values are: "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.storage.models.NativeDataSharingProvisioningState
    """

    data_share_identifier: Optional[str] = rest_field(name="dataShareIdentifier", visibility=["read"])
    """System-generated GUID identifier for the Storage DataShare. Not a valid input parameter when
     creating."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Arbitrary description of this Data Share. Max 250 characters."""
    data_share_uri: Optional[str] = rest_field(name="dataShareUri", visibility=["read"])
    """The DataShare URI to be shared with the consumer. URI Format -
     'azds://<location>:<dataShareName>:<dataShareIdentifier>'."""
    access_policies: list["_models.StorageDataShareAccessPolicy"] = rest_field(
        name="accessPolicies", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of access policies that specify the permission allowed to a managed identity. For Create -
     This property is required and cannot be null. If no access policies are provided at creation
     time, specify an empty array. For Update - This property is optional. If set to null or not
     passed, the existing access policies are left unchanged. If provided with a non-null value, the
     existing access policies are replaced with the specified list. Required."""
    assets: list["_models.StorageDataShareAsset"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of assets that specify the properties of the shared resources. For Create - This property
     is required and cannot be null. If no assets are provided at creation time, specify an empty
     array. For Update - This property is optional. If set to null or not passed, the existing
     assets are left unchanged. If provided with a non-null value, the existing assets are replaced
     with the specified list. Required."""
    provisioning_state: Optional[Union[str, "_models.NativeDataSharingProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Represents the provisioning state of the storage datashare. Known values are: \"Accepted\",
     \"Creating\", \"Succeeded\", \"Deleting\", \"Canceled\", and \"Failed\"."""

    @overload
    def __init__(
        self,
        *,
        access_policies: list["_models.StorageDataShareAccessPolicy"],
        assets: list["_models.StorageDataShareAsset"],
        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 StorageDataSharePropertiesUpdate(_Model):
    """The storage datashare properties.

    :ivar description: Arbitrary description of this Data Share. Max 250 characters.
    :vartype description: str
    :ivar access_policies: List of access policies that specify the permission allowed to a managed
     identity. For Create - This property is required and cannot be null. If no access policies are
     provided at creation time, specify an empty array. For Update - This property is optional. If
     set to null or not passed, the existing access policies are left unchanged. If provided with a
     non-null value, the existing access policies are replaced with the specified list.
    :vartype access_policies: list[~azure.mgmt.storage.models.StorageDataShareAccessPolicy]
    :ivar assets: List of assets that specify the properties of the shared resources. For Create -
     This property is required and cannot be null. If no assets are provided at creation time,
     specify an empty array. For Update - This property is optional. If set to null or not passed,
     the existing assets are left unchanged. If provided with a non-null value, the existing assets
     are replaced with the specified list.
    :vartype assets: list[~azure.mgmt.storage.models.StorageDataShareAsset]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Arbitrary description of this Data Share. Max 250 characters."""
    access_policies: Optional[list["_models.StorageDataShareAccessPolicy"]] = rest_field(
        name="accessPolicies", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of access policies that specify the permission allowed to a managed identity. For Create -
     This property is required and cannot be null. If no access policies are provided at creation
     time, specify an empty array. For Update - This property is optional. If set to null or not
     passed, the existing access policies are left unchanged. If provided with a non-null value, the
     existing access policies are replaced with the specified list."""
    assets: Optional[list["_models.StorageDataShareAsset"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of assets that specify the properties of the shared resources. For Create - This property
     is required and cannot be null. If no assets are provided at creation time, specify an empty
     array. For Update - This property is optional. If set to null or not passed, the existing
     assets are left unchanged. If provided with a non-null value, the existing assets are replaced
     with the specified list."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        access_policies: Optional[list["_models.StorageDataShareAccessPolicy"]] = None,
        assets: Optional[list["_models.StorageDataShareAsset"]] = None,
    ) -> None: ...

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

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


class StorageQueue(ProxyResource):
    """Concrete proxy 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.storage.models.SystemData
    :ivar queue_properties: Queue resource properties.
    :vartype queue_properties: ~azure.mgmt.storage.models.QueueProperties
    """

    queue_properties: Optional["_models.QueueProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Queue resource properties."""

    __flattened_items = ["metadata", "approximate_message_count"]

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

    @overload
    def __init__(self, mapping: Mapping[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.queue_properties is None:
                return None
            return getattr(self.queue_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.queue_properties is None:
                self.queue_properties = self._attr_to_rest_field["queue_properties"]._class_type()
            setattr(self.queue_properties, key, value)
        else:
            super().__setattr__(key, value)


class StorageTaskAssignment(ProxyResource):
    """The storage task assignment.

    :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.storage.models.SystemData
    :ivar properties: Properties of the storage task assignment.
    :vartype properties: ~azure.mgmt.storage.models.StorageTaskAssignmentProperties
    """

    properties: Optional["_models.StorageTaskAssignmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the storage task assignment."""

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

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

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


class StorageTaskAssignmentExecutionContext(_Model):
    """Execution context of the storage task assignment.

    :ivar target: Execution target of the storage task assignment.
    :vartype target: ~azure.mgmt.storage.models.ExecutionTarget
    :ivar trigger: Execution trigger of the storage task assignment. Required.
    :vartype trigger: ~azure.mgmt.storage.models.ExecutionTrigger
    """

    target: Optional["_models.ExecutionTarget"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Execution target of the storage task assignment."""
    trigger: "_models.ExecutionTrigger" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Execution trigger of the storage task assignment. Required."""

    @overload
    def __init__(
        self,
        *,
        trigger: "_models.ExecutionTrigger",
        target: Optional["_models.ExecutionTarget"] = None,
    ) -> None: ...

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

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


class StorageTaskAssignmentProperties(_Model):
    """Properties of the storage task assignment.

    :ivar task_id: Id of the corresponding storage task. Required.
    :vartype task_id: str
    :ivar enabled: Whether the storage task assignment is enabled or not. Required.
    :vartype enabled: bool
    :ivar description: Text that describes the purpose of the storage task assignment. Required.
    :vartype description: str
    :ivar execution_context: The storage task assignment execution context. Required.
    :vartype execution_context: ~azure.mgmt.storage.models.StorageTaskAssignmentExecutionContext
    :ivar report: The storage task assignment report. Required.
    :vartype report: ~azure.mgmt.storage.models.StorageTaskAssignmentReport
    :ivar provisioning_state: Represents the provisioning state of the storage task assignment.
     Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted",
     "Creating", "Succeeded", "Deleting", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.storage.models.StorageTaskAssignmentProvisioningState
    :ivar run_status: Run status of storage task assignment.
    :vartype run_status: ~azure.mgmt.storage.models.StorageTaskReportProperties
    """

    task_id: str = rest_field(name="taskId", visibility=["read", "create", "update", "delete", "query"])
    """Id of the corresponding storage task. Required."""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether the storage task assignment is enabled or not. Required."""
    description: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Text that describes the purpose of the storage task assignment. Required."""
    execution_context: "_models.StorageTaskAssignmentExecutionContext" = rest_field(
        name="executionContext", visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage task assignment execution context. Required."""
    report: "_models.StorageTaskAssignmentReport" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage task assignment report. Required."""
    provisioning_state: Optional[Union[str, "_models.StorageTaskAssignmentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Represents the provisioning state of the storage task assignment. Known values are:
     \"ValidateSubscriptionQuotaBegin\", \"ValidateSubscriptionQuotaEnd\", \"Accepted\",
     \"Creating\", \"Succeeded\", \"Deleting\", \"Canceled\", and \"Failed\"."""
    run_status: Optional["_models.StorageTaskReportProperties"] = rest_field(
        name="runStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Run status of storage task assignment."""

    @overload
    def __init__(
        self,
        *,
        task_id: str,
        enabled: bool,
        description: str,
        execution_context: "_models.StorageTaskAssignmentExecutionContext",
        report: "_models.StorageTaskAssignmentReport",
        run_status: Optional["_models.StorageTaskReportProperties"] = None,
    ) -> None: ...

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

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


class StorageTaskAssignmentReport(_Model):
    """The storage task assignment report.

    :ivar prefix: The container prefix for the location of storage task assignment report.
     Required.
    :vartype prefix: str
    """

    prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The container prefix for the location of storage task assignment report. Required."""

    @overload
    def __init__(
        self,
        *,
        prefix: 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 StorageTaskAssignmentUpdateExecutionContext(_Model):  # pylint: disable=name-too-long
    """Execution context of the storage task assignment update.

    :ivar target: Execution target of the storage task assignment.
    :vartype target: ~azure.mgmt.storage.models.ExecutionTarget
    :ivar trigger: Execution trigger of the storage task assignment.
    :vartype trigger: ~azure.mgmt.storage.models.ExecutionTriggerUpdate
    """

    target: Optional["_models.ExecutionTarget"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Execution target of the storage task assignment."""
    trigger: Optional["_models.ExecutionTriggerUpdate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Execution trigger of the storage task assignment."""

    @overload
    def __init__(
        self,
        *,
        target: Optional["_models.ExecutionTarget"] = None,
        trigger: Optional["_models.ExecutionTriggerUpdate"] = None,
    ) -> None: ...

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

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


class StorageTaskAssignmentUpdateParameters(_Model):
    """Parameters of the storage task assignment update request.

    :ivar properties: Properties of the storage task assignment.
    :vartype properties: ~azure.mgmt.storage.models.StorageTaskAssignmentUpdateProperties
    """

    properties: Optional["_models.StorageTaskAssignmentUpdateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the storage task assignment."""

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

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

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


class StorageTaskAssignmentUpdateProperties(_Model):
    """Properties of the storage task update assignment.

    :ivar task_id: Id of the corresponding storage task.
    :vartype task_id: str
    :ivar enabled: Whether the storage task assignment is enabled or not.
    :vartype enabled: bool
    :ivar description: Text that describes the purpose of the storage task assignment.
    :vartype description: str
    :ivar execution_context: The storage task assignment execution context.
    :vartype execution_context:
     ~azure.mgmt.storage.models.StorageTaskAssignmentUpdateExecutionContext
    :ivar report: The storage task assignment report.
    :vartype report: ~azure.mgmt.storage.models.StorageTaskAssignmentUpdateReport
    :ivar provisioning_state: Represents the provisioning state of the storage task assignment.
     Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted",
     "Creating", "Succeeded", "Deleting", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.storage.models.StorageTaskAssignmentProvisioningState
    :ivar run_status: Run status of storage task assignment.
    :vartype run_status: ~azure.mgmt.storage.models.StorageTaskReportProperties
    """

    task_id: Optional[str] = rest_field(name="taskId", visibility=["read"])
    """Id of the corresponding storage task."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether the storage task assignment is enabled or not."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Text that describes the purpose of the storage task assignment."""
    execution_context: Optional["_models.StorageTaskAssignmentUpdateExecutionContext"] = rest_field(
        name="executionContext", visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage task assignment execution context."""
    report: Optional["_models.StorageTaskAssignmentUpdateReport"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage task assignment report."""
    provisioning_state: Optional[Union[str, "_models.StorageTaskAssignmentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Represents the provisioning state of the storage task assignment. Known values are:
     \"ValidateSubscriptionQuotaBegin\", \"ValidateSubscriptionQuotaEnd\", \"Accepted\",
     \"Creating\", \"Succeeded\", \"Deleting\", \"Canceled\", and \"Failed\"."""
    run_status: Optional["_models.StorageTaskReportProperties"] = rest_field(
        name="runStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Run status of storage task assignment."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        description: Optional[str] = None,
        execution_context: Optional["_models.StorageTaskAssignmentUpdateExecutionContext"] = None,
        report: Optional["_models.StorageTaskAssignmentUpdateReport"] = None,
        run_status: Optional["_models.StorageTaskReportProperties"] = None,
    ) -> None: ...

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

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


class StorageTaskAssignmentUpdateReport(_Model):
    """The storage task assignment report.

    :ivar prefix: The prefix of the storage task assignment report.
    :vartype prefix: str
    """

    prefix: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The prefix of the storage task assignment report."""

    @overload
    def __init__(
        self,
        *,
        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 StorageTaskReportInstance(ProxyResource):
    """Storage Tasks run report instance.

    :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.storage.models.SystemData
    :ivar properties: Storage task execution report for a run instance.
    :vartype properties: ~azure.mgmt.storage.models.StorageTaskReportProperties
    """

    properties: Optional["_models.StorageTaskReportProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage task execution report for a run instance."""

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

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

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


class StorageTaskReportProperties(_Model):
    """Storage task execution report for a run instance.

    :ivar task_assignment_id: Represents the Storage Task Assignment Id associated with the storage
     task that provided an execution context.
    :vartype task_assignment_id: str
    :ivar storage_account_id: Represents the Storage Account Id where the storage task definition
     was applied and executed.
    :vartype storage_account_id: str
    :ivar start_time: Start time of the run instance. Filter options such as startTime gt
     '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for
     DateTime properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype start_time: str
    :ivar finish_time: End time of the run instance. Filter options such as startTime gt
     '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for
     DateTime properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype finish_time: str
    :ivar objects_targeted_count: Total number of objects that meet the condition as defined in the
     storage task assignment execution context. Filter options such as objectsTargetedCount gt 50
     and other comparison operators can be used as described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype objects_targeted_count: str
    :ivar objects_operated_on_count: Total number of objects that meet the storage tasks condition
     and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other
     comparison operators can be used as described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype objects_operated_on_count: str
    :ivar object_failed_count: Total number of objects where task operation failed when was
     attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be
     used as described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype object_failed_count: str
    :ivar objects_succeeded_count: Total number of objects where task operation succeeded when was
     attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators
     can be used as described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_.
    :vartype objects_succeeded_count: str
    :ivar run_status_error: Well known Azure Storage error code that represents the error
     encountered during execution of the run instance.
    :vartype run_status_error: str
    :ivar run_status_enum: Represents the status of the execution. Known values are: "InProgress"
     and "Finished".
    :vartype run_status_enum: str or ~azure.mgmt.storage.models.RunStatusEnum
    :ivar summary_report_path: Full path to the verbose report stored in the reporting container as
     specified in the assignment execution context for the storage account.
    :vartype summary_report_path: str
    :ivar task_id: Storage Task Arm Id.
    :vartype task_id: str
    :ivar task_version: Storage Task Version.
    :vartype task_version: str
    :ivar run_result: Represents the overall result of the execution for the run instance. Known
     values are: "Succeeded" and "Failed".
    :vartype run_result: str or ~azure.mgmt.storage.models.RunResult
    """

    task_assignment_id: Optional[str] = rest_field(name="taskAssignmentId", visibility=["read"])
    """Represents the Storage Task Assignment Id associated with the storage task that provided an
     execution context."""
    storage_account_id: Optional[str] = rest_field(name="storageAccountId", visibility=["read"])
    """Represents the Storage Account Id where the storage task definition was applied and executed."""
    start_time: Optional[str] = rest_field(name="startTime", visibility=["read"])
    """Start time of the run instance. Filter options such as startTime gt
     '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for
     DateTime properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    finish_time: Optional[str] = rest_field(name="finishTime", visibility=["read"])
    """End time of the run instance. Filter options such as startTime gt
     '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for
     DateTime properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    objects_targeted_count: Optional[str] = rest_field(name="objectsTargetedCount", visibility=["read"])
    """Total number of objects that meet the condition as defined in the storage task assignment
     execution context. Filter options such as objectsTargetedCount gt 50 and other comparison
     operators can be used as described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    objects_operated_on_count: Optional[str] = rest_field(name="objectsOperatedOnCount", visibility=["read"])
    """Total number of objects that meet the storage tasks condition and were operated upon. Filter
     options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as
     described for Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    object_failed_count: Optional[str] = rest_field(name="objectFailedCount", visibility=["read"])
    """Total number of objects where task operation failed when was attempted. Filter options such as
     objectFailedCount eq 0 and other comparison operators can be used as described for Numerical
     properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    objects_succeeded_count: Optional[str] = rest_field(name="objectsSucceededCount", visibility=["read"])
    """Total number of objects where task operation succeeded when was attempted.Filter options such
     as objectsSucceededCount gt 150 and other comparison operators can be used as described for
     Numerical properties in
     `https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators
     <https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators>`_."""
    run_status_error: Optional[str] = rest_field(name="runStatusError", visibility=["read"])
    """Well known Azure Storage error code that represents the error encountered during execution of
     the run instance."""
    run_status_enum: Optional[Union[str, "_models.RunStatusEnum"]] = rest_field(
        name="runStatusEnum", visibility=["read"]
    )
    """Represents the status of the execution. Known values are: \"InProgress\" and \"Finished\"."""
    summary_report_path: Optional[str] = rest_field(name="summaryReportPath", visibility=["read"])
    """Full path to the verbose report stored in the reporting container as specified in the
     assignment execution context for the storage account."""
    task_id: Optional[str] = rest_field(name="taskId", visibility=["read"])
    """Storage Task Arm Id."""
    task_version: Optional[str] = rest_field(name="taskVersion", visibility=["read"])
    """Storage Task Version."""
    run_result: Optional[Union[str, "_models.RunResult"]] = rest_field(name="runResult", visibility=["read"])
    """Represents the overall result of the execution for the run instance. Known values are:
     \"Succeeded\" and \"Failed\"."""


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.storage.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.storage.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 Table(ProxyResource):
    """Properties of the table, including Id, resource name, resource 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.storage.models.SystemData
    :ivar table_properties: Table resource properties.
    :vartype table_properties: ~azure.mgmt.storage.models.TableProperties
    """

    table_properties: Optional["_models.TableProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Table resource properties."""

    __flattened_items = ["table_name", "signed_identifiers"]

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

    @overload
    def __init__(self, mapping: Mapping[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.table_properties is None:
                return None
            return getattr(self.table_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.table_properties is None:
                self.table_properties = self._attr_to_rest_field["table_properties"]._class_type()
            setattr(self.table_properties, key, value)
        else:
            super().__setattr__(key, value)


class TableAccessPolicy(_Model):
    """Table Access Policy Properties Object.

    :ivar start_time: Start time of the access policy.
    :vartype start_time: ~datetime.datetime
    :ivar expiry_time: Expiry time of the access policy.
    :vartype expiry_time: ~datetime.datetime
    :ivar permission: Required. List of abbreviated permissions. Supported permission values
     include 'r','a','u','d'. Required.
    :vartype permission: str
    """

    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Start time of the access policy."""
    expiry_time: Optional[datetime.datetime] = rest_field(
        name="expiryTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Expiry time of the access policy."""
    permission: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d'.
     Required."""

    @overload
    def __init__(
        self,
        *,
        permission: str,
        start_time: Optional[datetime.datetime] = None,
        expiry_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 TableProperties(_Model):
    """TableProperties.

    :ivar table_name: Table name under the specified account.
    :vartype table_name: str
    :ivar signed_identifiers: List of stored access policies specified on the table.
    :vartype signed_identifiers: list[~azure.mgmt.storage.models.TableSignedIdentifier]
    """

    table_name: Optional[str] = rest_field(name="tableName", visibility=["read"])
    """Table name under the specified account."""
    signed_identifiers: Optional[list["_models.TableSignedIdentifier"]] = rest_field(
        name="signedIdentifiers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of stored access policies specified on the table."""

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

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

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


class TableServiceProperties(ProxyResource):
    """The properties of a storage account’s Table service.

    :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.storage.models.SystemData
    :ivar table_service_properties: The properties of a storage account’s Table service.
    :vartype table_service_properties: ~azure.mgmt.storage.models.TableServicePropertiesProperties
    """

    table_service_properties: Optional["_models.TableServicePropertiesProperties"] = rest_field(
        name="properties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of a storage account’s Table service."""

    __flattened_items = ["cors"]

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

    @overload
    def __init__(self, mapping: Mapping[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.table_service_properties is None:
                return None
            return getattr(self.table_service_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.table_service_properties is None:
                self.table_service_properties = self._attr_to_rest_field["table_service_properties"]._class_type()
            setattr(self.table_service_properties, key, value)
        else:
            super().__setattr__(key, value)


class TableServicePropertiesProperties(_Model):
    """The properties of a storage account’s Table service.

    :ivar cors: Specifies CORS rules for the Table service. You can include up to five CorsRule
     elements in the request. If no CorsRule elements are included in the request body, all CORS
     rules will be deleted, and CORS will be disabled for the Table service.
    :vartype cors: ~azure.mgmt.storage.models.CorsRules
    """

    cors: Optional["_models.CorsRules"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the
     request. If no CorsRule elements are included in the request body, all CORS rules will be
     deleted, and CORS will be disabled for the Table service."""

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

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

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


class TableSignedIdentifier(_Model):
    """Object to set Table Access Policy.

    :ivar id: unique-64-character-value of the stored access policy. Required.
    :vartype id: str
    :ivar access_policy: Access policy.
    :vartype access_policy: ~azure.mgmt.storage.models.TableAccessPolicy
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """unique-64-character-value of the stored access policy. Required."""
    access_policy: Optional["_models.TableAccessPolicy"] = rest_field(
        name="accessPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access policy."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        access_policy: Optional["_models.TableAccessPolicy"] = None,
    ) -> None: ...

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

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


class TagFilter(_Model):
    """Blob index tag based filtering for blob objects.

    :ivar name: This is the filter tag name, it can have 1 - 128 characters. Required.
    :vartype name: str
    :ivar op: This is the comparison operator which is used for object comparison and filtering.
     Only == (equality operator) is currently supported. Required.
    :vartype op: str
    :ivar value: This is the filter tag value field used for tag based filtering, it can have 0 -
     256 characters. Required.
    :vartype value: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is the filter tag name, it can have 1 - 128 characters. Required."""
    op: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is the comparison operator which is used for object comparison and filtering. Only ==
     (equality operator) is currently supported. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This is the filter tag value field used for tag based filtering, it can have 0 - 256
     characters. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        op: 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 TagProperty(_Model):
    """A tag of the LegalHold of a blob container.

    :ivar tag: The tag value.
    :vartype tag: str
    :ivar timestamp: Returns the date and time the tag was added.
    :vartype timestamp: ~datetime.datetime
    :ivar object_identifier: Returns the Object ID of the user who added the tag.
    :vartype object_identifier: str
    :ivar tenant_id: Returns the Tenant ID that issued the token for the user who added the tag.
    :vartype tenant_id: str
    :ivar upn: Returns the User Principal Name of the user who added the tag.
    :vartype upn: str
    """

    tag: Optional[str] = rest_field(visibility=["read"])
    """The tag value."""
    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Returns the date and time the tag was added."""
    object_identifier: Optional[str] = rest_field(name="objectIdentifier", visibility=["read"])
    """Returns the Object ID of the user who added the tag."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """Returns the Tenant ID that issued the token for the user who added the tag."""
    upn: Optional[str] = rest_field(visibility=["read"])
    """Returns the User Principal Name of the user who added the tag."""


class TestConnectionResponse(_Model):
    """Test connection response properties.

    :ivar storage_connector_method_name: Indicates the method used to validate the connection to
     the backing data store. Valid values are ``GetBlob`` and ``ListBlobs`` for failure, and
     ``TestExistingConnection`` for success. Required.
    :vartype storage_connector_method_name: str
    :ivar storage_connector_error_message: A string representing the error received from the
     backing data store. Format will vary depending on the data store type and will be capped at 1
     MB in size. The error message will be empty if the connection was successful.
    :vartype storage_connector_error_message: str
    :ivar storage_connector_request_id: The request Id associated with the request sent to the
     backing data store for validation. Required.
    :vartype storage_connector_request_id: str
    """

    storage_connector_method_name: str = rest_field(
        name="storageConnectorMethodName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the method used to validate the connection to the backing data store. Valid values
     are ``GetBlob`` and ``ListBlobs`` for failure, and ``TestExistingConnection`` for success.
     Required."""
    storage_connector_error_message: Optional[str] = rest_field(
        name="storageConnectorErrorMessage", visibility=["read", "create", "update", "delete", "query"]
    )
    """A string representing the error received from the backing data store. Format will vary
     depending on the data store type and will be capped at 1 MB in size. The error message will be
     empty if the connection was successful."""
    storage_connector_request_id: str = rest_field(
        name="storageConnectorRequestId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The request Id associated with the request sent to the backing data store for validation.
     Required."""

    @overload
    def __init__(
        self,
        *,
        storage_connector_method_name: str,
        storage_connector_request_id: str,
        storage_connector_error_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 TestExistingConnectionRequest(_Model):
    """Test existing connection request properties.

    :ivar unique_id: The uniqueId of the storage connector as returned by the server. Required.
    :vartype unique_id: str
    """

    unique_id: str = rest_field(name="uniqueId", visibility=["read", "create", "update", "delete", "query"])
    """The uniqueId of the storage connector as returned by the server. Required."""

    @overload
    def __init__(
        self,
        *,
        unique_id: 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 TriggerParameters(_Model):
    """The trigger parameters update for the storage task assignment execution.

    :ivar start_from: When to start task execution. This is a required field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype start_from: ~datetime.datetime
    :ivar interval: Run interval of task execution. This is a required field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype interval: int
    :ivar interval_unit: Run interval unit of task execution. This is a required field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'. "Days"
    :vartype interval_unit: str or ~azure.mgmt.storage.models.IntervalUnit
    :ivar end_by: When to end task execution. This is a required field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype end_by: ~datetime.datetime
    :ivar start_on: When to start task execution. This is a required field when
     ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when
     ExecutionTrigger.properties.type is 'OnSchedule'.
    :vartype start_on: ~datetime.datetime
    """

    start_from: Optional[datetime.datetime] = rest_field(
        name="startFrom", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to start task execution. This is a required field when ExecutionTrigger.properties.type is
     'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    interval: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Run interval of task execution. This is a required field when ExecutionTrigger.properties.type
     is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    interval_unit: Optional[Union[str, "_models.IntervalUnit"]] = rest_field(
        name="intervalUnit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Run interval unit of task execution. This is a required field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'. \"Days\""""
    end_by: Optional[datetime.datetime] = rest_field(
        name="endBy", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to end task execution. This is a required field when ExecutionTrigger.properties.type is
     'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    start_on: Optional[datetime.datetime] = rest_field(
        name="startOn", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to start task execution. This is a required field when ExecutionTrigger.properties.type is
     'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is
     'OnSchedule'."""

    @overload
    def __init__(
        self,
        *,
        start_from: Optional[datetime.datetime] = None,
        interval: Optional[int] = None,
        interval_unit: Optional[Union[str, "_models.IntervalUnit"]] = None,
        end_by: Optional[datetime.datetime] = None,
        start_on: 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 TriggerParametersUpdate(_Model):
    """The trigger parameters update for the storage task assignment execution.

    :ivar start_from: When to start task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype start_from: ~datetime.datetime
    :ivar interval: Run interval of task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype interval: int
    :ivar interval_unit: Run interval unit of task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'. "Days"
    :vartype interval_unit: str or ~azure.mgmt.storage.models.IntervalUnit
    :ivar end_by: When to end task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'.
    :vartype end_by: ~datetime.datetime
    :ivar start_on: When to start task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when
     ExecutionTrigger.properties.type is 'OnSchedule'.
    :vartype start_on: ~datetime.datetime
    """

    start_from: Optional[datetime.datetime] = rest_field(
        name="startFrom", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is
     'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    interval: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Run interval of task execution. This is a mutable field when ExecutionTrigger.properties.type
     is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    interval_unit: Optional[Union[str, "_models.IntervalUnit"]] = rest_field(
        name="intervalUnit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Run interval unit of task execution. This is a mutable field when
     ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when
     ExecutionTrigger.properties.type is 'RunOnce'. \"Days\""""
    end_by: Optional[datetime.datetime] = rest_field(
        name="endBy", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to end task execution. This is a mutable field when ExecutionTrigger.properties.type is
     'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is
     'RunOnce'."""
    start_on: Optional[datetime.datetime] = rest_field(
        name="startOn", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is
     'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is
     'OnSchedule'."""

    @overload
    def __init__(
        self,
        *,
        start_from: Optional[datetime.datetime] = None,
        interval: Optional[int] = None,
        interval_unit: Optional[Union[str, "_models.IntervalUnit"]] = None,
        end_by: Optional[datetime.datetime] = None,
        start_on: 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 UpdateHistoryProperty(_Model):
    """An update history of the ImmutabilityPolicy of a blob container.

    :ivar update_property: The ImmutabilityPolicy update type of a blob container, possible values
     include: put, lock and extend. Known values are: "put", "lock", and "extend".
    :vartype update_property: str or ~azure.mgmt.storage.models.ImmutabilityPolicyUpdateType
    :ivar immutability_period_since_creation_in_days: The immutability period for the blobs in the
     container since the policy creation, in days.
    :vartype immutability_period_since_creation_in_days: int
    :ivar timestamp: Returns the date and time the ImmutabilityPolicy was updated.
    :vartype timestamp: ~datetime.datetime
    :ivar object_identifier: Returns the Object ID of the user who updated the ImmutabilityPolicy.
    :vartype object_identifier: str
    :ivar tenant_id: Returns the Tenant ID that issued the token for the user who updated the
     ImmutabilityPolicy.
    :vartype tenant_id: str
    :ivar upn: Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
    :vartype upn: str
    :ivar allow_protected_append_writes: This property can only be changed for unlocked time-based
     retention policies. When enabled, new blocks can be written to an append blob while maintaining
     immutability protection and compliance. Only new blocks can be added and any existing blocks
     cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy
     API.
    :vartype allow_protected_append_writes: bool
    :ivar allow_protected_append_writes_all: This property can only be changed for unlocked
     time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock
     Blobs' while maintaining immutability protection and compliance. Only new blocks can be added
     and any existing blocks cannot be modified or deleted. This property cannot be changed with
     ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and
     'allowProtectedAppendWritesAll' properties are mutually exclusive.
    :vartype allow_protected_append_writes_all: bool
    """

    update_property: Optional[Union[str, "_models.ImmutabilityPolicyUpdateType"]] = rest_field(
        name="update", visibility=["read"], original_tsp_name="update"
    )
    """The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and
     extend. Known values are: \"put\", \"lock\", and \"extend\"."""
    immutability_period_since_creation_in_days: Optional[int] = rest_field(
        name="immutabilityPeriodSinceCreationInDays", visibility=["read"]
    )
    """The immutability period for the blobs in the container since the policy creation, in days."""
    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Returns the date and time the ImmutabilityPolicy was updated."""
    object_identifier: Optional[str] = rest_field(name="objectIdentifier", visibility=["read"])
    """Returns the Object ID of the user who updated the ImmutabilityPolicy."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy."""
    upn: Optional[str] = rest_field(visibility=["read"])
    """Returns the User Principal Name of the user who updated the ImmutabilityPolicy."""
    allow_protected_append_writes: Optional[bool] = rest_field(
        name="allowProtectedAppendWrites", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can only be changed for unlocked time-based retention policies. When enabled, new
     blocks can be written to an append blob while maintaining immutability protection and
     compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.
     This property cannot be changed with ExtendImmutabilityPolicy API."""
    allow_protected_append_writes_all: Optional[bool] = rest_field(
        name="allowProtectedAppendWritesAll", visibility=["read", "create", "update", "delete", "query"]
    )
    """This property can only be changed for unlocked time-based retention policies. When enabled, new
     blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection
     and compliance. Only new blocks can be added and any existing blocks cannot be modified or
     deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The
     'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually
     exclusive."""

    @overload
    def __init__(
        self,
        *,
        allow_protected_append_writes: Optional[bool] = None,
        allow_protected_append_writes_all: 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 Usage(_Model):
    """Describes Storage Resource Usage.

    :ivar unit: Gets the unit of measurement. Known values are: "Count", "Bytes", "Seconds",
     "Percent", "CountsPerSecond", and "BytesPerSecond".
    :vartype unit: str or ~azure.mgmt.storage.models.UsageUnit
    :ivar current_value: Gets the current count of the allocated resources in the subscription.
    :vartype current_value: int
    :ivar limit: Gets the maximum count of the resources that can be allocated in the subscription.
    :vartype limit: int
    :ivar name: Gets the name of the type of usage.
    :vartype name: ~azure.mgmt.storage.models.UsageName
    """

    unit: Optional[Union[str, "_models.UsageUnit"]] = rest_field(visibility=["read"])
    """Gets the unit of measurement. Known values are: \"Count\", \"Bytes\", \"Seconds\", \"Percent\",
     \"CountsPerSecond\", and \"BytesPerSecond\"."""
    current_value: Optional[int] = rest_field(name="currentValue", visibility=["read"])
    """Gets the current count of the allocated resources in the subscription."""
    limit: Optional[int] = rest_field(visibility=["read"])
    """Gets the maximum count of the resources that can be allocated in the subscription."""
    name: Optional["_models.UsageName"] = rest_field(visibility=["read"])
    """Gets the name of the type of usage."""


class UsageName(_Model):
    """The usage names that can be used; currently limited to StorageAccount.

    :ivar value: Gets a string describing the resource name.
    :vartype value: str
    :ivar localized_value: Gets a localized string describing the resource name.
    :vartype localized_value: str
    """

    value: Optional[str] = rest_field(visibility=["read"])
    """Gets a string describing the resource name."""
    localized_value: Optional[str] = rest_field(name="localizedValue", visibility=["read"])
    """Gets a localized string describing the resource name."""


class UserAssignedIdentity(_Model):
    """UserAssignedIdentity for the resource.

    :ivar principal_id: The principal ID of the identity.
    :vartype principal_id: str
    :ivar client_id: The client ID of the identity.
    :vartype client_id: str
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal ID of the identity."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read"])
    """The client ID of the identity."""


class VirtualNetworkRule(_Model):
    """Virtual Network rule.

    :ivar virtual_network_resource_id: Resource ID of a subnet, for example:
     /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
     Required.
    :vartype virtual_network_resource_id: str
    :ivar action: The action of virtual network rule. Default value is "Allow".
    :vartype action: str
    :ivar state: Gets the state of virtual network rule. Known values are: "Provisioning",
     "Deprovisioning", "Succeeded", "Failed", and "NetworkSourceDeleted".
    :vartype state: str or ~azure.mgmt.storage.models.State
    """

    virtual_network_resource_id: str = rest_field(name="id", visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of a subnet, for example:
     /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
     Required."""
    action: Optional[Literal["Allow"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The action of virtual network rule. Default value is \"Allow\"."""
    state: Optional[Union[str, "_models.State"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the state of virtual network rule. Known values are: \"Provisioning\", \"Deprovisioning\",
     \"Succeeded\", \"Failed\", and \"NetworkSourceDeleted\"."""

    @overload
    def __init__(
        self,
        *,
        virtual_network_resource_id: str,
        action: Optional[Literal["Allow"]] = None,
        state: Optional[Union[str, "_models.State"]] = None,
    ) -> None: ...

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

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