# 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.deployments.models.AliasPath]
    :ivar type: The type of the alias. Known values are: "NotSpecified", "PlainText", and "Mask".
    :vartype type: str or ~azure.mgmt.resource.deployments.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.deployments.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.deployments.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.deployments.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.deployments.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.deployments.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.deployments.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.deployments.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 BasicDependency(_Model):
    """Deployment dependency information.

    :ivar id: The ID of the dependency.
    :vartype id: str
    :ivar resource_type: The dependency resource type.
    :vartype resource_type: str
    :ivar resource_name: The dependency resource name.
    :vartype resource_name: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the dependency."""
    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dependency resource type."""
    resource_name: Optional[str] = rest_field(
        name="resourceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dependency resource name."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        resource_type: Optional[str] = None,
        resource_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 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.deployments.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 DebugSetting(_Model):
    """The debug setting.

    :ivar detail_level: Specifies the type of information to log for debugging. The permitted
     values are none, requestContent, responseContent, or both requestContent and responseContent
     separated by a comma. The default is none. When setting this value, carefully consider the type
     of information you are passing in during deployment. By logging information about the request
     or response, you could potentially expose sensitive data that is retrieved through the
     deployment operations.
    :vartype detail_level: str
    """

    detail_level: Optional[str] = rest_field(
        name="detailLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of information to log for debugging. The permitted values are none,
     requestContent, responseContent, or both requestContent and responseContent separated by a
     comma. The default is none. When setting this value, carefully consider the type of information
     you are passing in during deployment. By logging information about the request or response, you
     could potentially expose sensitive data that is retrieved through the deployment operations."""

    @overload
    def __init__(
        self,
        *,
        detail_level: 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 Dependency(_Model):
    """Deployment dependency information.

    :ivar depends_on: The list of dependencies.
    :vartype depends_on: list[~azure.mgmt.resource.deployments.models.BasicDependency]
    :ivar id: The ID of the dependency.
    :vartype id: str
    :ivar resource_type: The dependency resource type.
    :vartype resource_type: str
    :ivar resource_name: The dependency resource name.
    :vartype resource_name: str
    """

    depends_on: Optional[list["_models.BasicDependency"]] = rest_field(
        name="dependsOn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of dependencies."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the dependency."""
    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dependency resource type."""
    resource_name: Optional[str] = rest_field(
        name="resourceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The dependency resource name."""

    @overload
    def __init__(
        self,
        *,
        depends_on: Optional[list["_models.BasicDependency"]] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        resource_type: Optional[str] = None,
        resource_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 Deployment(_Model):
    """Deployment operation parameters.

    :ivar location: The location to store the deployment data.
    :vartype location: str
    :ivar properties: The deployment properties. Required.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentProperties
    :ivar tags: Deployment tags.
    :vartype tags: dict[str, str]
    :ivar identity: The Managed Identity configuration for a deployment.
    :vartype identity: ~azure.mgmt.resource.deployments.models.DeploymentIdentity
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location to store the deployment data."""
    properties: "_models.DeploymentProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The deployment properties. Required."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment tags."""
    identity: Optional["_models.DeploymentIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Managed Identity configuration for a deployment."""

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

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

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


class DeploymentDiagnosticsDefinition(_Model):
    """DeploymentDiagnosticsDefinition.

    :ivar level: Denotes the additional response level. Required. Known values are: "Warning",
     "Info", and "Error".
    :vartype level: str or ~azure.mgmt.resource.deployments.models.Level
    :ivar code: The error code. Required.
    :vartype code: str
    :ivar message: The error message. Required.
    :vartype message: str
    :ivar target: The error target.
    :vartype target: str
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.resource.deployments.models.ErrorAdditionalInfo]
    """

    level: Union[str, "_models.Level"] = rest_field(visibility=["read"])
    """Denotes the additional response level. Required. Known values are: \"Warning\", \"Info\", and
     \"Error\"."""
    code: str = rest_field(visibility=["read"])
    """The error code. Required."""
    message: str = rest_field(visibility=["read"])
    """The error message. Required."""
    target: Optional[str] = rest_field(visibility=["read"])
    """The error target."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class DeploymentExportResult(_Model):
    """The deployment export result.

    :ivar template: The template content.
    :vartype template: any
    """

    template: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The template content."""

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

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


class DeploymentExtended(ExtensionResource):
    """Deployment 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.deployments.models.SystemData
    :ivar properties: Deployment properties.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentPropertiesExtended
    :ivar location: the location of the deployment.
    :vartype location: str
    :ivar tags: Deployment tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.DeploymentPropertiesExtended"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Deployment properties."""
    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the location of the deployment."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment tags."""

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

    :ivar type: The value type of the extension config property. Known values are: "String", "Int",
     "Bool", "Array", "Object", "SecureString", and "SecureObject".
    :vartype type: str or ~azure.mgmt.resource.deployments.models.ExtensionConfigPropertyType
    :ivar value: The value of the extension config property.
    :vartype value: any
    :ivar key_vault_reference: The Azure Key Vault reference used to retrieve the secret value of
     the extension config property.
    :vartype key_vault_reference:
     ~azure.mgmt.resource.deployments.models.KeyVaultParameterReference
    """

    type: Optional[Union[str, "_models.ExtensionConfigPropertyType"]] = rest_field(visibility=["read"])
    """The value type of the extension config property. Known values are: \"String\", \"Int\",
     \"Bool\", \"Array\", \"Object\", \"SecureString\", and \"SecureObject\"."""
    value: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the extension config property."""
    key_vault_reference: Optional["_models.KeyVaultParameterReference"] = rest_field(
        name="keyVaultReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Azure Key Vault reference used to retrieve the secret value of the extension config
     property."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[Any] = None,
        key_vault_reference: Optional["_models.KeyVaultParameterReference"] = None,
    ) -> None: ...

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

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


class DeploymentExtensionDefinition(_Model):
    """DeploymentExtensionDefinition.

    :ivar alias: The alias of the extension as defined in the deployment template.
    :vartype alias: str
    :ivar name: The extension name.
    :vartype name: str
    :ivar version: The extension version.
    :vartype version: str
    :ivar config_id: The extension configuration ID. It uniquely identifies a deployment control
     plane within an extension.
    :vartype config_id: str
    :ivar config: The extension configuration.
    :vartype config: dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExtensionConfigItem]
    """

    alias: Optional[str] = rest_field(visibility=["read"])
    """The alias of the extension as defined in the deployment template."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The extension name."""
    version: Optional[str] = rest_field(visibility=["read"])
    """The extension version."""
    config_id: Optional[str] = rest_field(name="configId", visibility=["read"])
    """The extension configuration ID. It uniquely identifies a deployment control plane within an
     extension."""
    config: Optional[dict[str, "_models.DeploymentExtensionConfigItem"]] = rest_field(visibility=["read"])
    """The extension configuration."""


class DeploymentExternalInput(_Model):
    """Deployment external input for parameterization.

    :ivar value: External input value. Required.
    :vartype value: any
    """

    value: Any = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """External input value. Required."""

    @overload
    def __init__(
        self,
        *,
        value: Any,
    ) -> None: ...

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

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


class DeploymentExternalInputDefinition(_Model):
    """Deployment external input definition for parameterization.

    :ivar kind: The kind of external input. Required.
    :vartype kind: str
    :ivar config: Configuration for the external input.
    :vartype config: any
    """

    kind: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind of external input. Required."""
    config: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Configuration for the external input."""

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

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

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


class DeploymentIdentity(_Model):
    """The Managed Identity configuration for a deployment.

    :ivar type: The identity type. Required. Known values are: "None" and "UserAssigned".
    :vartype type: str or ~azure.mgmt.resource.deployments.models.DeploymentIdentityType
    :ivar user_assigned_identities: The set of user assigned identities associated with the
     resource.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.resource.deployments.models.UserAssignedIdentity]
    """

    type: Union[str, "_models.DeploymentIdentityType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity type. Required. Known values are: \"None\" and \"UserAssigned\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The set of user assigned identities associated with the resource."""

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.DeploymentIdentityType"],
        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 DeploymentOperation(_Model):
    """Deployment operation information.

    :ivar id: Full deployment operation ID.
    :vartype id: str
    :ivar operation_id: Deployment operation ID.
    :vartype operation_id: str
    :ivar properties: Deployment properties.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentOperationProperties
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Full deployment operation ID."""
    operation_id: Optional[str] = rest_field(name="operationId", visibility=["read"])
    """Deployment operation ID."""
    properties: Optional["_models.DeploymentOperationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Deployment properties."""

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

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

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


class DeploymentOperationProperties(_Model):
    """Deployment operation properties.

    :ivar provisioning_operation: The name of the current provisioning operation. Known values are:
     "NotSpecified", "Create", "Delete", "Waiting", "AzureAsyncOperationWaiting",
     "ResourceCacheWaiting", "Action", "Read", "EvaluateDeploymentOutput", and "DeploymentCleanup".
    :vartype provisioning_operation: str or
     ~azure.mgmt.resource.deployments.models.ProvisioningOperation
    :ivar provisioning_state: The state of the provisioning.
    :vartype provisioning_state: str
    :ivar timestamp: The date and time of the operation.
    :vartype timestamp: ~datetime.datetime
    :ivar duration: The duration of the operation.
    :vartype duration: str
    :ivar service_request_id: Deployment operation service request id.
    :vartype service_request_id: str
    :ivar status_code: Operation status code from the resource provider. This property may not be
     set if a response has not yet been received.
    :vartype status_code: str
    :ivar status_message: Operation status message from the resource provider. This property is
     optional.  It will only be provided if an error was received from the resource provider.
    :vartype status_message: ~azure.mgmt.resource.deployments.models.StatusMessage
    :ivar target_resource: The target resource.
    :vartype target_resource: ~azure.mgmt.resource.deployments.models.TargetResource
    :ivar request: The HTTP request message.
    :vartype request: ~azure.mgmt.resource.deployments.models.HttpMessage
    :ivar response: The HTTP response message.
    :vartype response: ~azure.mgmt.resource.deployments.models.HttpMessage
    """

    provisioning_operation: Optional[Union[str, "_models.ProvisioningOperation"]] = rest_field(
        name="provisioningOperation", visibility=["read"]
    )
    """The name of the current provisioning operation. Known values are: \"NotSpecified\", \"Create\",
     \"Delete\", \"Waiting\", \"AzureAsyncOperationWaiting\", \"ResourceCacheWaiting\", \"Action\",
     \"Read\", \"EvaluateDeploymentOutput\", and \"DeploymentCleanup\"."""
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The state of the provisioning."""
    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """The date and time of the operation."""
    duration: Optional[str] = rest_field(visibility=["read"])
    """The duration of the operation."""
    service_request_id: Optional[str] = rest_field(name="serviceRequestId", visibility=["read"])
    """Deployment operation service request id."""
    status_code: Optional[str] = rest_field(name="statusCode", visibility=["read"])
    """Operation status code from the resource provider. This property may not be set if a response
     has not yet been received."""
    status_message: Optional["_models.StatusMessage"] = rest_field(name="statusMessage", visibility=["read"])
    """Operation status message from the resource provider. This property is optional.  It will only
     be provided if an error was received from the resource provider."""
    target_resource: Optional["_models.TargetResource"] = rest_field(name="targetResource", visibility=["read"])
    """The target resource."""
    request: Optional["_models.HttpMessage"] = rest_field(visibility=["read"])
    """The HTTP request message."""
    response: Optional["_models.HttpMessage"] = rest_field(visibility=["read"])
    """The HTTP response message."""


class DeploymentParameter(_Model):
    """Deployment parameter for the template.

    :ivar value: Input value to the parameter .
    :vartype value: any
    :ivar reference: Azure Key Vault parameter reference.
    :vartype reference: ~azure.mgmt.resource.deployments.models.KeyVaultParameterReference
    :ivar expression: Input expression to the parameter.
    :vartype expression: str
    """

    value: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Input value to the parameter ."""
    reference: Optional["_models.KeyVaultParameterReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Key Vault parameter reference."""
    expression: Optional[str] = rest_field(visibility=["create", "update"])
    """Input expression to the parameter."""

    @overload
    def __init__(
        self,
        *,
        value: Optional[Any] = None,
        reference: Optional["_models.KeyVaultParameterReference"] = None,
        expression: 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 DeploymentProperties(_Model):
    """Deployment properties.

    :ivar template: The template content. You use this element when you want to pass the template
     syntax directly in the request rather than link to an existing template. It can be a JObject or
     well-formed JSON string. Use either the templateLink property or the template property, but not
     both.
    :vartype template: any
    :ivar template_link: The URI of the template. Use either the templateLink property or the
     template property, but not both.
    :vartype template_link: ~azure.mgmt.resource.deployments.models.TemplateLink
    :ivar parameters: Name and value pairs that define the deployment parameters for the template.
     You use this element when you want to provide the parameter values directly in the request
     rather than link to an existing parameter file. Use either the parametersLink property or the
     parameters property, but not both. It can be a JObject or a well formed JSON string.
    :vartype parameters: dict[str, ~azure.mgmt.resource.deployments.models.DeploymentParameter]
    :ivar external_inputs: External input values, used by external tooling for parameter
     evaluation.
    :vartype external_inputs: dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExternalInput]
    :ivar external_input_definitions: External input definitions, used by external tooling to
     define expected external input values.
    :vartype external_input_definitions: dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExternalInputDefinition]
    :ivar parameters_link: The URI of parameters file. You use this element to link to an existing
     parameters file. Use either the parametersLink property or the parameters property, but not
     both.
    :vartype parameters_link: ~azure.mgmt.resource.deployments.models.ParametersLink
    :ivar extension_configs: The configurations to use for deployment extensions. The keys of this
     object are deployment extension aliases as defined in the deployment template.
    :vartype extension_configs: dict[str, dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExtensionConfigItem]]
    :ivar mode: The mode that is used to deploy resources. This value can be either Incremental or
     Complete. In Incremental mode, resources are deployed without deleting existing resources that
     are not included in the template. In Complete mode, resources are deployed and existing
     resources in the resource group that are not included in the template are deleted. Be careful
     when using Complete mode as you may unintentionally delete resources. Required. Known values
     are: "Incremental" and "Complete".
    :vartype mode: str or ~azure.mgmt.resource.deployments.models.DeploymentMode
    :ivar debug_setting: The debug setting of the deployment.
    :vartype debug_setting: ~azure.mgmt.resource.deployments.models.DebugSetting
    :ivar on_error_deployment: The deployment on error behavior.
    :vartype on_error_deployment: ~azure.mgmt.resource.deployments.models.OnErrorDeployment
    :ivar expression_evaluation_options: Specifies whether template expressions are evaluated
     within the scope of the parent template or nested template. Only applicable to nested
     templates. If not specified, default value is outer.
    :vartype expression_evaluation_options:
     ~azure.mgmt.resource.deployments.models.ExpressionEvaluationOptions
    :ivar validation_level: The validation level of the deployment. Known values are: "Template",
     "Provider", and "ProviderNoRbac".
    :vartype validation_level: str or ~azure.mgmt.resource.deployments.models.ValidationLevel
    """

    template: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The template content. You use this element when you want to pass the template syntax directly
     in the request rather than link to an existing template. It can be a JObject or well-formed
     JSON string. Use either the templateLink property or the template property, but not both."""
    template_link: Optional["_models.TemplateLink"] = rest_field(
        name="templateLink", visibility=["read", "create", "update", "delete", "query"]
    )
    """The URI of the template. Use either the templateLink property or the template property, but not
     both."""
    parameters: Optional[dict[str, "_models.DeploymentParameter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Name and value pairs that define the deployment parameters for the template. You use this
     element when you want to provide the parameter values directly in the request rather than link
     to an existing parameter file. Use either the parametersLink property or the parameters
     property, but not both. It can be a JObject or a well formed JSON string."""
    external_inputs: Optional[dict[str, "_models.DeploymentExternalInput"]] = rest_field(
        name="externalInputs", visibility=["create", "update"]
    )
    """External input values, used by external tooling for parameter evaluation."""
    external_input_definitions: Optional[dict[str, "_models.DeploymentExternalInputDefinition"]] = rest_field(
        name="externalInputDefinitions", visibility=["create", "update"]
    )
    """External input definitions, used by external tooling to define expected external input values."""
    parameters_link: Optional["_models.ParametersLink"] = rest_field(
        name="parametersLink", visibility=["read", "create", "update", "delete", "query"]
    )
    """The URI of parameters file. You use this element to link to an existing parameters file. Use
     either the parametersLink property or the parameters property, but not both."""
    extension_configs: Optional[dict[str, dict[str, "_models.DeploymentExtensionConfigItem"]]] = rest_field(
        name="extensionConfigs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configurations to use for deployment extensions. The keys of this object are deployment
     extension aliases as defined in the deployment template."""
    mode: Union[str, "_models.DeploymentMode"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The mode that is used to deploy resources. This value can be either Incremental or Complete. In
     Incremental mode, resources are deployed without deleting existing resources that are not
     included in the template. In Complete mode, resources are deployed and existing resources in
     the resource group that are not included in the template are deleted. Be careful when using
     Complete mode as you may unintentionally delete resources. Required. Known values are:
     \"Incremental\" and \"Complete\"."""
    debug_setting: Optional["_models.DebugSetting"] = rest_field(
        name="debugSetting", visibility=["read", "create", "update", "delete", "query"]
    )
    """The debug setting of the deployment."""
    on_error_deployment: Optional["_models.OnErrorDeployment"] = rest_field(
        name="onErrorDeployment", visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment on error behavior."""
    expression_evaluation_options: Optional["_models.ExpressionEvaluationOptions"] = rest_field(
        name="expressionEvaluationOptions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether template expressions are evaluated within the scope of the parent template or
     nested template. Only applicable to nested templates. If not specified, default value is outer."""
    validation_level: Optional[Union[str, "_models.ValidationLevel"]] = rest_field(
        name="validationLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """The validation level of the deployment. Known values are: \"Template\", \"Provider\", and
     \"ProviderNoRbac\"."""

    @overload
    def __init__(
        self,
        *,
        mode: Union[str, "_models.DeploymentMode"],
        template: Optional[Any] = None,
        template_link: Optional["_models.TemplateLink"] = None,
        parameters: Optional[dict[str, "_models.DeploymentParameter"]] = None,
        external_inputs: Optional[dict[str, "_models.DeploymentExternalInput"]] = None,
        external_input_definitions: Optional[dict[str, "_models.DeploymentExternalInputDefinition"]] = None,
        parameters_link: Optional["_models.ParametersLink"] = None,
        extension_configs: Optional[dict[str, dict[str, "_models.DeploymentExtensionConfigItem"]]] = None,
        debug_setting: Optional["_models.DebugSetting"] = None,
        on_error_deployment: Optional["_models.OnErrorDeployment"] = None,
        expression_evaluation_options: Optional["_models.ExpressionEvaluationOptions"] = None,
        validation_level: Optional[Union[str, "_models.ValidationLevel"]] = None,
    ) -> None: ...

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

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


class DeploymentPropertiesExtended(_Model):
    """Deployment properties with additional details.

    :ivar provisioning_state: Denotes the state of provisioning. Known values are: "NotSpecified",
     "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled",
     "Failed", "Succeeded", and "Updating".
    :vartype provisioning_state: str or ~azure.mgmt.resource.deployments.models.ProvisioningState
    :ivar correlation_id: The correlation ID of the deployment.
    :vartype correlation_id: str
    :ivar timestamp: The timestamp of the template deployment.
    :vartype timestamp: ~datetime.datetime
    :ivar duration: The duration of the template deployment.
    :vartype duration: str
    :ivar outputs: Key/value pairs that represent deployment output.
    :vartype outputs: any
    :ivar providers: The list of resource providers needed for the deployment.
    :vartype providers: list[~azure.mgmt.resource.deployments.models.Provider]
    :ivar dependencies: The list of deployment dependencies.
    :vartype dependencies: list[~azure.mgmt.resource.deployments.models.Dependency]
    :ivar template_link: The URI referencing the template.
    :vartype template_link: ~azure.mgmt.resource.deployments.models.TemplateLink
    :ivar parameters: Deployment parameters.
    :vartype parameters: any
    :ivar parameters_link: The URI referencing the parameters.
    :vartype parameters_link: ~azure.mgmt.resource.deployments.models.ParametersLink
    :ivar extensions: The extensions used in this deployment.
    :vartype extensions:
     list[~azure.mgmt.resource.deployments.models.DeploymentExtensionDefinition]
    :ivar mode: The deployment mode. Possible values are Incremental and Complete. Known values
     are: "Incremental" and "Complete".
    :vartype mode: str or ~azure.mgmt.resource.deployments.models.DeploymentMode
    :ivar debug_setting: The debug setting of the deployment.
    :vartype debug_setting: ~azure.mgmt.resource.deployments.models.DebugSetting
    :ivar on_error_deployment: The deployment on error behavior.
    :vartype on_error_deployment: ~azure.mgmt.resource.deployments.models.OnErrorDeploymentExtended
    :ivar template_hash: The hash produced for the template.
    :vartype template_hash: str
    :ivar output_resources: Array of provisioned resources.
    :vartype output_resources: list[~azure.mgmt.resource.deployments.models.ResourceReference]
    :ivar validated_resources: Array of validated resources.
    :vartype validated_resources: list[~azure.mgmt.resource.deployments.models.ResourceReference]
    :ivar error: The deployment error.
    :vartype error: ~azure.mgmt.resource.deployments.models.ErrorResponse
    :ivar diagnostics: Contains diagnostic information collected during validation process.
    :vartype diagnostics:
     list[~azure.mgmt.resource.deployments.models.DeploymentDiagnosticsDefinition]
    :ivar validation_level: The validation level of the deployment. Known values are: "Template",
     "Provider", and "ProviderNoRbac".
    :vartype validation_level: str or ~azure.mgmt.resource.deployments.models.ValidationLevel
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Denotes the state of provisioning. Known values are: \"NotSpecified\", \"Accepted\",
     \"Running\", \"Ready\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\",
     \"Failed\", \"Succeeded\", and \"Updating\"."""
    correlation_id: Optional[str] = rest_field(name="correlationId", visibility=["read"])
    """The correlation ID of the deployment."""
    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """The timestamp of the template deployment."""
    duration: Optional[str] = rest_field(visibility=["read"])
    """The duration of the template deployment."""
    outputs: Optional[Any] = rest_field(visibility=["read"])
    """Key/value pairs that represent deployment output."""
    providers: Optional[list["_models.Provider"]] = rest_field(visibility=["read"])
    """The list of resource providers needed for the deployment."""
    dependencies: Optional[list["_models.Dependency"]] = rest_field(visibility=["read"])
    """The list of deployment dependencies."""
    template_link: Optional["_models.TemplateLink"] = rest_field(name="templateLink", visibility=["read"])
    """The URI referencing the template."""
    parameters: Optional[Any] = rest_field(visibility=["read"])
    """Deployment parameters."""
    parameters_link: Optional["_models.ParametersLink"] = rest_field(name="parametersLink", visibility=["read"])
    """The URI referencing the parameters."""
    extensions: Optional[list["_models.DeploymentExtensionDefinition"]] = rest_field(visibility=["read"])
    """The extensions used in this deployment."""
    mode: Optional[Union[str, "_models.DeploymentMode"]] = rest_field(visibility=["read"])
    """The deployment mode. Possible values are Incremental and Complete. Known values are:
     \"Incremental\" and \"Complete\"."""
    debug_setting: Optional["_models.DebugSetting"] = rest_field(name="debugSetting", visibility=["read"])
    """The debug setting of the deployment."""
    on_error_deployment: Optional["_models.OnErrorDeploymentExtended"] = rest_field(
        name="onErrorDeployment", visibility=["read"]
    )
    """The deployment on error behavior."""
    template_hash: Optional[str] = rest_field(name="templateHash", visibility=["read"])
    """The hash produced for the template."""
    output_resources: Optional[list["_models.ResourceReference"]] = rest_field(
        name="outputResources", visibility=["read"]
    )
    """Array of provisioned resources."""
    validated_resources: Optional[list["_models.ResourceReference"]] = rest_field(
        name="validatedResources", visibility=["read"]
    )
    """Array of validated resources."""
    error: Optional["_models.ErrorResponse"] = rest_field(visibility=["read"])
    """The deployment error."""
    diagnostics: Optional[list["_models.DeploymentDiagnosticsDefinition"]] = rest_field(visibility=["read"])
    """Contains diagnostic information collected during validation process."""
    validation_level: Optional[Union[str, "_models.ValidationLevel"]] = rest_field(
        name="validationLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """The validation level of the deployment. Known values are: \"Template\", \"Provider\", and
     \"ProviderNoRbac\"."""

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

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

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


class DeploymentValidateResult(_Model):
    """Information from validate template deployment response.

    :ivar error: The deployment validation error.
    :vartype error: ~azure.mgmt.resource.deployments.models.ErrorResponse
    :ivar id: The ID of the deployment.
    :vartype id: str
    :ivar name: The name of the deployment.
    :vartype name: str
    :ivar type: The type of the deployment.
    :vartype type: str
    :ivar properties: The template deployment properties.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentPropertiesExtended
    """

    error: Optional["_models.ErrorResponse"] = rest_field(visibility=["read"])
    """The deployment validation error."""
    id: Optional[str] = rest_field(visibility=["read"])
    """The ID of the deployment."""
    name: Optional[str] = rest_field(visibility=["read"])
    """The name of the deployment."""
    type: Optional[str] = rest_field(visibility=["read"])
    """The type of the deployment."""
    properties: Optional["_models.DeploymentPropertiesExtended"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The template deployment properties."""

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

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

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


class DeploymentWhatIf(_Model):
    """Deployment What-if operation parameters.

    :ivar location: The location to store the deployment data.
    :vartype location: str
    :ivar properties: The deployment properties. Required.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentWhatIfProperties
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location to store the deployment data."""
    properties: "_models.DeploymentWhatIfProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment properties. Required."""

    @overload
    def __init__(
        self,
        *,
        properties: "_models.DeploymentWhatIfProperties",
        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 DeploymentWhatIfProperties(DeploymentProperties):
    """Deployment What-if properties.

    :ivar template: The template content. You use this element when you want to pass the template
     syntax directly in the request rather than link to an existing template. It can be a JObject or
     well-formed JSON string. Use either the templateLink property or the template property, but not
     both.
    :vartype template: any
    :ivar template_link: The URI of the template. Use either the templateLink property or the
     template property, but not both.
    :vartype template_link: ~azure.mgmt.resource.deployments.models.TemplateLink
    :ivar parameters: Name and value pairs that define the deployment parameters for the template.
     You use this element when you want to provide the parameter values directly in the request
     rather than link to an existing parameter file. Use either the parametersLink property or the
     parameters property, but not both. It can be a JObject or a well formed JSON string.
    :vartype parameters: dict[str, ~azure.mgmt.resource.deployments.models.DeploymentParameter]
    :ivar external_inputs: External input values, used by external tooling for parameter
     evaluation.
    :vartype external_inputs: dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExternalInput]
    :ivar external_input_definitions: External input definitions, used by external tooling to
     define expected external input values.
    :vartype external_input_definitions: dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExternalInputDefinition]
    :ivar parameters_link: The URI of parameters file. You use this element to link to an existing
     parameters file. Use either the parametersLink property or the parameters property, but not
     both.
    :vartype parameters_link: ~azure.mgmt.resource.deployments.models.ParametersLink
    :ivar extension_configs: The configurations to use for deployment extensions. The keys of this
     object are deployment extension aliases as defined in the deployment template.
    :vartype extension_configs: dict[str, dict[str,
     ~azure.mgmt.resource.deployments.models.DeploymentExtensionConfigItem]]
    :ivar mode: The mode that is used to deploy resources. This value can be either Incremental or
     Complete. In Incremental mode, resources are deployed without deleting existing resources that
     are not included in the template. In Complete mode, resources are deployed and existing
     resources in the resource group that are not included in the template are deleted. Be careful
     when using Complete mode as you may unintentionally delete resources. Required. Known values
     are: "Incremental" and "Complete".
    :vartype mode: str or ~azure.mgmt.resource.deployments.models.DeploymentMode
    :ivar debug_setting: The debug setting of the deployment.
    :vartype debug_setting: ~azure.mgmt.resource.deployments.models.DebugSetting
    :ivar on_error_deployment: The deployment on error behavior.
    :vartype on_error_deployment: ~azure.mgmt.resource.deployments.models.OnErrorDeployment
    :ivar expression_evaluation_options: Specifies whether template expressions are evaluated
     within the scope of the parent template or nested template. Only applicable to nested
     templates. If not specified, default value is outer.
    :vartype expression_evaluation_options:
     ~azure.mgmt.resource.deployments.models.ExpressionEvaluationOptions
    :ivar validation_level: The validation level of the deployment. Known values are: "Template",
     "Provider", and "ProviderNoRbac".
    :vartype validation_level: str or ~azure.mgmt.resource.deployments.models.ValidationLevel
    :ivar what_if_settings: Optional What-If operation settings.
    :vartype what_if_settings: ~azure.mgmt.resource.deployments.models.DeploymentWhatIfSettings
    """

    what_if_settings: Optional["_models.DeploymentWhatIfSettings"] = rest_field(
        name="whatIfSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional What-If operation settings."""

    @overload
    def __init__(
        self,
        *,
        mode: Union[str, "_models.DeploymentMode"],
        template: Optional[Any] = None,
        template_link: Optional["_models.TemplateLink"] = None,
        parameters: Optional[dict[str, "_models.DeploymentParameter"]] = None,
        external_inputs: Optional[dict[str, "_models.DeploymentExternalInput"]] = None,
        external_input_definitions: Optional[dict[str, "_models.DeploymentExternalInputDefinition"]] = None,
        parameters_link: Optional["_models.ParametersLink"] = None,
        extension_configs: Optional[dict[str, dict[str, "_models.DeploymentExtensionConfigItem"]]] = None,
        debug_setting: Optional["_models.DebugSetting"] = None,
        on_error_deployment: Optional["_models.OnErrorDeployment"] = None,
        expression_evaluation_options: Optional["_models.ExpressionEvaluationOptions"] = None,
        validation_level: Optional[Union[str, "_models.ValidationLevel"]] = None,
        what_if_settings: Optional["_models.DeploymentWhatIfSettings"] = None,
    ) -> None: ...

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

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


class DeploymentWhatIfSettings(_Model):
    """Deployment What-If operation settings.

    :ivar result_format: The format of the What-If results. Known values are: "ResourceIdOnly" and
     "FullResourcePayloads".
    :vartype result_format: str or ~azure.mgmt.resource.deployments.models.WhatIfResultFormat
    """

    result_format: Optional[Union[str, "_models.WhatIfResultFormat"]] = rest_field(
        name="resultFormat", visibility=["read", "create", "update", "delete", "query"]
    )
    """The format of the What-If results. Known values are: \"ResourceIdOnly\" and
     \"FullResourcePayloads\"."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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 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.deployments.models.ErrorResponse]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.resource.deployments.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 ExpressionEvaluationOptions(_Model):
    """Specifies whether template expressions are evaluated within the scope of the parent template or
    nested template.

    :ivar scope: The scope to be used for evaluation of parameters, variables and functions in a
     nested template. Known values are: "NotSpecified", "Outer", and "Inner".
    :vartype scope: str or
     ~azure.mgmt.resource.deployments.models.ExpressionEvaluationOptionsScopeType
    """

    scope: Optional[Union[str, "_models.ExpressionEvaluationOptionsScopeType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The scope to be used for evaluation of parameters, variables and functions in a nested
     template. Known values are: \"NotSpecified\", \"Outer\", and \"Inner\"."""

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

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

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


class HttpMessage(_Model):
    """HTTP message.

    :ivar content: HTTP message content.
    :vartype content: any
    """

    content: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """HTTP message content."""

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

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

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


class KeyVaultParameterReference(_Model):
    """Azure Key Vault parameter reference.

    :ivar key_vault: Azure Key Vault reference. Required.
    :vartype key_vault: ~azure.mgmt.resource.deployments.models.KeyVaultReference
    :ivar secret_name: Azure Key Vault secret name. Required.
    :vartype secret_name: str
    :ivar secret_version: Azure Key Vault secret version.
    :vartype secret_version: str
    """

    key_vault: "_models.KeyVaultReference" = rest_field(
        name="keyVault", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Key Vault reference. Required."""
    secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"])
    """Azure Key Vault secret name. Required."""
    secret_version: Optional[str] = rest_field(
        name="secretVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Key Vault secret version."""

    @overload
    def __init__(
        self,
        *,
        key_vault: "_models.KeyVaultReference",
        secret_name: str,
        secret_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 KeyVaultReference(_Model):
    """Azure Key Vault reference.

    :ivar id: Azure Key Vault resource id. Required.
    :vartype id: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Azure Key Vault resource id. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
    ) -> None: ...

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

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


class OnErrorDeployment(_Model):
    """Deployment on error behavior.

    :ivar type: The deployment on error behavior type. Possible values are LastSuccessful and
     SpecificDeployment. Known values are: "LastSuccessful" and "SpecificDeployment".
    :vartype type: str or ~azure.mgmt.resource.deployments.models.OnErrorDeploymentType
    :ivar deployment_name: The deployment to be used on error case.
    :vartype deployment_name: str
    """

    type: Optional[Union[str, "_models.OnErrorDeploymentType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment on error behavior type. Possible values are LastSuccessful and
     SpecificDeployment. Known values are: \"LastSuccessful\" and \"SpecificDeployment\"."""
    deployment_name: Optional[str] = rest_field(
        name="deploymentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment to be used on error case."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.OnErrorDeploymentType"]] = None,
        deployment_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 OnErrorDeploymentExtended(_Model):
    """Deployment on error behavior with additional details.

    :ivar provisioning_state: The state of the provisioning for the on error deployment.
    :vartype provisioning_state: str
    :ivar type: The deployment on error behavior type. Possible values are LastSuccessful and
     SpecificDeployment. Known values are: "LastSuccessful" and "SpecificDeployment".
    :vartype type: str or ~azure.mgmt.resource.deployments.models.OnErrorDeploymentType
    :ivar deployment_name: The deployment to be used on error case.
    :vartype deployment_name: str
    """

    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """The state of the provisioning for the on error deployment."""
    type: Optional[Union[str, "_models.OnErrorDeploymentType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment on error behavior type. Possible values are LastSuccessful and
     SpecificDeployment. Known values are: \"LastSuccessful\" and \"SpecificDeployment\"."""
    deployment_name: Optional[str] = rest_field(
        name="deploymentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment to be used on error case."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.OnErrorDeploymentType"]] = None,
        deployment_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 ParametersLink(_Model):
    """Entity representing the reference to the deployment parameters.

    :ivar uri: The URI of the parameters file. Required.
    :vartype uri: str
    :ivar content_version: If included, must match the ContentVersion in the template.
    :vartype content_version: str
    """

    uri: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URI of the parameters file. Required."""
    content_version: Optional[str] = rest_field(
        name="contentVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """If included, must match the ContentVersion in the template."""

    @overload
    def __init__(
        self,
        *,
        uri: str,
        content_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.deployments.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.deployments.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 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 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.deployments.models.ProviderExtendedLocation]
    :ivar aliases: The aliases that are supported by this resource type.
    :vartype aliases: list[~azure.mgmt.resource.deployments.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.deployments.models.ZoneMapping]
    :ivar api_profiles: The API profiles for the resource provider.
    :vartype api_profiles: list[~azure.mgmt.resource.deployments.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 ResourceReference(_Model):
    """The resource Id model.

    :ivar id: The fully qualified Azure resource ID.
    :vartype id: str
    :ivar extension: The extension the resource was deployed with.
    :vartype extension: ~azure.mgmt.resource.deployments.models.DeploymentExtensionDefinition
    :ivar resource_type: The resource type.
    :vartype resource_type: str
    :ivar identifiers: The extensible resource identifiers.
    :vartype identifiers: any
    :ivar api_version: The API version the resource was deployed with.
    :vartype api_version: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The fully qualified Azure resource ID."""
    extension: Optional["_models.DeploymentExtensionDefinition"] = rest_field(visibility=["read"])
    """The extension the resource was deployed with."""
    resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"])
    """The resource type."""
    identifiers: Optional[Any] = rest_field(visibility=["read"])
    """The extensible resource identifiers."""
    api_version: Optional[str] = rest_field(name="apiVersion", visibility=["read"])
    """The API version the resource was deployed with."""


class ScopedDeployment(_Model):
    """Deployment operation parameters.

    :ivar location: The location to store the deployment data. Required.
    :vartype location: str
    :ivar properties: The deployment properties. Required.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentProperties
    :ivar tags: Deployment tags.
    :vartype tags: dict[str, str]
    """

    location: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location to store the deployment data. Required."""
    properties: "_models.DeploymentProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The deployment properties. Required."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment tags."""

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.DeploymentProperties",
        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 ScopedDeploymentWhatIf(_Model):
    """Deployment What-if operation parameters.

    :ivar location: The location to store the deployment data. Required.
    :vartype location: str
    :ivar properties: The deployment properties. Required.
    :vartype properties: ~azure.mgmt.resource.deployments.models.DeploymentWhatIfProperties
    """

    location: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location to store the deployment data. Required."""
    properties: "_models.DeploymentWhatIfProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The deployment properties. Required."""

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

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

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


class StatusMessage(_Model):
    """Operation status message object.

    :ivar status: Status of the deployment operation.
    :vartype status: str
    :ivar error: The error reported by the operation.
    :vartype error: ~azure.mgmt.resource.deployments.models.ErrorResponse
    """

    status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Status of the deployment operation."""
    error: Optional["_models.ErrorResponse"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error reported by the operation."""

    @overload
    def __init__(
        self,
        *,
        status: Optional[str] = None,
        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 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.deployments.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.deployments.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 TargetResource(_Model):
    """Target resource.

    :ivar id: The Azure resource ID of the resource.
    :vartype id: str
    :ivar resource_name: The name of the resource.
    :vartype resource_name: str
    :ivar resource_type: The type of the resource.
    :vartype resource_type: str
    :ivar extension: The extension the resource was deployed with.
    :vartype extension: ~azure.mgmt.resource.deployments.models.DeploymentExtensionDefinition
    :ivar identifiers: The extensible resource identifiers.
    :vartype identifiers: any
    :ivar api_version: The API version the resource was deployed with.
    :vartype api_version: str
    :ivar symbolic_name: The symbolic name of the resource as defined in the deployment template.
    :vartype symbolic_name: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Azure resource ID of the resource."""
    resource_name: Optional[str] = rest_field(
        name="resourceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the resource."""
    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the resource."""
    extension: Optional["_models.DeploymentExtensionDefinition"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension the resource was deployed with."""
    identifiers: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The extensible resource identifiers."""
    api_version: Optional[str] = rest_field(
        name="apiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The API version the resource was deployed with."""
    symbolic_name: Optional[str] = rest_field(
        name="symbolicName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The symbolic name of the resource as defined in the deployment template."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        resource_name: Optional[str] = None,
        resource_type: Optional[str] = None,
        extension: Optional["_models.DeploymentExtensionDefinition"] = None,
        identifiers: Optional[Any] = None,
        api_version: Optional[str] = None,
        symbolic_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 TemplateHashResult(_Model):
    """Result of the request to calculate template hash. It contains a string of minified template and
    its hash.

    :ivar minified_template: The minified template string.
    :vartype minified_template: str
    :ivar template_hash: The template hash.
    :vartype template_hash: str
    """

    minified_template: Optional[str] = rest_field(
        name="minifiedTemplate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minified template string."""
    template_hash: Optional[str] = rest_field(
        name="templateHash", visibility=["read", "create", "update", "delete", "query"]
    )
    """The template hash."""

    @overload
    def __init__(
        self,
        *,
        minified_template: Optional[str] = None,
        template_hash: 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 TemplateLink(_Model):
    """Entity representing the reference to the template.

    :ivar uri: The URI of the template to deploy. Use either the uri or id property, but not both.
    :vartype uri: str
    :ivar id: The resource id of a Template Spec. Use either the id or uri property, but not both.
    :vartype id: str
    :ivar relative_path: The relativePath property can be used to deploy a linked template at a
     location relative to the parent. If the parent template was linked with a TemplateSpec, this
     will reference an artifact in the TemplateSpec.  If the parent was linked with a URI, the child
     deployment will be a combination of the parent and relativePath URIs.
    :vartype relative_path: str
    :ivar content_version: If included, must match the ContentVersion in the template.
    :vartype content_version: str
    :ivar query_string: The query string (for example, a SAS token) to be used with the
     templateLink URI.
    :vartype query_string: str
    """

    uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URI of the template to deploy. Use either the uri or id property, but not both."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource id of a Template Spec. Use either the id or uri property, but not both."""
    relative_path: Optional[str] = rest_field(
        name="relativePath", visibility=["read", "create", "update", "delete", "query"]
    )
    """The relativePath property can be used to deploy a linked template at a location relative to the
     parent. If the parent template was linked with a TemplateSpec, this will reference an artifact
     in the TemplateSpec.  If the parent was linked with a URI, the child deployment will be a
     combination of the parent and relativePath URIs."""
    content_version: Optional[str] = rest_field(
        name="contentVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """If included, must match the ContentVersion in the template."""
    query_string: Optional[str] = rest_field(
        name="queryString", visibility=["read", "create", "update", "delete", "query"]
    )
    """The query string (for example, a SAS token) to be used with the templateLink URI."""

    @overload
    def __init__(
        self,
        *,
        uri: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        relative_path: Optional[str] = None,
        content_version: Optional[str] = None,
        query_string: 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 UserAssignedIdentity(_Model):
    """User assigned identity properties.

    :ivar principal_id: The principal ID of the assigned identity.
    :vartype principal_id: str
    :ivar client_id: The client ID of the assigned identity.
    :vartype client_id: str
    """

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


class WhatIfChange(_Model):
    """Information about a single resource change predicted by What-If operation.

    :ivar resource_id: Resource ID.
    :vartype resource_id: str
    :ivar deployment_id: The resource id of the Deployment responsible for this change.
    :vartype deployment_id: str
    :ivar symbolic_name: The symbolic name of the resource responsible for this change.
    :vartype symbolic_name: str
    :ivar identifiers: A subset of properties that uniquely identify a Bicep extensible resource
     because it lacks a resource id like an Azure resource has.
    :vartype identifiers: any
    :ivar extension: The extension the resource was deployed with.
    :vartype extension: ~azure.mgmt.resource.deployments.models.DeploymentExtensionDefinition
    :ivar change_type: Type of change that will be made to the resource when the deployment is
     executed. Required. Known values are: "Create", "Delete", "Ignore", "Deploy", "NoChange",
     "Modify", and "Unsupported".
    :vartype change_type: str or ~azure.mgmt.resource.deployments.models.ChangeType
    :ivar unsupported_reason: The explanation about why the resource is unsupported by What-If.
    :vartype unsupported_reason: str
    :ivar before: The snapshot of the resource before the deployment is executed.
    :vartype before: any
    :ivar after: The predicted snapshot of the resource after the deployment is executed.
    :vartype after: any
    :ivar delta: The predicted changes to resource properties.
    :vartype delta: list[~azure.mgmt.resource.deployments.models.WhatIfPropertyChange]
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource ID."""
    deployment_id: Optional[str] = rest_field(
        name="deploymentId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource id of the Deployment responsible for this change."""
    symbolic_name: Optional[str] = rest_field(
        name="symbolicName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The symbolic name of the resource responsible for this change."""
    identifiers: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A subset of properties that uniquely identify a Bicep extensible resource because it lacks a
     resource id like an Azure resource has."""
    extension: Optional["_models.DeploymentExtensionDefinition"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension the resource was deployed with."""
    change_type: Union[str, "_models.ChangeType"] = rest_field(
        name="changeType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of change that will be made to the resource when the deployment is executed. Required.
     Known values are: \"Create\", \"Delete\", \"Ignore\", \"Deploy\", \"NoChange\", \"Modify\", and
     \"Unsupported\"."""
    unsupported_reason: Optional[str] = rest_field(
        name="unsupportedReason", visibility=["read", "create", "update", "delete", "query"]
    )
    """The explanation about why the resource is unsupported by What-If."""
    before: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The snapshot of the resource before the deployment is executed."""
    after: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The predicted snapshot of the resource after the deployment is executed."""
    delta: Optional[list["_models.WhatIfPropertyChange"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The predicted changes to resource properties."""

    @overload
    def __init__(
        self,
        *,
        change_type: Union[str, "_models.ChangeType"],
        resource_id: Optional[str] = None,
        deployment_id: Optional[str] = None,
        symbolic_name: Optional[str] = None,
        identifiers: Optional[Any] = None,
        extension: Optional["_models.DeploymentExtensionDefinition"] = None,
        unsupported_reason: Optional[str] = None,
        before: Optional[Any] = None,
        after: Optional[Any] = None,
        delta: Optional[list["_models.WhatIfPropertyChange"]] = None,
    ) -> None: ...

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

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


class WhatIfOperationProperties(_Model):
    """Deployment operation properties.

    :ivar changes: List of resource changes predicted by What-If operation.
    :vartype changes: list[~azure.mgmt.resource.deployments.models.WhatIfChange]
    :ivar potential_changes: List of resource changes predicted by What-If operation.
    :vartype potential_changes: list[~azure.mgmt.resource.deployments.models.WhatIfChange]
    :ivar diagnostics: List of resource diagnostics detected by What-If operation.
    :vartype diagnostics:
     list[~azure.mgmt.resource.deployments.models.DeploymentDiagnosticsDefinition]
    """

    changes: Optional[list["_models.WhatIfChange"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of resource changes predicted by What-If operation."""
    potential_changes: Optional[list["_models.WhatIfChange"]] = rest_field(
        name="potentialChanges", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of resource changes predicted by What-If operation."""
    diagnostics: Optional[list["_models.DeploymentDiagnosticsDefinition"]] = rest_field(visibility=["read"])
    """List of resource diagnostics detected by What-If operation."""

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

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

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


class WhatIfOperationResult(_Model):
    """Result of the What-If operation. Contains a list of predicted changes and a URL link to get to
    the next set of results.

    :ivar status: Status of the What-If operation.
    :vartype status: str
    :ivar properties: What-If operation properties.
    :vartype properties: ~azure.mgmt.resource.deployments.models.WhatIfOperationProperties
    :ivar error: Error when What-If operation fails.
    :vartype error: ~azure.mgmt.resource.deployments.models.ErrorResponse
    """

    status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Status of the What-If operation."""
    properties: Optional["_models.WhatIfOperationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """What-If operation properties."""
    error: Optional["_models.ErrorResponse"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Error when What-If operation fails."""

    __flattened_items = ["changes", "potential_changes", "diagnostics"]

    @overload
    def __init__(
        self,
        *,
        status: Optional[str] = None,
        properties: Optional["_models.WhatIfOperationProperties"] = None,
        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:
        _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 WhatIfPropertyChange(_Model):
    """The predicted change to the resource property.

    :ivar path: The path of the property. Required.
    :vartype path: str
    :ivar property_change_type: The type of property change. Required. Known values are: "Create",
     "Delete", "Modify", "Array", and "NoEffect".
    :vartype property_change_type: str or
     ~azure.mgmt.resource.deployments.models.PropertyChangeType
    :ivar before: The value of the property before the deployment is executed.
    :vartype before: any
    :ivar after: The value of the property after the deployment is executed.
    :vartype after: any
    :ivar children: Nested property changes.
    :vartype children: list[~azure.mgmt.resource.deployments.models.WhatIfPropertyChange]
    """

    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The path of the property. Required."""
    property_change_type: Union[str, "_models.PropertyChangeType"] = rest_field(
        name="propertyChangeType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of property change. Required. Known values are: \"Create\", \"Delete\", \"Modify\",
     \"Array\", and \"NoEffect\"."""
    before: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the property before the deployment is executed."""
    after: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the property after the deployment is executed."""
    children: Optional[list["_models.WhatIfPropertyChange"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Nested property changes."""

    @overload
    def __init__(
        self,
        *,
        path: str,
        property_change_type: Union[str, "_models.PropertyChangeType"],
        before: Optional[Any] = None,
        after: Optional[Any] = None,
        children: Optional[list["_models.WhatIfPropertyChange"]] = None,
    ) -> None: ...

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