# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

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

if TYPE_CHECKING:
    from .models import (
        DeploymentIdentityType,
        DeploymentMode,
        ExpressionEvaluationOptionsScopeType,
        ExtensionConfigPropertyType,
        OnErrorDeploymentType,
        ValidationLevel,
        WhatIfResultFormat,
    )


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

    detailLevel: str
    """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."""


class Deployment(TypedDict, total=False):
    """Deployment operation parameters.

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

    location: str
    """The location to store the deployment data."""
    properties: Required["DeploymentProperties"]
    """The deployment properties. Required."""
    tags: dict[str, str]
    """Deployment tags."""
    identity: "DeploymentIdentity"
    """The Managed Identity configuration for a deployment."""


class DeploymentExtensionConfigItem(TypedDict, total=False):
    """DeploymentExtensionConfigItem.

    :ivar type: The value type of the extension config property. Known values are: "String", "Int",
     "Bool", "Array", "Object", "SecureString", and "SecureObject".
    :vartype type: Union[str, "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: "KeyVaultParameterReference"
    """

    type: Union[str, "ExtensionConfigPropertyType"]
    """The value type of the extension config property. Known values are: \"String\", \"Int\",
     \"Bool\", \"Array\", \"Object\", \"SecureString\", and \"SecureObject\"."""
    value: Any
    """The value of the extension config property."""
    keyVaultReference: "KeyVaultParameterReference"
    """The Azure Key Vault reference used to retrieve the secret value of the extension config
     property."""


class DeploymentExternalInput(TypedDict, total=False):
    """Deployment external input for parameterization.

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

    value: Required[Any]
    """External input value. Required."""


class DeploymentExternalInputDefinition(TypedDict, total=False):
    """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: Required[str]
    """The kind of external input. Required."""
    config: Any
    """Configuration for the external input."""


class DeploymentIdentity(TypedDict, total=False):
    """The Managed Identity configuration for a deployment.

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

    type: Required[Union[str, "DeploymentIdentityType"]]
    """The identity type. Required. Known values are: \"None\" and \"UserAssigned\"."""
    userAssignedIdentities: dict[str, "UserAssignedIdentity"]
    """The set of user assigned identities associated with the resource."""


class DeploymentParameter(TypedDict, total=False):
    """Deployment parameter for the template.

    :ivar value: Input value to the parameter .
    :vartype value: Any
    :ivar reference: Azure Key Vault parameter reference.
    :vartype reference: "KeyVaultParameterReference"
    :ivar expression: Input expression to the parameter.
    :vartype expression: str
    """

    value: Any
    """Input value to the parameter ."""
    reference: "KeyVaultParameterReference"
    """Azure Key Vault parameter reference."""
    expression: str
    """Input expression to the parameter."""


class DeploymentProperties(TypedDict, total=False):
    """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: "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, "DeploymentParameter"]
    :ivar external_inputs: External input values, used by external tooling for parameter
     evaluation.
    :vartype external_inputs: dict[str, "DeploymentExternalInput"]
    :ivar external_input_definitions: External input definitions, used by external tooling to
     define expected external input values.
    :vartype external_input_definitions: dict[str, "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: "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, "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: Union[str, "DeploymentMode"]
    :ivar debug_setting: The debug setting of the deployment.
    :vartype debug_setting: "DebugSetting"
    :ivar on_error_deployment: The deployment on error behavior.
    :vartype on_error_deployment: "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: "ExpressionEvaluationOptions"
    :ivar validation_level: The validation level of the deployment. Known values are: "Template",
     "Provider", and "ProviderNoRbac".
    :vartype validation_level: Union[str, "ValidationLevel"]
    """

    template: Any
    """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."""
    templateLink: "TemplateLink"
    """The URI of the template. Use either the templateLink property or the template property, but not
     both."""
    parameters: dict[str, "DeploymentParameter"]
    """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."""
    externalInputs: dict[str, "DeploymentExternalInput"]
    """External input values, used by external tooling for parameter evaluation."""
    externalInputDefinitions: dict[str, "DeploymentExternalInputDefinition"]
    """External input definitions, used by external tooling to define expected external input values."""
    parametersLink: "ParametersLink"
    """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."""
    extensionConfigs: dict[str, dict[str, "DeploymentExtensionConfigItem"]]
    """The configurations to use for deployment extensions. The keys of this object are deployment
     extension aliases as defined in the deployment template."""
    mode: Required[Union[str, "DeploymentMode"]]
    """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\"."""
    debugSetting: "DebugSetting"
    """The debug setting of the deployment."""
    onErrorDeployment: "OnErrorDeployment"
    """The deployment on error behavior."""
    expressionEvaluationOptions: "ExpressionEvaluationOptions"
    """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."""
    validationLevel: Union[str, "ValidationLevel"]
    """The validation level of the deployment. Known values are: \"Template\", \"Provider\", and
     \"ProviderNoRbac\"."""


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

    location: str
    """The location to store the deployment data."""
    properties: Required["DeploymentWhatIfProperties"]
    """The deployment properties. Required."""


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: "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, "DeploymentParameter"]
    :ivar external_inputs: External input values, used by external tooling for parameter
     evaluation.
    :vartype external_inputs: dict[str, "DeploymentExternalInput"]
    :ivar external_input_definitions: External input definitions, used by external tooling to
     define expected external input values.
    :vartype external_input_definitions: dict[str, "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: "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, "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: Union[str, "DeploymentMode"]
    :ivar debug_setting: The debug setting of the deployment.
    :vartype debug_setting: "DebugSetting"
    :ivar on_error_deployment: The deployment on error behavior.
    :vartype on_error_deployment: "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: "ExpressionEvaluationOptions"
    :ivar validation_level: The validation level of the deployment. Known values are: "Template",
     "Provider", and "ProviderNoRbac".
    :vartype validation_level: Union[str, "ValidationLevel"]
    :ivar what_if_settings: Optional What-If operation settings.
    :vartype what_if_settings: "DeploymentWhatIfSettings"
    """

    whatIfSettings: "DeploymentWhatIfSettings"
    """Optional What-If operation settings."""


class DeploymentWhatIfSettings(TypedDict, total=False):
    """Deployment What-If operation settings.

    :ivar result_format: The format of the What-If results. Known values are: "ResourceIdOnly" and
     "FullResourcePayloads".
    :vartype result_format: Union[str, "WhatIfResultFormat"]
    """

    resultFormat: Union[str, "WhatIfResultFormat"]
    """The format of the What-If results. Known values are: \"ResourceIdOnly\" and
     \"FullResourcePayloads\"."""


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

    scope: Union[str, "ExpressionEvaluationOptionsScopeType"]
    """The scope to be used for evaluation of parameters, variables and functions in a nested
     template. Known values are: \"NotSpecified\", \"Outer\", and \"Inner\"."""


class KeyVaultParameterReference(TypedDict, total=False):
    """Azure Key Vault parameter reference.

    :ivar key_vault: Azure Key Vault reference. Required.
    :vartype key_vault: "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
    """

    keyVault: Required["KeyVaultReference"]
    """Azure Key Vault reference. Required."""
    secretName: Required[str]
    """Azure Key Vault secret name. Required."""
    secretVersion: str
    """Azure Key Vault secret version."""


class KeyVaultReference(TypedDict, total=False):
    """Azure Key Vault reference.

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

    id: Required[str]
    """Azure Key Vault resource id. Required."""


class OnErrorDeployment(TypedDict, total=False):
    """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: Union[str, "OnErrorDeploymentType"]
    :ivar deployment_name: The deployment to be used on error case.
    :vartype deployment_name: str
    """

    type: Union[str, "OnErrorDeploymentType"]
    """The deployment on error behavior type. Possible values are LastSuccessful and
     SpecificDeployment. Known values are: \"LastSuccessful\" and \"SpecificDeployment\"."""
    deploymentName: str
    """The deployment to be used on error case."""


class ParametersLink(TypedDict, total=False):
    """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: Required[str]
    """The URI of the parameters file. Required."""
    contentVersion: str
    """If included, must match the ContentVersion in the template."""


class ScopedDeployment(TypedDict, total=False):
    """Deployment operation parameters.

    :ivar location: The location to store the deployment data. Required.
    :vartype location: str
    :ivar properties: The deployment properties. Required.
    :vartype properties: "DeploymentProperties"
    :ivar tags: Deployment tags.
    :vartype tags: dict[str, str]
    """

    location: Required[str]
    """The location to store the deployment data. Required."""
    properties: Required["DeploymentProperties"]
    """The deployment properties. Required."""
    tags: dict[str, str]
    """Deployment tags."""


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

    location: Required[str]
    """The location to store the deployment data. Required."""
    properties: Required["DeploymentWhatIfProperties"]
    """The deployment properties. Required."""


class TemplateLink(TypedDict, total=False):
    """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: str
    """The URI of the template to deploy. Use either the uri or id property, but not both."""
    id: str
    """The resource id of a Template Spec. Use either the id or uri property, but not both."""
    relativePath: str
    """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."""
    contentVersion: str
    """If included, must match the ContentVersion in the template."""
    queryString: str
    """The query string (for example, a SAS token) to be used with the templateLink URI."""


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

    principalId: str
    """The principal ID of the assigned identity."""
    clientId: str
    """The client ID of the assigned identity."""
