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

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

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

if TYPE_CHECKING:
    from .. import models as _models


class Alias(_Model):
    """The alias type.

    :ivar name: The alias name.
    :vartype name: str
    :ivar paths: The paths for an alias.
    :vartype paths: list[~azure.mgmt.resource.resources.models.AliasPath]
    :ivar type: The type of the alias. Known values are: "NotSpecified", "PlainText", and "Mask".
    :vartype type: str or ~azure.mgmt.resource.resources.models.AliasType
    :ivar default_path: The default path for an alias.
    :vartype default_path: str
    :ivar default_pattern: The default pattern for an alias.
    :vartype default_pattern: ~azure.mgmt.resource.resources.models.AliasPattern
    :ivar default_metadata: The default alias path metadata. Applies to the default path and to any
     alias path that doesn't have metadata.
    :vartype default_metadata: ~azure.mgmt.resource.resources.models.AliasPathMetadata
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alias name."""
    paths: Optional[list["_models.AliasPath"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The paths for an alias."""
    type: Optional[Union[str, "_models.AliasType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the alias. Known values are: \"NotSpecified\", \"PlainText\", and \"Mask\"."""
    default_path: Optional[str] = rest_field(
        name="defaultPath", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default path for an alias."""
    default_pattern: Optional["_models.AliasPattern"] = rest_field(
        name="defaultPattern", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default pattern for an alias."""
    default_metadata: Optional["_models.AliasPathMetadata"] = rest_field(name="defaultMetadata", visibility=["read"])
    """The default alias path metadata. Applies to the default path and to any alias path that doesn't
     have metadata."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        paths: Optional[list["_models.AliasPath"]] = None,
        type: Optional[Union[str, "_models.AliasType"]] = None,
        default_path: Optional[str] = None,
        default_pattern: Optional["_models.AliasPattern"] = None,
    ) -> None: ...

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

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


class AliasPath(_Model):
    """The type of the paths for alias.

    :ivar path: The path of an alias.
    :vartype path: str
    :ivar api_versions: The API versions.
    :vartype api_versions: list[str]
    :ivar pattern: The pattern for an alias path.
    :vartype pattern: ~azure.mgmt.resource.resources.models.AliasPattern
    :ivar metadata: The metadata of the alias path. If missing, fall back to the default metadata
     of the alias.
    :vartype metadata: ~azure.mgmt.resource.resources.models.AliasPathMetadata
    """

    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The path of an alias."""
    api_versions: Optional[list[str]] = rest_field(
        name="apiVersions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The API versions."""
    pattern: Optional["_models.AliasPattern"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The pattern for an alias path."""
    metadata: Optional["_models.AliasPathMetadata"] = rest_field(visibility=["read"])
    """The metadata of the alias path. If missing, fall back to the default metadata of the alias."""

    @overload
    def __init__(
        self,
        *,
        path: Optional[str] = None,
        api_versions: Optional[list[str]] = None,
        pattern: Optional["_models.AliasPattern"] = None,
    ) -> None: ...

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

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


class AliasPathMetadata(_Model):
    """AliasPathMetadata.

    :ivar type: The type of the token that the alias path is referring to. Known values are:
     "NotSpecified", "Any", "String", "Object", "Array", "Integer", "Number", and "Boolean".
    :vartype type: str or ~azure.mgmt.resource.resources.models.AliasPathTokenType
    :ivar attributes: The attributes of the token that the alias path is referring to. Known values
     are: "None" and "Modifiable".
    :vartype attributes: str or ~azure.mgmt.resource.resources.models.AliasPathAttributes
    """

    type: Optional[Union[str, "_models.AliasPathTokenType"]] = rest_field(visibility=["read"])
    """The type of the token that the alias path is referring to. Known values are: \"NotSpecified\",
     \"Any\", \"String\", \"Object\", \"Array\", \"Integer\", \"Number\", and \"Boolean\"."""
    attributes: Optional[Union[str, "_models.AliasPathAttributes"]] = rest_field(visibility=["read"])
    """The attributes of the token that the alias path is referring to. Known values are: \"None\" and
     \"Modifiable\"."""


class AliasPattern(_Model):
    """The type of the pattern for an alias path.

    :ivar phrase: The alias pattern phrase.
    :vartype phrase: str
    :ivar variable: The alias pattern variable.
    :vartype variable: str
    :ivar type: The type of alias pattern. Known values are: "NotSpecified" and "Extract".
    :vartype type: str or ~azure.mgmt.resource.resources.models.AliasPatternType
    """

    phrase: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alias pattern phrase."""
    variable: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alias pattern variable."""
    type: Optional[Union[str, "_models.AliasPatternType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of alias pattern. Known values are: \"NotSpecified\" and \"Extract\"."""

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

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

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


class ApiProfile(_Model):
    """ApiProfile.

    :ivar profile_version: The profile version.
    :vartype profile_version: str
    :ivar api_version: The API version.
    :vartype api_version: str
    """

    profile_version: Optional[str] = rest_field(name="profileVersion", visibility=["read"])
    """The profile version."""
    api_version: Optional[str] = rest_field(name="apiVersion", visibility=["read"])
    """The API version."""


class CloudError(_Model):
    """An error response for a resource management request.

    :ivar error: Common error response for all Azure Resource Manager APIs to return error details
     for failed operations. (This also follows the OData error response format.).
    :vartype error: ~azure.mgmt.resource.resources.models.ErrorResponse
    """

    error: Optional["_models.ErrorResponse"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Common error response for all Azure Resource Manager APIs to return error details for failed
     operations. (This also follows the OData error response format.)."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.resource.resources.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.resource.resources.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):
    """Common error response for all Azure Resource Manager APIs to return error details for failed
    operations. (This also follows the OData error response format.).

    :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.resource.resources.models.ErrorResponse]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.resource.resources.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.ErrorResponse"]] = rest_field(visibility=["read"])
    """The error details."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class ExportTemplateRequest(_Model):
    """Export resource group template request parameters.

    :ivar resources: The IDs of the resources to filter the export by. To export all resources,
     supply an array with single entry '*'.
    :vartype resources: list[str]
    :ivar options: The export template options. A CSV-formatted list containing zero or more of the
     following: 'IncludeParameterDefaultValue', 'IncludeComments',
     'SkipResourceNameParameterization', 'SkipAllParameterization'.
    :vartype options: str
    :ivar output_format: The output format for the exported resources. Known values are: "Json" and
     "Bicep".
    :vartype output_format: str or ~azure.mgmt.resource.resources.models.ExportTemplateOutputFormat
    """

    resources: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IDs of the resources to filter the export by. To export all resources, supply an array with
     single entry '*'."""
    options: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The export template options. A CSV-formatted list containing zero or more of the following:
     'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization',
     'SkipAllParameterization'."""
    output_format: Optional[Union[str, "_models.ExportTemplateOutputFormat"]] = rest_field(
        name="outputFormat", visibility=["read", "create", "update", "delete", "query"]
    )
    """The output format for the exported resources. Known values are: \"Json\" and \"Bicep\"."""

    @overload
    def __init__(
        self,
        *,
        resources: Optional[list[str]] = None,
        options: Optional[str] = None,
        output_format: Optional[Union[str, "_models.ExportTemplateOutputFormat"]] = None,
    ) -> None: ...

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

    :ivar type: The extended location type. "EdgeZone"
    :vartype type: str or ~azure.mgmt.resource.resources.models.ExtendedLocationType
    :ivar name: The extended location name.
    :vartype name: str
    """

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.resource.resources.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 ExtensionResource(Resource):
    """The base extension 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.resource.resources.models.SystemData
    """


class GenericResource(Resource):
    """Resource information.

    :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.resource.resources.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: any
    :ivar plan: The plan of the resource.
    :vartype plan: ~azure.mgmt.resource.resources.models.Plan
    :ivar kind: The kind of the resource.
    :vartype kind: str
    :ivar managed_by: ID of the resource that manages this resource.
    :vartype managed_by: str
    :ivar sku: The SKU of the resource.
    :vartype sku: ~azure.mgmt.resource.resources.models.Sku
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.resource.resources.models.Identity
    :ivar location: Resource location.
    :vartype location: str
    :ivar extended_location: Resource extended location.
    :vartype extended_location: ~azure.mgmt.resource.resources.models.ExtendedLocation
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource-specific properties for this resource."""
    plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan of the resource."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind of the resource."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update", "delete", "query"])
    """ID of the resource that manages this resource."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU of the resource."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource location."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create"]
    )
    """Resource extended location."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    @overload
    def __init__(
        self,
        *,
        properties: Optional[Any] = None,
        plan: Optional["_models.Plan"] = None,
        kind: Optional[str] = None,
        managed_by: Optional[str] = None,
        sku: Optional["_models.Sku"] = None,
        identity: Optional["_models.Identity"] = None,
        location: Optional[str] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        tags: Optional[dict[str, str]] = None,
    ) -> None: ...

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

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


class GenericResourceExpanded(GenericResource):
    """Resource information.

    :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.resource.resources.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: any
    :ivar plan: The plan of the resource.
    :vartype plan: ~azure.mgmt.resource.resources.models.Plan
    :ivar kind: The kind of the resource.
    :vartype kind: str
    :ivar managed_by: ID of the resource that manages this resource.
    :vartype managed_by: str
    :ivar sku: The SKU of the resource.
    :vartype sku: ~azure.mgmt.resource.resources.models.Sku
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.resource.resources.models.Identity
    :ivar location: Resource location.
    :vartype location: str
    :ivar extended_location: Resource extended location.
    :vartype extended_location: ~azure.mgmt.resource.resources.models.ExtendedLocation
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar created_time: The created time of the resource. This is only present if requested via the
     $expand query parameter.
    :vartype created_time: ~datetime.datetime
    :ivar changed_time: The changed time of the resource. This is only present if requested via the
     $expand query parameter.
    :vartype changed_time: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource. This is only present if
     requested via the $expand query parameter.
    :vartype provisioning_state: str
    """

    created_time: Optional[datetime.datetime] = rest_field(name="createdTime", visibility=["read"], format="rfc3339")
    """The created time of the resource. This is only present if requested via the $expand query
     parameter."""
    changed_time: Optional[datetime.datetime] = rest_field(name="changedTime", visibility=["read"], format="rfc3339")
    """The changed time of the resource. This is only present if requested via the $expand query
     parameter."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state of the resource. This is only present if requested via the $expand query
     parameter."""

    @overload
    def __init__(
        self,
        *,
        properties: Optional[Any] = None,
        plan: Optional["_models.Plan"] = None,
        kind: Optional[str] = None,
        managed_by: Optional[str] = None,
        sku: Optional["_models.Sku"] = None,
        identity: Optional["_models.Identity"] = None,
        location: Optional[str] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        tags: Optional[dict[str, str]] = None,
    ) -> None: ...

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

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


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. Known values are: "SystemAssigned", "UserAssigned",
     "SystemAssigned, UserAssigned", and "None".
    :vartype type: str or ~azure.mgmt.resource.resources.models.ResourceIdentityType
    :ivar user_assigned_identities: The list of user identities associated with the resource. The
     user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.resource.resources.models.IdentityUserAssignedIdentitiesValue]
    """

    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: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity type. Known values are: \"SystemAssigned\", \"UserAssigned\", \"SystemAssigned,
     UserAssigned\", and \"None\"."""
    user_assigned_identities: Optional[dict[str, "_models.IdentityUserAssignedIdentitiesValue"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user identities associated with the resource. The user identity dictionary key
     references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."""

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

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

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


class IdentityUserAssignedIdentitiesValue(_Model):
    """IdentityUserAssignedIdentitiesValue.

    :ivar principal_id: The principal id of user assigned identity.
    :vartype principal_id: str
    :ivar client_id: The client id of user assigned identity.
    :vartype client_id: str
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal id of user assigned identity."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read"])
    """The client id of user assigned identity."""


class Operation(_Model):
    """REST API Operation.

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

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

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

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

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


class OperationDisplay(_Model):
    """Localized display information for an operation.

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

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


class Permission(_Model):
    """Role definition permissions.

    :ivar actions: Allowed actions.
    :vartype actions: list[str]
    :ivar not_actions: Denied actions.
    :vartype not_actions: list[str]
    :ivar data_actions: Allowed Data actions.
    :vartype data_actions: list[str]
    :ivar not_data_actions: Denied Data actions.
    :vartype not_data_actions: list[str]
    """

    actions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Allowed actions."""
    not_actions: Optional[list[str]] = rest_field(
        name="notActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Denied actions."""
    data_actions: Optional[list[str]] = rest_field(
        name="dataActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allowed Data actions."""
    not_data_actions: Optional[list[str]] = rest_field(
        name="notDataActions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Denied Data actions."""

    @overload
    def __init__(
        self,
        *,
        actions: Optional[list[str]] = None,
        not_actions: Optional[list[str]] = None,
        data_actions: Optional[list[str]] = None,
        not_data_actions: Optional[list[str]] = None,
    ) -> None: ...

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

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


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

    :ivar name: The plan ID.
    :vartype name: str
    :ivar publisher: The publisher ID.
    :vartype publisher: str
    :ivar product: The offer ID.
    :vartype product: str
    :ivar promotion_code: The promotion code.
    :vartype promotion_code: str
    :ivar version: The plan's version.
    :vartype version: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan ID."""
    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The publisher ID."""
    product: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The offer ID."""
    promotion_code: Optional[str] = rest_field(
        name="promotionCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The promotion code."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The plan's version."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        publisher: Optional[str] = None,
        product: Optional[str] = None,
        promotion_code: Optional[str] = None,
        version: Optional[str] = None,
    ) -> None: ...

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

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


class Provider(_Model):
    """Resource provider information.

    :ivar id: The provider ID.
    :vartype id: str
    :ivar namespace: The namespace of the resource provider.
    :vartype namespace: str
    :ivar registration_state: The registration state of the resource provider.
    :vartype registration_state: str
    :ivar registration_policy: The registration policy of the resource provider.
    :vartype registration_policy: str
    :ivar resource_types: The collection of provider resource types.
    :vartype resource_types: list[~azure.mgmt.resource.resources.models.ProviderResourceType]
    :ivar provider_authorization_consent_state: The provider authorization consent state. Known
     values are: "NotSpecified", "Required", "NotRequired", and "Consented".
    :vartype provider_authorization_consent_state: str or
     ~azure.mgmt.resource.resources.models.ProviderAuthorizationConsentState
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The provider ID."""
    namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace of the resource provider."""
    registration_state: Optional[str] = rest_field(name="registrationState", visibility=["read"])
    """The registration state of the resource provider."""
    registration_policy: Optional[str] = rest_field(name="registrationPolicy", visibility=["read"])
    """The registration policy of the resource provider."""
    resource_types: Optional[list["_models.ProviderResourceType"]] = rest_field(
        name="resourceTypes", visibility=["read"]
    )
    """The collection of provider resource types."""
    provider_authorization_consent_state: Optional[Union[str, "_models.ProviderAuthorizationConsentState"]] = (
        rest_field(name="providerAuthorizationConsentState", visibility=["read", "create", "update", "delete", "query"])
    )
    """The provider authorization consent state. Known values are: \"NotSpecified\", \"Required\",
     \"NotRequired\", and \"Consented\"."""

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

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

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


class ProviderConsentDefinition(_Model):
    """The provider consent.

    :ivar consent_to_authorization: A value indicating whether authorization is consented or not.
    :vartype consent_to_authorization: bool
    """

    consent_to_authorization: Optional[bool] = rest_field(
        name="consentToAuthorization", visibility=["read", "create", "update", "delete", "query"]
    )
    """A value indicating whether authorization is consented or not."""

    @overload
    def __init__(
        self,
        *,
        consent_to_authorization: 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 ProviderExtendedLocation(_Model):
    """The provider extended location.

    :ivar location: The azure location.
    :vartype location: str
    :ivar type: The extended location type.
    :vartype type: str
    :ivar extended_locations: The extended locations for the azure location.
    :vartype extended_locations: list[str]
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The azure location."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The extended location type."""
    extended_locations: Optional[list[str]] = rest_field(
        name="extendedLocations", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extended locations for the azure location."""

    @overload
    def __init__(
        self,
        *,
        location: Optional[str] = None,
        type: Optional[str] = None,
        extended_locations: 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 ProviderPermission(_Model):
    """The provider permission.

    :ivar application_id: The application id.
    :vartype application_id: str
    :ivar role_definition: Role definition properties.
    :vartype role_definition: ~azure.mgmt.resource.resources.models.RoleDefinition
    :ivar managed_by_role_definition: Role definition properties.
    :vartype managed_by_role_definition: ~azure.mgmt.resource.resources.models.RoleDefinition
    :ivar provider_authorization_consent_state: The provider authorization consent state. Known
     values are: "NotSpecified", "Required", "NotRequired", and "Consented".
    :vartype provider_authorization_consent_state: str or
     ~azure.mgmt.resource.resources.models.ProviderAuthorizationConsentState
    """

    application_id: Optional[str] = rest_field(
        name="applicationId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The application id."""
    role_definition: Optional["_models.RoleDefinition"] = rest_field(
        name="roleDefinition", visibility=["read", "create", "update", "delete", "query"]
    )
    """Role definition properties."""
    managed_by_role_definition: Optional["_models.RoleDefinition"] = rest_field(
        name="managedByRoleDefinition", visibility=["read", "create", "update", "delete", "query"]
    )
    """Role definition properties."""
    provider_authorization_consent_state: Optional[Union[str, "_models.ProviderAuthorizationConsentState"]] = (
        rest_field(name="providerAuthorizationConsentState", visibility=["read", "create", "update", "delete", "query"])
    )
    """The provider authorization consent state. Known values are: \"NotSpecified\", \"Required\",
     \"NotRequired\", and \"Consented\"."""

    @overload
    def __init__(
        self,
        *,
        application_id: Optional[str] = None,
        role_definition: Optional["_models.RoleDefinition"] = None,
        managed_by_role_definition: Optional["_models.RoleDefinition"] = None,
        provider_authorization_consent_state: Optional[Union[str, "_models.ProviderAuthorizationConsentState"]] = None,
    ) -> None: ...

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

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


class ProviderPermissionListResult(_Model):
    """List of provider permissions.

    :ivar value: The ProviderPermission items on this page. Required.
    :vartype value: list[~azure.mgmt.resource.resources.models.ProviderPermission]
    :ivar next_link: The link to the next page of items.
    :vartype next_link: str
    """

    value: list["_models.ProviderPermission"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ProviderPermission items on this page. Required."""
    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The link to the next page of items."""

    @overload
    def __init__(
        self,
        *,
        value: list["_models.ProviderPermission"],
        next_link: Optional[str] = None,
    ) -> None: ...

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

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


class ProviderRegistrationRequest(_Model):
    """The provider registration definition.

    :ivar third_party_provider_consent: The provider consent.
    :vartype third_party_provider_consent:
     ~azure.mgmt.resource.resources.models.ProviderConsentDefinition
    """

    third_party_provider_consent: Optional["_models.ProviderConsentDefinition"] = rest_field(
        name="thirdPartyProviderConsent", visibility=["read", "create", "update", "delete", "query"]
    )
    """The provider consent."""

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

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

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


class ProviderResourceType(_Model):
    """Resource type managed by the resource provider.

    :ivar resource_type: The resource type.
    :vartype resource_type: str
    :ivar locations: The collection of locations where this resource type can be created.
    :vartype locations: list[str]
    :ivar location_mappings: The location mappings that are supported by this resource type.
    :vartype location_mappings:
     list[~azure.mgmt.resource.resources.models.ProviderExtendedLocation]
    :ivar aliases: The aliases that are supported by this resource type.
    :vartype aliases: list[~azure.mgmt.resource.resources.models.Alias]
    :ivar api_versions: The API version.
    :vartype api_versions: list[str]
    :ivar default_api_version: The default API version.
    :vartype default_api_version: str
    :ivar zone_mappings:
    :vartype zone_mappings: list[~azure.mgmt.resource.resources.models.ZoneMapping]
    :ivar api_profiles: The API profiles for the resource provider.
    :vartype api_profiles: list[~azure.mgmt.resource.resources.models.ApiProfile]
    :ivar capabilities: The additional capabilities offered by this resource type.
    :vartype capabilities: str
    :ivar properties: The properties.
    :vartype properties: dict[str, str]
    """

    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource type."""
    locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The collection of locations where this resource type can be created."""
    location_mappings: Optional[list["_models.ProviderExtendedLocation"]] = rest_field(
        name="locationMappings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The location mappings that are supported by this resource type."""
    aliases: Optional[list["_models.Alias"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The aliases that are supported by this resource type."""
    api_versions: Optional[list[str]] = rest_field(
        name="apiVersions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The API version."""
    default_api_version: Optional[str] = rest_field(name="defaultApiVersion", visibility=["read"])
    """The default API version."""
    zone_mappings: Optional[list["_models.ZoneMapping"]] = rest_field(
        name="zoneMappings", visibility=["read", "create", "update", "delete", "query"]
    )
    api_profiles: Optional[list["_models.ApiProfile"]] = rest_field(name="apiProfiles", visibility=["read"])
    """The API profiles for the resource provider."""
    capabilities: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The additional capabilities offered by this resource type."""
    properties: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The properties."""

    @overload
    def __init__(
        self,
        *,
        resource_type: Optional[str] = None,
        locations: Optional[list[str]] = None,
        location_mappings: Optional[list["_models.ProviderExtendedLocation"]] = None,
        aliases: Optional[list["_models.Alias"]] = None,
        api_versions: Optional[list[str]] = None,
        zone_mappings: Optional[list["_models.ZoneMapping"]] = None,
        capabilities: Optional[str] = None,
        properties: 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 ProviderResourceTypeListResult(_Model):
    """List of resource types of a resource provider.

    :ivar value: The ProviderResourceType items on this page. Required.
    :vartype value: list[~azure.mgmt.resource.resources.models.ProviderResourceType]
    :ivar next_link: The link to the next page of items.
    :vartype next_link: str
    """

    value: list["_models.ProviderResourceType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ProviderResourceType items on this page. Required."""
    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The link to the next page of items."""

    @overload
    def __init__(
        self,
        *,
        value: list["_models.ProviderResourceType"],
        next_link: Optional[str] = None,
    ) -> None: ...

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

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


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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.resource.resources.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 ResourceGroup(TrackedResource):
    """Resource group information.

    :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.resource.resources.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 resource group properties.
    :vartype properties: ~azure.mgmt.resource.resources.models.ResourceGroupProperties
    :ivar managed_by: The ID of the resource that manages this resource group.
    :vartype managed_by: str
    """

    properties: Optional["_models.ResourceGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource group properties."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update", "delete", "query"])
    """The ID of the resource that manages this resource group."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.ResourceGroupProperties"] = None,
        managed_by: 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 ResourceGroupExportResult(_Model):
    """Resource group export result.

    :ivar template: The template content. Used if outputFormat is empty or set to 'Json'.
    :vartype template: any
    :ivar output: The formatted export content. Used if outputFormat is set to 'Bicep'.
    :vartype output: str
    :ivar error: The template export error.
    :vartype error: ~azure.mgmt.resource.resources.models.ErrorDetail
    """

    template: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The template content. Used if outputFormat is empty or set to 'Json'."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The formatted export content. Used if outputFormat is set to 'Bicep'."""
    error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The template export error."""

    @overload
    def __init__(
        self,
        *,
        template: Optional[Any] = None,
        output: Optional[str] = None,
        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 ResourceGroupPatchable(_Model):
    """Resource group information.

    :ivar name: The name of the resource group.
    :vartype name: str
    :ivar properties: The resource group properties.
    :vartype properties: ~azure.mgmt.resource.resources.models.ResourceGroupProperties
    :ivar managed_by: The ID of the resource that manages this resource group.
    :vartype managed_by: str
    :ivar tags: The tags attached to the resource group.
    :vartype tags: dict[str, str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the resource group."""
    properties: Optional["_models.ResourceGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource group properties."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update", "delete", "query"])
    """The ID of the resource that manages this resource group."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tags attached to the resource group."""

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

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

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


class ResourceGroupProperties(_Model):
    """The resource group properties.

    :ivar provisioning_state: The provisioning state.
    :vartype provisioning_state: str
    """

    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The provisioning state."""


class ResourcesMoveInfo(_Model):
    """Parameters of move resources.

    :ivar resources: The IDs of the resources.
    :vartype resources: list[str]
    :ivar target_resource_group: The target resource group.
    :vartype target_resource_group: str
    """

    resources: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IDs of the resources."""
    target_resource_group: Optional[str] = rest_field(
        name="targetResourceGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target resource group."""

    @overload
    def __init__(
        self,
        *,
        resources: Optional[list[str]] = None,
        target_resource_group: 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 RoleDefinition(_Model):
    """Role definition properties.

    :ivar id: The role definition ID.
    :vartype id: str
    :ivar name: The role definition name.
    :vartype name: str
    :ivar is_service_role: If this is a service role.
    :vartype is_service_role: bool
    :ivar permissions: Role definition permissions.
    :vartype permissions: list[~azure.mgmt.resource.resources.models.Permission]
    :ivar scopes: Role definition assignable scopes.
    :vartype scopes: list[str]
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role definition ID."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role definition name."""
    is_service_role: Optional[bool] = rest_field(
        name="isServiceRole", visibility=["read", "create", "update", "delete", "query"]
    )
    """If this is a service role."""
    permissions: Optional[list["_models.Permission"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Role definition permissions."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Role definition assignable scopes."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        name: Optional[str] = None,
        is_service_role: Optional[bool] = None,
        permissions: Optional[list["_models.Permission"]] = None,
        scopes: 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 Sku(_Model):
    """SKU for the resource.

    :ivar name: The SKU name.
    :vartype name: str
    :ivar tier: The SKU tier.
    :vartype tier: str
    :ivar size: The SKU size.
    :vartype size: str
    :ivar family: The SKU family.
    :vartype family: str
    :ivar model: The SKU model.
    :vartype model: str
    :ivar capacity: The SKU capacity.
    :vartype capacity: int
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU name."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU tier."""
    size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU size."""
    family: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU family."""
    model: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU model."""
    capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU capacity."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        tier: Optional[str] = None,
        size: Optional[str] = None,
        family: Optional[str] = None,
        model: Optional[str] = None,
        capacity: Optional[int] = None,
    ) -> None: ...

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

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


class 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.resource.resources.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.resource.resources.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 TagCount(_Model):
    """Tag count.

    :ivar type: Type of count.
    :vartype type: str
    :ivar value: Value of count.
    :vartype value: int
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of count."""
    value: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Value of count."""

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

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

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


class TagDetails(_Model):
    """Tag details.

    :ivar id: The tag name ID.
    :vartype id: str
    :ivar tag_name: The tag name.
    :vartype tag_name: str
    :ivar count: The total number of resources that use the resource tag. When a tag is initially
     created and has no associated resources, the value is 0.
    :vartype count: ~azure.mgmt.resource.resources.models.TagCount
    :ivar values_property: The list of tag values.
    :vartype values_property: list[~azure.mgmt.resource.resources.models.TagValue]
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The tag name ID."""
    tag_name: Optional[str] = rest_field(name="tagName", visibility=["read", "create", "update", "delete", "query"])
    """The tag name."""
    count: Optional["_models.TagCount"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The total number of resources that use the resource tag. When a tag is initially created and
     has no associated resources, the value is 0."""
    values_property: Optional[list["_models.TagValue"]] = rest_field(
        name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values"
    )
    """The list of tag values."""

    @overload
    def __init__(
        self,
        *,
        tag_name: Optional[str] = None,
        count: Optional["_models.TagCount"] = None,
        values_property: Optional[list["_models.TagValue"]] = None,
    ) -> None: ...

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

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


class Tags(_Model):
    """A dictionary of name and value pairs.

    :ivar tags: Dictionary of <string>.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Dictionary of <string>."""

    @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 TagsPatchResource(_Model):
    """Wrapper resource for tags patch API request only.

    :ivar operation: The operation type for the patch API. Known values are: "Replace", "Merge",
     and "Delete".
    :vartype operation: str or ~azure.mgmt.resource.resources.models.TagsPatchOperation
    :ivar properties: The set of tags.
    :vartype properties: ~azure.mgmt.resource.resources.models.Tags
    """

    operation: Optional[Union[str, "_models.TagsPatchOperation"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The operation type for the patch API. Known values are: \"Replace\", \"Merge\", and \"Delete\"."""
    properties: Optional["_models.Tags"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The set of tags."""

    @overload
    def __init__(
        self,
        *,
        operation: Optional[Union[str, "_models.TagsPatchOperation"]] = None,
        properties: Optional["_models.Tags"] = None,
    ) -> None: ...

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

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


class TagsResource(ExtensionResource):
    """Wrapper resource for tags API requests and responses.

    :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.resource.resources.models.SystemData
    :ivar properties: The set of tags. Required.
    :vartype properties: ~azure.mgmt.resource.resources.models.Tags
    """

    properties: "_models.Tags" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The set of tags. Required."""

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

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

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


class TagValue(_Model):
    """Tag information.

    :ivar id: The tag value ID.
    :vartype id: str
    :ivar tag_value: The tag value.
    :vartype tag_value: str
    :ivar count: The tag value count.
    :vartype count: ~azure.mgmt.resource.resources.models.TagCount
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The tag value ID."""
    tag_value: Optional[str] = rest_field(name="tagValue", visibility=["read", "create", "update", "delete", "query"])
    """The tag value."""
    count: Optional["_models.TagCount"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tag value count."""

    @overload
    def __init__(
        self,
        *,
        tag_value: Optional[str] = None,
        count: Optional["_models.TagCount"] = None,
    ) -> None: ...

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

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


class ZoneMapping(_Model):
    """ZoneMapping.

    :ivar location: The location of the zone mapping.
    :vartype location: str
    :ivar zones:
    :vartype zones: list[str]
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location of the zone mapping."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])

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

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

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