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

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

from .._utils.model_base import Model as _Model, rest_discriminator, rest_field
from ._enums import JavaComponentType

if TYPE_CHECKING:
    from .. import models as _models


class AllowedAudiencesValidation(_Model):
    """The configuration settings of the Allowed Audiences validation flow.

    :ivar allowed_audiences: The configuration settings of the allowed list of audiences from which
     to validate the JWT token.
    :vartype allowed_audiences: list[str]
    """

    allowed_audiences: Optional[list[str]] = rest_field(
        name="allowedAudiences", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the allowed list of audiences from which to validate the JWT
     token."""

    @overload
    def __init__(
        self,
        *,
        allowed_audiences: 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 AllowedPrincipals(_Model):
    """The configuration settings of the Azure Active Directory allowed principals.

    :ivar groups: The list of the allowed groups.
    :vartype groups: list[str]
    :ivar identities: The list of the allowed identities.
    :vartype identities: list[str]
    """

    groups: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of the allowed groups."""
    identities: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of the allowed identities."""

    @overload
    def __init__(
        self,
        *,
        groups: Optional[list[str]] = None,
        identities: 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 Apple(_Model):
    """The configuration settings of the Apple provider.

    :ivar enabled: <code>false</code> if the Apple provider should not be enabled despite the set
     registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the Apple registration.
    :vartype registration: ~azure.mgmt.appcontainers.models.AppleRegistration
    :ivar login: The configuration settings of the login flow.
    :vartype login: ~azure.mgmt.appcontainers.models.LoginScopes
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Apple provider should not be enabled despite the set registration;
     otherwise, <code>true</code>."""
    registration: Optional["_models.AppleRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Apple registration."""
    login: Optional["_models.LoginScopes"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the login flow."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.AppleRegistration"] = None,
        login: Optional["_models.LoginScopes"] = None,
    ) -> None: ...

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

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


class AppleRegistration(_Model):
    """The configuration settings of the registration for the Apple provider.

    :ivar client_id: The Client ID of the app used for login.
    :vartype client_id: str
    :ivar client_secret_setting_name: The app setting name that contains the client secret.
    :vartype client_secret_setting_name: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The Client ID of the app used for login."""
    client_secret_setting_name: Optional[str] = rest_field(
        name="clientSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting name that contains the client secret."""

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
        client_secret_setting_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 AppLogsConfiguration(_Model):
    """Configuration of application logs.

    :ivar destination: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'.
    :vartype destination: str
    :ivar log_analytics_configuration: Log Analytics configuration, must only be provided when
     destination is configured as 'log-analytics'.
    :vartype log_analytics_configuration:
     ~azure.mgmt.appcontainers.models.LogAnalyticsConfiguration
    """

    destination: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'."""
    log_analytics_configuration: Optional["_models.LogAnalyticsConfiguration"] = rest_field(
        name="logAnalyticsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Log Analytics configuration, must only be provided when destination is configured as
     'log-analytics'."""

    @overload
    def __init__(
        self,
        *,
        destination: Optional[str] = None,
        log_analytics_configuration: Optional["_models.LogAnalyticsConfiguration"] = None,
    ) -> None: ...

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

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


class AppRegistration(_Model):
    """The configuration settings of the app registration for providers that have app ids and app
    secrets.

    :ivar app_id: The App ID of the app used for login.
    :vartype app_id: str
    :ivar app_secret_setting_name: The app setting name that contains the app secret.
    :vartype app_secret_setting_name: str
    """

    app_id: Optional[str] = rest_field(name="appId", visibility=["read", "create", "update", "delete", "query"])
    """The App ID of the app used for login."""
    app_secret_setting_name: Optional[str] = rest_field(
        name="appSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting name that contains the app secret."""

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

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

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


class Resource(_Model):
    """Resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    """

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


class ProxyResource(Resource):
    """Proxy Resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    """


class AuthConfig(ProxyResource):
    """Configuration settings for the Azure ContainerApp Service Authentication / Authorization
    feature.

    :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.appcontainers.models.SystemData
    :ivar properties: AuthConfig resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.AuthConfigProperties
    """

    properties: Optional["_models.AuthConfigProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """AuthConfig resource specific properties."""

    __flattened_items = [
        "platform",
        "global_validation",
        "identity_providers",
        "login",
        "http_settings",
        "encryption_settings",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 AuthConfigProperties(_Model):
    """AuthConfig resource specific properties.

    :ivar platform: The configuration settings of the platform of ContainerApp Service
     Authentication/Authorization.
    :vartype platform: ~azure.mgmt.appcontainers.models.AuthPlatform
    :ivar global_validation: The configuration settings that determines the validation flow of
     users using  Service Authentication/Authorization.
    :vartype global_validation: ~azure.mgmt.appcontainers.models.GlobalValidation
    :ivar identity_providers: The configuration settings of each of the identity providers used to
     configure ContainerApp Service Authentication/Authorization.
    :vartype identity_providers: ~azure.mgmt.appcontainers.models.IdentityProviders
    :ivar login: The configuration settings of the login flow of users using ContainerApp Service
     Authentication/Authorization.
    :vartype login: ~azure.mgmt.appcontainers.models.Login
    :ivar http_settings: The configuration settings of the HTTP requests for authentication and
     authorization requests made against ContainerApp Service Authentication/Authorization.
    :vartype http_settings: ~azure.mgmt.appcontainers.models.HttpSettings
    :ivar encryption_settings: The configuration settings of the secrets references of encryption
     key and signing key for ContainerApp Service Authentication/Authorization.
    :vartype encryption_settings: ~azure.mgmt.appcontainers.models.EncryptionSettings
    """

    platform: Optional["_models.AuthPlatform"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the platform of ContainerApp Service
     Authentication/Authorization."""
    global_validation: Optional["_models.GlobalValidation"] = rest_field(
        name="globalValidation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings that determines the validation flow of users using  Service
     Authentication/Authorization."""
    identity_providers: Optional["_models.IdentityProviders"] = rest_field(
        name="identityProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of each of the identity providers used to configure ContainerApp
     Service Authentication/Authorization."""
    login: Optional["_models.Login"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the login flow of users using ContainerApp Service
     Authentication/Authorization."""
    http_settings: Optional["_models.HttpSettings"] = rest_field(
        name="httpSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the HTTP requests for authentication and authorization requests
     made against ContainerApp Service Authentication/Authorization."""
    encryption_settings: Optional["_models.EncryptionSettings"] = rest_field(
        name="encryptionSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the secrets references of encryption key and signing key for
     ContainerApp Service Authentication/Authorization."""

    @overload
    def __init__(
        self,
        *,
        platform: Optional["_models.AuthPlatform"] = None,
        global_validation: Optional["_models.GlobalValidation"] = None,
        identity_providers: Optional["_models.IdentityProviders"] = None,
        login: Optional["_models.Login"] = None,
        http_settings: Optional["_models.HttpSettings"] = None,
        encryption_settings: Optional["_models.EncryptionSettings"] = None,
    ) -> None: ...

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

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


class AuthPlatform(_Model):
    """The configuration settings of the platform of ContainerApp Service
    Authentication/Authorization.

    :ivar enabled: <code>true</code> if the Authentication / Authorization feature is enabled for
     the current app; otherwise, <code>false</code>.
    :vartype enabled: bool
    :ivar runtime_version: The RuntimeVersion of the Authentication / Authorization feature in use
     for the current app. The setting in this value can control the behavior of certain features in
     the Authentication / Authorization module.
    :vartype runtime_version: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>true</code> if the Authentication / Authorization feature is enabled for the current app;
     otherwise, <code>false</code>."""
    runtime_version: Optional[str] = rest_field(
        name="runtimeVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The RuntimeVersion of the Authentication / Authorization feature in use for the current app.
     The setting in this value can control the behavior of certain features in the Authentication /
     Authorization module."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        runtime_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 AvailableWorkloadProfile(ProxyResource):
    """A workload profile with specific hardware configure to run container apps.

    :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.appcontainers.models.SystemData
    :ivar location: Region of the workload profile.
    :vartype location: str
    :ivar properties: Revision resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.AvailableWorkloadProfileProperties
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Region of the workload profile."""
    properties: Optional["_models.AvailableWorkloadProfileProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Revision resource specific properties."""

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

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

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


class AvailableWorkloadProfileProperties(_Model):
    """Revision resource specific properties.

    :ivar category: Used to categorize workload profiles.
    :vartype category: str
    :ivar applicability: indicates whether the profile is default for the location. Known values
     are: "LocationDefault" and "Custom".
    :vartype applicability: str or ~azure.mgmt.appcontainers.models.Applicability
    :ivar cores: Number of cores in CPU.
    :vartype cores: int
    :ivar memory_gi_b: Memory in GiB.
    :vartype memory_gi_b: int
    :ivar gpus: Number of GPUs.
    :vartype gpus: int
    :ivar display_name: The everyday name of the workload profile.
    :vartype display_name: str
    """

    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Used to categorize workload profiles."""
    applicability: Optional[Union[str, "_models.Applicability"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """indicates whether the profile is default for the location. Known values are:
     \"LocationDefault\" and \"Custom\"."""
    cores: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of cores in CPU."""
    memory_gi_b: Optional[int] = rest_field(
        name="memoryGiB", visibility=["read", "create", "update", "delete", "query"]
    )
    """Memory in GiB."""
    gpus: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of GPUs."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The everyday name of the workload profile."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[str] = None,
        applicability: Optional[Union[str, "_models.Applicability"]] = None,
        cores: Optional[int] = None,
        memory_gi_b: Optional[int] = None,
        gpus: Optional[int] = None,
        display_name: Optional[str] = None,
    ) -> None: ...

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

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


class AzureActiveDirectory(_Model):
    """The configuration settings of the Azure Active directory provider.

    :ivar enabled: <code>false</code> if the Azure Active Directory provider should not be enabled
     despite the set registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the Azure Active Directory app registration.
    :vartype registration: ~azure.mgmt.appcontainers.models.AzureActiveDirectoryRegistration
    :ivar login: The configuration settings of the Azure Active Directory login flow.
    :vartype login: ~azure.mgmt.appcontainers.models.AzureActiveDirectoryLogin
    :ivar validation: The configuration settings of the Azure Active Directory token validation
     flow.
    :vartype validation: ~azure.mgmt.appcontainers.models.AzureActiveDirectoryValidation
    :ivar is_auto_provisioned: Gets a value indicating whether the Azure AD configuration was
     auto-provisioned using 1st party tooling. This is an internal flag primarily intended to
     support the Azure Management Portal. Users should not read or write to this property.
    :vartype is_auto_provisioned: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Azure Active Directory provider should not be enabled despite the set
     registration; otherwise, <code>true</code>."""
    registration: Optional["_models.AzureActiveDirectoryRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory app registration."""
    login: Optional["_models.AzureActiveDirectoryLogin"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory login flow."""
    validation: Optional["_models.AzureActiveDirectoryValidation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory token validation flow."""
    is_auto_provisioned: Optional[bool] = rest_field(
        name="isAutoProvisioned", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party
     tooling. This is an internal flag primarily intended to support the Azure Management Portal.
     Users should not read or write to this property."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.AzureActiveDirectoryRegistration"] = None,
        login: Optional["_models.AzureActiveDirectoryLogin"] = None,
        validation: Optional["_models.AzureActiveDirectoryValidation"] = None,
        is_auto_provisioned: Optional[bool] = None,
    ) -> None: ...

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

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


class AzureActiveDirectoryLogin(_Model):
    """The configuration settings of the Azure Active Directory login flow.

    :ivar login_parameters: Login parameters to send to the OpenID Connect authorization endpoint
     when a user logs in. Each parameter must be in the form "key=value".
    :vartype login_parameters: list[str]
    :ivar disable_www_authenticate: <code>true</code> if the www-authenticate provider should be
     omitted from the request; otherwise, <code>false</code>.
    :vartype disable_www_authenticate: bool
    """

    login_parameters: Optional[list[str]] = rest_field(
        name="loginParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each
     parameter must be in the form \"key=value\"."""
    disable_www_authenticate: Optional[bool] = rest_field(
        name="disableWWWAuthenticate", visibility=["read", "create", "update", "delete", "query"]
    )
    """<code>true</code> if the www-authenticate provider should be omitted from the request;
     otherwise, <code>false</code>."""

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

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

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


class AzureActiveDirectoryRegistration(_Model):
    """The configuration settings of the Azure Active Directory app registration.

    :ivar open_id_issuer: The OpenID Connect Issuer URI that represents the entity which issues
     access tokens for this application. When using Azure Active Directory, this value is the URI of
     the directory tenant, e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/
     <https://login.microsoftonline.com/v2.0/{tenant-guid}/>`_. This URI is a case-sensitive
     identifier for the token issuer. More information on OpenID Connect Discovery:
     `http://openid.net/specs/openid-connect-discovery-1_0.html
     <http://openid.net/specs/openid-connect-discovery-1_0.html>`_.
    :vartype open_id_issuer: str
    :ivar client_id: The Client ID of this relying party application, known as the client_id. This
     setting is required for enabling OpenID Connection authentication with Azure Active Directory
     or other 3rd party OpenID Connect providers. More information on OpenID Connect:
     `http://openid.net/specs/openid-connect-core-1_0.html
     <http://openid.net/specs/openid-connect-core-1_0.html>`_.
    :vartype client_id: str
    :ivar client_secret_setting_name: The app setting name that contains the client secret of the
     relying party application.
    :vartype client_secret_setting_name: str
    :ivar client_secret_certificate_thumbprint: An alternative to the client secret, that is the
     thumbprint of a certificate used for signing purposes. This property acts as a replacement for
     the Client Secret. It is also optional.
    :vartype client_secret_certificate_thumbprint: str
    :ivar client_secret_certificate_subject_alternative_name: An alternative to the client secret
     thumbprint, that is the subject alternative name of a certificate used for signing purposes.
     This property acts as a replacement for the Client Secret Certificate Thumbprint. It is also
     optional.
    :vartype client_secret_certificate_subject_alternative_name: str
    :ivar client_secret_certificate_issuer: An alternative to the client secret thumbprint, that is
     the issuer of a certificate used for signing purposes. This property acts as a replacement for
     the Client Secret Certificate Thumbprint. It is also optional.
    :vartype client_secret_certificate_issuer: str
    """

    open_id_issuer: Optional[str] = rest_field(
        name="openIdIssuer", visibility=["read", "create", "update", "delete", "query"]
    )
    """The OpenID Connect Issuer URI that represents the entity which issues access tokens for this
     application. When using Azure Active Directory, this value is the URI of the directory tenant,
     e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/
     <https://login.microsoftonline.com/v2.0/{tenant-guid}/>`_. This URI is a case-sensitive
     identifier for the token issuer. More information on OpenID Connect Discovery:
     `http://openid.net/specs/openid-connect-discovery-1_0.html
     <http://openid.net/specs/openid-connect-discovery-1_0.html>`_."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The Client ID of this relying party application, known as the client_id. This setting is
     required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd
     party OpenID Connect providers. More information on OpenID Connect:
     `http://openid.net/specs/openid-connect-core-1_0.html
     <http://openid.net/specs/openid-connect-core-1_0.html>`_."""
    client_secret_setting_name: Optional[str] = rest_field(
        name="clientSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting name that contains the client secret of the relying party application."""
    client_secret_certificate_thumbprint: Optional[str] = rest_field(
        name="clientSecretCertificateThumbprint", visibility=["read", "create", "update", "delete", "query"]
    )
    """An alternative to the client secret, that is the thumbprint of a certificate used for signing
     purposes. This property acts as a replacement for the Client Secret. It is also optional."""
    client_secret_certificate_subject_alternative_name: Optional[str] = rest_field(
        name="clientSecretCertificateSubjectAlternativeName", visibility=["read", "create", "update", "delete", "query"]
    )
    """An alternative to the client secret thumbprint, that is the subject alternative name of a
     certificate used for signing purposes. This property acts as a replacement for the Client
     Secret Certificate Thumbprint. It is also optional."""
    client_secret_certificate_issuer: Optional[str] = rest_field(
        name="clientSecretCertificateIssuer", visibility=["read", "create", "update", "delete", "query"]
    )
    """An alternative to the client secret thumbprint, that is the issuer of a certificate used for
     signing purposes. This property acts as a replacement for the Client Secret Certificate
     Thumbprint. It is also optional."""

    @overload
    def __init__(
        self,
        *,
        open_id_issuer: Optional[str] = None,
        client_id: Optional[str] = None,
        client_secret_setting_name: Optional[str] = None,
        client_secret_certificate_thumbprint: Optional[str] = None,
        client_secret_certificate_subject_alternative_name: Optional[str] = None,
        client_secret_certificate_issuer: 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 AzureActiveDirectoryValidation(_Model):
    """The configuration settings of the Azure Active Directory token validation flow.

    :ivar jwt_claim_checks: The configuration settings of the checks that should be made while
     validating the JWT Claims.
    :vartype jwt_claim_checks: ~azure.mgmt.appcontainers.models.JwtClaimChecks
    :ivar allowed_audiences: The list of audiences that can make successful
     authentication/authorization requests.
    :vartype allowed_audiences: list[str]
    :ivar default_authorization_policy: The configuration settings of the default authorization
     policy.
    :vartype default_authorization_policy:
     ~azure.mgmt.appcontainers.models.DefaultAuthorizationPolicy
    """

    jwt_claim_checks: Optional["_models.JwtClaimChecks"] = rest_field(
        name="jwtClaimChecks", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the checks that should be made while validating the JWT Claims."""
    allowed_audiences: Optional[list[str]] = rest_field(
        name="allowedAudiences", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of audiences that can make successful authentication/authorization requests."""
    default_authorization_policy: Optional["_models.DefaultAuthorizationPolicy"] = rest_field(
        name="defaultAuthorizationPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the default authorization policy."""

    @overload
    def __init__(
        self,
        *,
        jwt_claim_checks: Optional["_models.JwtClaimChecks"] = None,
        allowed_audiences: Optional[list[str]] = None,
        default_authorization_policy: Optional["_models.DefaultAuthorizationPolicy"] = None,
    ) -> None: ...

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

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


class AzureCredentials(_Model):
    """Container App credentials.

    :ivar client_id: Client Id.
    :vartype client_id: str
    :ivar client_secret: Client Secret.
    :vartype client_secret: str
    :ivar tenant_id: Tenant Id.
    :vartype tenant_id: str
    :ivar kind: Kind of auth github does for deploying the template.
    :vartype kind: str
    :ivar subscription_id: Subscription Id.
    :vartype subscription_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["create", "update"])
    """Client Id."""
    client_secret: Optional[str] = rest_field(name="clientSecret", visibility=["create", "update"])
    """Client Secret."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["create", "update"])
    """Tenant Id."""
    kind: Optional[str] = rest_field(visibility=["create", "update"])
    """Kind of auth github does for deploying the template."""
    subscription_id: Optional[str] = rest_field(
        name="subscriptionId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Subscription Id."""

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

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

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


class AzureFileProperties(_Model):
    """Azure File Properties.

    :ivar account_name: Storage account name for azure file.
    :vartype account_name: str
    :ivar account_key: Storage account key for azure file.
    :vartype account_key: str
    :ivar account_key_vault_properties: Storage account key stored as an Azure Key Vault secret.
    :vartype account_key_vault_properties:
     ~azure.mgmt.appcontainers.models.SecretKeyVaultProperties
    :ivar access_mode: Access mode for storage. Known values are: "ReadOnly" and "ReadWrite".
    :vartype access_mode: str or ~azure.mgmt.appcontainers.models.AccessMode
    :ivar share_name: Azure file share name.
    :vartype share_name: str
    """

    account_name: Optional[str] = rest_field(
        name="accountName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account name for azure file."""
    account_key: Optional[str] = rest_field(
        name="accountKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account key for azure file."""
    account_key_vault_properties: Optional["_models.SecretKeyVaultProperties"] = rest_field(
        name="accountKeyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account key stored as an Azure Key Vault secret."""
    access_mode: Optional[Union[str, "_models.AccessMode"]] = rest_field(
        name="accessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access mode for storage. Known values are: \"ReadOnly\" and \"ReadWrite\"."""
    share_name: Optional[str] = rest_field(name="shareName", visibility=["read", "create", "update", "delete", "query"])
    """Azure file share name."""

    @overload
    def __init__(
        self,
        *,
        account_name: Optional[str] = None,
        account_key: Optional[str] = None,
        account_key_vault_properties: Optional["_models.SecretKeyVaultProperties"] = None,
        access_mode: Optional[Union[str, "_models.AccessMode"]] = None,
        share_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 AzureStaticWebApps(_Model):
    """The configuration settings of the Azure Static Web Apps provider.

    :ivar enabled: <code>false</code> if the Azure Static Web Apps provider should not be enabled
     despite the set registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the Azure Static Web Apps registration.
    :vartype registration: ~azure.mgmt.appcontainers.models.AzureStaticWebAppsRegistration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Azure Static Web Apps provider should not be enabled despite the set
     registration; otherwise, <code>true</code>."""
    registration: Optional["_models.AzureStaticWebAppsRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Static Web Apps registration."""

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

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

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


class AzureStaticWebAppsRegistration(_Model):
    """The configuration settings of the registration for the Azure Static Web Apps provider.

    :ivar client_id: The Client ID of the app used for login.
    :vartype client_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The Client ID of the app used for login."""

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

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

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


class BaseContainer(_Model):
    """Container App base container definition.

    :ivar image: Container image tag.
    :vartype image: str
    :ivar name: Custom container name.
    :vartype name: str
    :ivar command: Container start command.
    :vartype command: list[str]
    :ivar args: Container start command arguments.
    :vartype args: list[str]
    :ivar env: Container environment variables.
    :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
    :ivar resources: Container resource requirements.
    :vartype resources: ~azure.mgmt.appcontainers.models.ContainerResources
    :ivar volume_mounts: Container volume mounts.
    :vartype volume_mounts: list[~azure.mgmt.appcontainers.models.VolumeMount]
    """

    image: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container image tag."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom container name."""
    command: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command."""
    args: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command arguments."""
    env: Optional[list["_models.EnvironmentVar"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container environment variables."""
    resources: Optional["_models.ContainerResources"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container resource requirements."""
    volume_mounts: Optional[list["_models.VolumeMount"]] = rest_field(
        name="volumeMounts", visibility=["read", "create", "update", "delete", "query"]
    )
    """Container volume mounts."""

    @overload
    def __init__(
        self,
        *,
        image: Optional[str] = None,
        name: Optional[str] = None,
        command: Optional[list[str]] = None,
        args: Optional[list[str]] = None,
        env: Optional[list["_models.EnvironmentVar"]] = None,
        resources: Optional["_models.ContainerResources"] = None,
        volume_mounts: Optional[list["_models.VolumeMount"]] = None,
    ) -> None: ...

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

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


class BillingMeter(ProxyResource):
    """Billing meter.

    :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.appcontainers.models.SystemData
    :ivar location: Region for the billing meter.
    :vartype location: str
    :ivar properties: Revision resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.BillingMeterProperties
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Region for the billing meter."""
    properties: Optional["_models.BillingMeterProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Revision resource specific properties."""

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

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

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


class BillingMeterCollection(_Model):
    """Collection of billing meters.

    :ivar value: Collection of billing meters. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.BillingMeter]
    """

    value: list["_models.BillingMeter"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of billing meters. Required."""

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

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

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


class BillingMeterProperties(_Model):
    """Revision resource specific properties.

    :ivar category: Used to categorize billing meters.
    :vartype category: str
    :ivar meter_type: Billing meter type.
    :vartype meter_type: str
    :ivar display_name: The everyday name of the billing meter.
    :vartype display_name: str
    """

    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Used to categorize billing meters."""
    meter_type: Optional[str] = rest_field(name="meterType", visibility=["read", "create", "update", "delete", "query"])
    """Billing meter type."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The everyday name of the billing meter."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[str] = None,
        meter_type: Optional[str] = None,
        display_name: Optional[str] = None,
    ) -> None: ...

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

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


class BlobStorageTokenStore(_Model):
    """The configuration settings of the storage of the tokens if blob storage is used.

    :ivar sas_url_setting_name: The name of the app secrets containing the SAS URL of the blob
     storage containing the tokens. Required.
    :vartype sas_url_setting_name: str
    """

    sas_url_setting_name: str = rest_field(
        name="sasUrlSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the app secrets containing the SAS URL of the blob storage containing the tokens.
     Required."""

    @overload
    def __init__(
        self,
        *,
        sas_url_setting_name: str,
    ) -> None: ...

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

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


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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: str = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives. Required."""

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

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

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


class Certificate(TrackedResource):
    """Certificate used for Custom Domain bindings of Container Apps in a Managed Environment.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Certificate resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.CertificateProperties
    """

    properties: Optional["_models.CertificateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Certificate resource specific properties."""

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

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

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


class CertificateKeyVaultProperties(_Model):
    """Properties for a certificate stored in a Key Vault.

    :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
     System to use a system-assigned identity.
    :vartype identity: str
    :ivar key_vault_url: URL pointing to the Azure Key Vault secret that holds the certificate.
    :vartype key_vault_url: str
    """

    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a
     system-assigned identity."""
    key_vault_url: Optional[str] = rest_field(
        name="keyVaultUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """URL pointing to the Azure Key Vault secret that holds the certificate."""

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

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

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


class CertificatePatch(_Model):
    """A certificate to update.

    :ivar tags: Application-specific metadata in the form of key-value pairs.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Application-specific metadata in the form of key-value pairs."""

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

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

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


class CertificateProperties(_Model):
    """Certificate resource specific properties.

    :ivar provisioning_state: Provisioning state of the certificate. Known values are: "Succeeded",
     "Failed", "Canceled", "DeleteFailed", "Pending", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.CertificateProvisioningState
    :ivar deployment_errors: Any errors that occurred during deployment or deployment validation.
    :vartype deployment_errors: str
    :ivar certificate_key_vault_properties: Properties for a certificate stored in a Key Vault.
    :vartype certificate_key_vault_properties:
     ~azure.mgmt.appcontainers.models.CertificateKeyVaultProperties
    :ivar password: Certificate password.
    :vartype password: str
    :ivar subject_name: Subject name of the certificate.
    :vartype subject_name: str
    :ivar subject_alternative_names: Subject alternative names the certificate applies to.
    :vartype subject_alternative_names: list[str]
    :ivar value: PFX or PEM blob.
    :vartype value: bytes
    :ivar issuer: Certificate issuer.
    :vartype issuer: str
    :ivar issue_date: Certificate issue Date.
    :vartype issue_date: ~datetime.datetime
    :ivar expiration_date: Certificate expiration date.
    :vartype expiration_date: ~datetime.datetime
    :ivar thumbprint: Certificate thumbprint.
    :vartype thumbprint: str
    :ivar valid: Is the certificate valid?.
    :vartype valid: bool
    :ivar public_key_hash: Public key hash.
    :vartype public_key_hash: str
    """

    provisioning_state: Optional[Union[str, "_models.CertificateProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the certificate. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"DeleteFailed\", \"Pending\", and \"Deleting\"."""
    deployment_errors: Optional[str] = rest_field(name="deploymentErrors", visibility=["read"])
    """Any errors that occurred during deployment or deployment validation."""
    certificate_key_vault_properties: Optional["_models.CertificateKeyVaultProperties"] = rest_field(
        name="certificateKeyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties for a certificate stored in a Key Vault."""
    password: Optional[str] = rest_field(visibility=["create"])
    """Certificate password."""
    subject_name: Optional[str] = rest_field(name="subjectName", visibility=["read"])
    """Subject name of the certificate."""
    subject_alternative_names: Optional[list[str]] = rest_field(name="subjectAlternativeNames", visibility=["read"])
    """Subject alternative names the certificate applies to."""
    value: Optional[bytes] = rest_field(visibility=["create"], format="base64")
    """PFX or PEM blob."""
    issuer: Optional[str] = rest_field(visibility=["read"])
    """Certificate issuer."""
    issue_date: Optional[datetime.datetime] = rest_field(name="issueDate", visibility=["read"], format="rfc3339")
    """Certificate issue Date."""
    expiration_date: Optional[datetime.datetime] = rest_field(
        name="expirationDate", visibility=["read"], format="rfc3339"
    )
    """Certificate expiration date."""
    thumbprint: Optional[str] = rest_field(visibility=["read"])
    """Certificate thumbprint."""
    valid: Optional[bool] = rest_field(visibility=["read"])
    """Is the certificate valid?."""
    public_key_hash: Optional[str] = rest_field(name="publicKeyHash", visibility=["read"])
    """Public key hash."""

    @overload
    def __init__(
        self,
        *,
        certificate_key_vault_properties: Optional["_models.CertificateKeyVaultProperties"] = None,
        password: Optional[str] = None,
        value: Optional[bytes] = None,
    ) -> None: ...

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

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


class CheckNameAvailabilityRequest(_Model):
    """The check availability request body.

    :ivar name: The name of the resource for which availability needs to be checked.
    :vartype name: str
    :ivar type: The resource type.
    :vartype type: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the resource for which availability needs to be checked."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource type."""

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

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

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


class CheckNameAvailabilityResponse(_Model):
    """The check availability result.

    :ivar name_available: Indicates if the resource name is available.
    :vartype name_available: bool
    :ivar reason: The reason why the given name is not available. Known values are: "Invalid" and
     "AlreadyExists".
    :vartype reason: str or ~azure.mgmt.appcontainers.models.CheckNameAvailabilityReason
    :ivar message: Detailed reason why the given name is not available.
    :vartype message: str
    """

    name_available: Optional[bool] = rest_field(
        name="nameAvailable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates if the resource name is available."""
    reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The reason why the given name is not available. Known values are: \"Invalid\" and
     \"AlreadyExists\"."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Detailed reason why the given name is not available."""

    @overload
    def __init__(
        self,
        *,
        name_available: Optional[bool] = None,
        reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = None,
        message: Optional[str] = None,
    ) -> None: ...

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

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


class ClientRegistration(_Model):
    """The configuration settings of the app registration for providers that have client ids and
    client secrets.

    :ivar client_id: The Client ID of the app used for login.
    :vartype client_id: str
    :ivar client_secret_setting_name: The app setting name that contains the client secret.
    :vartype client_secret_setting_name: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The Client ID of the app used for login."""
    client_secret_setting_name: Optional[str] = rest_field(
        name="clientSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting name that contains the client secret."""

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
        client_secret_setting_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 Configuration(_Model):
    """Non versioned Container App configuration properties that define the mutable settings of a
    Container app.

    :ivar secrets: Collection of secrets used by a Container app.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.Secret]
    :ivar active_revisions_mode: Controls how active revisions are handled for the Container app.
     Known values are: "Multiple" and "Single".
    :vartype active_revisions_mode: str or ~azure.mgmt.appcontainers.models.ActiveRevisionsMode
    :ivar ingress: Ingress configurations.
    :vartype ingress: ~azure.mgmt.appcontainers.models.Ingress
    :ivar registries: Collection of private container registry credentials for containers used by
     the Container app.
    :vartype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
    :ivar dapr: Dapr configuration for the Container App.
    :vartype dapr: ~azure.mgmt.appcontainers.models.Dapr
    :ivar runtime: App runtime configuration for the Container App.
    :vartype runtime: ~azure.mgmt.appcontainers.models.Runtime
    :ivar max_inactive_revisions: Optional. Max inactive revisions a Container App can have.
    :vartype max_inactive_revisions: int
    :ivar service: Container App to be a dev Container App Service.
    :vartype service: ~azure.mgmt.appcontainers.models.Service
    :ivar identity_settings: Optional settings for Managed Identities that are assigned to the
     Container App. If a Managed Identity is not specified here, default settings will be used.
    :vartype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
    """

    secrets: Optional[list["_models.Secret"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of secrets used by a Container app."""
    active_revisions_mode: Optional[Union[str, "_models.ActiveRevisionsMode"]] = rest_field(
        name="activeRevisionsMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Controls how active revisions are handled for the Container app. Known values are: \"Multiple\"
     and \"Single\"."""
    ingress: Optional["_models.Ingress"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Ingress configurations."""
    registries: Optional[list["_models.RegistryCredentials"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of private container registry credentials for containers used by the Container app."""
    dapr: Optional["_models.Dapr"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Dapr configuration for the Container App."""
    runtime: Optional["_models.Runtime"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """App runtime configuration for the Container App."""
    max_inactive_revisions: Optional[int] = rest_field(
        name="maxInactiveRevisions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Max inactive revisions a Container App can have."""
    service: Optional["_models.Service"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container App to be a dev Container App Service."""
    identity_settings: Optional[list["_models.IdentitySettings"]] = rest_field(
        name="identitySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional settings for Managed Identities that are assigned to the Container App. If a Managed
     Identity is not specified here, default settings will be used."""

    @overload
    def __init__(
        self,
        *,
        secrets: Optional[list["_models.Secret"]] = None,
        active_revisions_mode: Optional[Union[str, "_models.ActiveRevisionsMode"]] = None,
        ingress: Optional["_models.Ingress"] = None,
        registries: Optional[list["_models.RegistryCredentials"]] = None,
        dapr: Optional["_models.Dapr"] = None,
        runtime: Optional["_models.Runtime"] = None,
        max_inactive_revisions: Optional[int] = None,
        service: Optional["_models.Service"] = None,
        identity_settings: Optional[list["_models.IdentitySettings"]] = None,
    ) -> None: ...

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

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


class ConnectedEnvironment(TrackedResource):
    """An environment for Kubernetes cluster specialized for web workloads by Azure App Service.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: ConnectedEnvironment resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentProperties
    :ivar extended_location: The complex type of the extended location.
    :vartype extended_location: ~azure.mgmt.appcontainers.models.ExtendedLocation
    """

    properties: Optional["_models.ConnectedEnvironmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """ConnectedEnvironment resource specific properties."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The complex type of the extended location."""

    __flattened_items = [
        "provisioning_state",
        "deployment_errors",
        "default_domain",
        "static_ip",
        "dapr_ai_connection_string",
        "custom_domain_configuration",
    ]

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class ResourceTags(_Model):
    """List of key value pairs that describe the resource. This will overwrite the existing tags.

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

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class ConnectedEnvironmentPatchResource(ResourceTags):
    """Connected environment patch properties.

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

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

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

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


class ConnectedEnvironmentProperties(_Model):
    """ConnectedEnvironment resource specific properties.

    :ivar provisioning_state: Provisioning state of the Kubernetes Environment. Known values are:
     "Succeeded", "Failed", "Canceled", "Waiting", "InitializationInProgress",
     "InfrastructureSetupInProgress", "InfrastructureSetupComplete", and "ScheduledForDelete".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.ConnectedEnvironmentProvisioningState
    :ivar deployment_errors: Any errors that occurred during deployment or deployment validation.
    :vartype deployment_errors: str
    :ivar default_domain: Default Domain Name for the cluster.
    :vartype default_domain: str
    :ivar static_ip: Static IP of the connectedEnvironment.
    :vartype static_ip: str
    :ivar dapr_ai_connection_string: Application Insights connection string used by Dapr to export
     Service to Service communication telemetry.
    :vartype dapr_ai_connection_string: str
    :ivar custom_domain_configuration: Custom domain configuration for the environment.
    :vartype custom_domain_configuration:
     ~azure.mgmt.appcontainers.models.CustomDomainConfiguration
    """

    provisioning_state: Optional[Union[str, "_models.ConnectedEnvironmentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Kubernetes Environment. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Waiting\", \"InitializationInProgress\", \"InfrastructureSetupInProgress\",
     \"InfrastructureSetupComplete\", and \"ScheduledForDelete\"."""
    deployment_errors: Optional[str] = rest_field(name="deploymentErrors", visibility=["read"])
    """Any errors that occurred during deployment or deployment validation."""
    default_domain: Optional[str] = rest_field(name="defaultDomain", visibility=["read"])
    """Default Domain Name for the cluster."""
    static_ip: Optional[str] = rest_field(name="staticIp", visibility=["read", "create", "update", "delete", "query"])
    """Static IP of the connectedEnvironment."""
    dapr_ai_connection_string: Optional[str] = rest_field(
        name="daprAIConnectionString", visibility=["read", "create", "update", "delete", "query"]
    )
    """Application Insights connection string used by Dapr to export Service to Service communication
     telemetry."""
    custom_domain_configuration: Optional["_models.CustomDomainConfiguration"] = rest_field(
        name="customDomainConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom domain configuration for the environment."""

    @overload
    def __init__(
        self,
        *,
        static_ip: Optional[str] = None,
        dapr_ai_connection_string: Optional[str] = None,
        custom_domain_configuration: Optional["_models.CustomDomainConfiguration"] = None,
    ) -> None: ...

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

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


class ConnectedEnvironmentStorage(ProxyResource):
    """Storage resource for connectedEnvironment.

    :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.appcontainers.models.SystemData
    :ivar properties: Storage properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorageProperties
    """

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

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

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

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


class ConnectedEnvironmentStorageProperties(_Model):
    """Storage properties.

    :ivar provisioning_state: Provisioning state of the storage. Known values are: "Succeeded",
     "Failed", "Canceled", "InProgress", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorageProvisioningState
    :ivar deployment_errors: Any errors that occurred during deployment or deployment validation.
    :vartype deployment_errors: str
    :ivar azure_file: Azure file properties.
    :vartype azure_file: ~azure.mgmt.appcontainers.models.AzureFileProperties
    """

    provisioning_state: Optional[Union[str, "_models.ConnectedEnvironmentStorageProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the storage. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"InProgress\", and \"Deleting\"."""
    deployment_errors: Optional[str] = rest_field(name="deploymentErrors", visibility=["read"])
    """Any errors that occurred during deployment or deployment validation."""
    azure_file: Optional["_models.AzureFileProperties"] = rest_field(
        name="azureFile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure file properties."""

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

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

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


class ConnectedEnvironmentStoragesCollection(_Model):
    """Collection of Storage for Environments.

    :ivar value: Collection of storage resources. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorage]
    """

    value: list["_models.ConnectedEnvironmentStorage"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of storage resources. Required."""

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

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

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


class Container(BaseContainer):
    """Container App container definition.

    :ivar image: Container image tag.
    :vartype image: str
    :ivar name: Custom container name.
    :vartype name: str
    :ivar command: Container start command.
    :vartype command: list[str]
    :ivar args: Container start command arguments.
    :vartype args: list[str]
    :ivar env: Container environment variables.
    :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
    :ivar resources: Container resource requirements.
    :vartype resources: ~azure.mgmt.appcontainers.models.ContainerResources
    :ivar volume_mounts: Container volume mounts.
    :vartype volume_mounts: list[~azure.mgmt.appcontainers.models.VolumeMount]
    :ivar probes: List of probes for the container.
    :vartype probes: list[~azure.mgmt.appcontainers.models.ContainerAppProbe]
    """

    probes: Optional[list["_models.ContainerAppProbe"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of probes for the container."""

    @overload
    def __init__(
        self,
        *,
        image: Optional[str] = None,
        name: Optional[str] = None,
        command: Optional[list[str]] = None,
        args: Optional[list[str]] = None,
        env: Optional[list["_models.EnvironmentVar"]] = None,
        resources: Optional["_models.ContainerResources"] = None,
        volume_mounts: Optional[list["_models.VolumeMount"]] = None,
        probes: Optional[list["_models.ContainerAppProbe"]] = None,
    ) -> None: ...

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

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


class ContainerApp(TrackedResource):
    """Container App.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: ContainerApp resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ContainerAppProperties
    :ivar extended_location: The complex type of the extended location.
    :vartype extended_location: ~azure.mgmt.appcontainers.models.ExtendedLocation
    :ivar identity: managed identities for the Container App to interact with other Azure services
     without maintaining any secrets or credentials in code.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    :ivar managed_by: The fully qualified resource ID of the resource that manages this resource.
     Indicates if this resource is managed by another Azure resource. If this is present, complete
     mode deployment will not delete the resource if it is removed from the template since it is
     managed by another resource.
    :vartype managed_by: str
    :ivar kind: Metadata to represent the container app kind, representing if a container app is
     workflowapp or functionapp. Known values are: "workflowapp" and "functionapp".
    :vartype kind: str or ~azure.mgmt.appcontainers.models.Kind
    """

    properties: Optional["_models.ContainerAppProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """ContainerApp resource specific properties."""
    extended_location: Optional["_models.ExtendedLocation"] = rest_field(
        name="extendedLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The complex type of the extended location."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """managed identities for the Container App to interact with other Azure services without
     maintaining any secrets or credentials in code."""
    managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update"])
    """The fully qualified resource ID of the resource that manages this resource. Indicates if this
     resource is managed by another Azure resource. If this is present, complete mode deployment
     will not delete the resource if it is removed from the template since it is managed by another
     resource."""
    kind: Optional[Union[str, "_models.Kind"]] = rest_field(visibility=["read", "create"])
    """Metadata to represent the container app kind, representing if a container app is workflowapp or
     functionapp. Known values are: \"workflowapp\" and \"functionapp\"."""

    __flattened_items = [
        "provisioning_state",
        "running_status",
        "managed_environment_id",
        "environment_id",
        "workload_profile_name",
        "latest_revision_name",
        "latest_ready_revision_name",
        "latest_revision_fqdn",
        "custom_domain_verification_id",
        "configuration",
        "template",
        "outbound_ip_addresses",
        "event_stream_endpoint",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.ContainerAppProperties"] = None,
        extended_location: Optional["_models.ExtendedLocation"] = None,
        identity: Optional["_models.ManagedServiceIdentity"] = None,
        managed_by: Optional[str] = None,
        kind: Optional[Union[str, "_models.Kind"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 ContainerAppAuthToken(TrackedResource):
    """Container App Auth Token.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Container App auth token resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ContainerAppAuthTokenProperties
    """

    properties: Optional["_models.ContainerAppAuthTokenProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container App auth token resource specific properties."""

    __flattened_items = ["token", "expires"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ContainerAppAuthTokenProperties(_Model):
    """Container App auth token resource specific properties.

    :ivar token: Auth token value.
    :vartype token: str
    :ivar expires: Token expiration date.
    :vartype expires: ~datetime.datetime
    """

    token: Optional[str] = rest_field(visibility=["read"])
    """Auth token value."""
    expires: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Token expiration date."""


class ContainerAppJobExecutions(_Model):
    """Container App executions collection ARM resource.

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

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

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

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

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


class ContainerAppProbe(_Model):
    """Probe describes a health check to be performed against a container to determine whether it is
    alive or ready to receive traffic.

    :ivar failure_threshold: Minimum consecutive failures for the probe to be considered failed
     after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10.
    :vartype failure_threshold: int
    :ivar http_get: HTTPGet specifies the http request to perform.
    :vartype http_get: ~azure.mgmt.appcontainers.models.ContainerAppProbeHttpGet
    :ivar initial_delay_seconds: Number of seconds after the container has started before liveness
     probes are initiated. Minimum value is 1. Maximum value is 60.
    :vartype initial_delay_seconds: int
    :ivar period_seconds: How often (in seconds) to perform the probe. Default to 10 seconds.
     Minimum value is 1. Maximum value is 240.
    :vartype period_seconds: int
    :ivar success_threshold: Minimum consecutive successes for the probe to be considered
     successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum
     value is 1. Maximum value is 10.
    :vartype success_threshold: int
    :ivar tcp_socket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet
     supported.
    :vartype tcp_socket: ~azure.mgmt.appcontainers.models.ContainerAppProbeTcpSocket
    :ivar termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate
     gracefully upon probe failure. The grace period is the duration in seconds after the processes
     running in the pod are sent a termination signal and the time when the processes are forcibly
     halted with a kill signal. Set this value longer than the expected cleanup time for your
     process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise,
     this value overrides the value provided by the pod spec. Value must be non-negative integer.
     The value zero indicates stop immediately via the kill signal (no opportunity to shut down).
     This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum
     value is 3600 seconds (1 hour).
    :vartype termination_grace_period_seconds: int
    :ivar timeout_seconds: Number of seconds after which the probe times out. Defaults to 1 second.
     Minimum value is 1. Maximum value is 240.
    :vartype timeout_seconds: int
    :ivar type: The type of probe. Known values are: "Liveness", "Readiness", and "Startup".
    :vartype type: str or ~azure.mgmt.appcontainers.models.Type
    """

    failure_threshold: Optional[int] = rest_field(
        name="failureThreshold", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum consecutive failures for the probe to be considered failed after having succeeded.
     Defaults to 3. Minimum value is 1. Maximum value is 10."""
    http_get: Optional["_models.ContainerAppProbeHttpGet"] = rest_field(
        name="httpGet", visibility=["read", "create", "update", "delete", "query"]
    )
    """HTTPGet specifies the http request to perform."""
    initial_delay_seconds: Optional[int] = rest_field(
        name="initialDelaySeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Number of seconds after the container has started before liveness probes are initiated. Minimum
     value is 1. Maximum value is 60."""
    period_seconds: Optional[int] = rest_field(
        name="periodSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum
     value is 240."""
    success_threshold: Optional[int] = rest_field(
        name="successThreshold", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum consecutive successes for the probe to be considered successful after having failed.
     Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10."""
    tcp_socket: Optional["_models.ContainerAppProbeTcpSocket"] = rest_field(
        name="tcpSocket", visibility=["read", "create", "update", "delete", "query"]
    )
    """TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported."""
    termination_grace_period_seconds: Optional[int] = rest_field(
        name="terminationGracePeriodSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The
     grace period is the duration in seconds after the processes running in the pod are sent a
     termination signal and the time when the processes are forcibly halted with a kill signal. Set
     this value longer than the expected cleanup time for your process. If this value is nil, the
     pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value
     provided by the pod spec. Value must be non-negative integer. The value zero indicates stop
     immediately via the kill signal (no opportunity to shut down). This is an alpha field and
     requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1
     hour)."""
    timeout_seconds: Optional[int] = rest_field(
        name="timeoutSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.
     Maximum value is 240."""
    type: Optional[Union[str, "_models.Type"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of probe. Known values are: \"Liveness\", \"Readiness\", and \"Startup\"."""

    @overload
    def __init__(
        self,
        *,
        failure_threshold: Optional[int] = None,
        http_get: Optional["_models.ContainerAppProbeHttpGet"] = None,
        initial_delay_seconds: Optional[int] = None,
        period_seconds: Optional[int] = None,
        success_threshold: Optional[int] = None,
        tcp_socket: Optional["_models.ContainerAppProbeTcpSocket"] = None,
        termination_grace_period_seconds: Optional[int] = None,
        timeout_seconds: Optional[int] = None,
        type: Optional[Union[str, "_models.Type"]] = None,
    ) -> None: ...

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

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


class ContainerAppProbeHttpGet(_Model):
    """HTTPGet specifies the http request to perform.

    :ivar host: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in
     httpHeaders instead.
    :vartype host: str
    :ivar http_headers: Custom headers to set in the request. HTTP allows repeated headers.
    :vartype http_headers:
     list[~azure.mgmt.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem]
    :ivar path: Path to access on the HTTP server.
    :vartype path: str
    :ivar port: Name or number of the port to access on the container. Number must be in the range
     1 to 65535. Name must be an IANA_SVC_NAME. Required.
    :vartype port: int
    :ivar scheme: Scheme to use for connecting to the host. Defaults to HTTP. Known values are:
     "HTTP" and "HTTPS".
    :vartype scheme: str or ~azure.mgmt.appcontainers.models.Scheme
    """

    host: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in
     httpHeaders instead."""
    http_headers: Optional[list["_models.ContainerAppProbeHttpGetHttpHeadersItem"]] = rest_field(
        name="httpHeaders", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom headers to set in the request. HTTP allows repeated headers."""
    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path to access on the HTTP server."""
    port: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name or number of the port to access on the container. Number must be in the range 1 to 65535.
     Name must be an IANA_SVC_NAME. Required."""
    scheme: Optional[Union[str, "_models.Scheme"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Scheme to use for connecting to the host. Defaults to HTTP. Known values are: \"HTTP\" and
     \"HTTPS\"."""

    @overload
    def __init__(
        self,
        *,
        port: int,
        host: Optional[str] = None,
        http_headers: Optional[list["_models.ContainerAppProbeHttpGetHttpHeadersItem"]] = None,
        path: Optional[str] = None,
        scheme: Optional[Union[str, "_models.Scheme"]] = None,
    ) -> None: ...

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

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


class ContainerAppProbeHttpGetHttpHeadersItem(_Model):
    """HTTPHeader describes a custom header to be used in HTTP probes.

    :ivar name: The header field name. Required.
    :vartype name: str
    :ivar value: The header field value. Required.
    :vartype value: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The header field name. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The header field value. Required."""

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

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

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


class ContainerAppProbeTcpSocket(_Model):
    """TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported.

    :ivar host: Optional: Host name to connect to, defaults to the pod IP.
    :vartype host: str
    :ivar port: Number or name of the port to access on the container. Number must be in the range
     1 to 65535. Name must be an IANA_SVC_NAME. Required.
    :vartype port: int
    """

    host: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional: Host name to connect to, defaults to the pod IP."""
    port: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number or name of the port to access on the container. Number must be in the range 1 to 65535.
     Name must be an IANA_SVC_NAME. Required."""

    @overload
    def __init__(
        self,
        *,
        port: int,
        host: 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 ContainerAppProperties(_Model):
    """ContainerApp resource specific properties.

    :ivar provisioning_state: Provisioning state of the Container App. Known values are:
     "InProgress", "Succeeded", "Failed", "Canceled", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.ContainerAppProvisioningState
    :ivar running_status: Running status of the Container App. Known values are: "Progressing",
     "Running", "Stopped", "Suspended", and "Ready".
    :vartype running_status: str or ~azure.mgmt.appcontainers.models.ContainerAppRunningStatus
    :ivar managed_environment_id: Deprecated. Resource ID of the Container App's environment.
    :vartype managed_environment_id: str
    :ivar environment_id: Resource ID of environment.
    :vartype environment_id: str
    :ivar workload_profile_name: Workload profile name to pin for container app execution.
    :vartype workload_profile_name: str
    :ivar latest_revision_name: Name of the latest revision of the Container App.
    :vartype latest_revision_name: str
    :ivar latest_ready_revision_name: Name of the latest ready revision of the Container App.
    :vartype latest_ready_revision_name: str
    :ivar latest_revision_fqdn: Fully Qualified Domain Name of the latest revision of the Container
     App.
    :vartype latest_revision_fqdn: str
    :ivar custom_domain_verification_id: Id used to verify domain name ownership.
    :vartype custom_domain_verification_id: str
    :ivar configuration: Non versioned Container App configuration properties.
    :vartype configuration: ~azure.mgmt.appcontainers.models.Configuration
    :ivar template: Container App versioned application definition.
    :vartype template: ~azure.mgmt.appcontainers.models.Template
    :ivar outbound_ip_addresses: Outbound IP Addresses for container app.
    :vartype outbound_ip_addresses: list[str]
    :ivar event_stream_endpoint: The endpoint of the eventstream of the container app.
    :vartype event_stream_endpoint: str
    """

    provisioning_state: Optional[Union[str, "_models.ContainerAppProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Container App. Known values are: \"InProgress\", \"Succeeded\",
     \"Failed\", \"Canceled\", and \"Deleting\"."""
    running_status: Optional[Union[str, "_models.ContainerAppRunningStatus"]] = rest_field(
        name="runningStatus", visibility=["read"]
    )
    """Running status of the Container App. Known values are: \"Progressing\", \"Running\",
     \"Stopped\", \"Suspended\", and \"Ready\"."""
    managed_environment_id: Optional[str] = rest_field(name="managedEnvironmentId", visibility=["read", "create"])
    """Deprecated. Resource ID of the Container App's environment."""
    environment_id: Optional[str] = rest_field(name="environmentId", visibility=["read", "create"])
    """Resource ID of environment."""
    workload_profile_name: Optional[str] = rest_field(
        name="workloadProfileName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Workload profile name to pin for container app execution."""
    latest_revision_name: Optional[str] = rest_field(name="latestRevisionName", visibility=["read"])
    """Name of the latest revision of the Container App."""
    latest_ready_revision_name: Optional[str] = rest_field(name="latestReadyRevisionName", visibility=["read"])
    """Name of the latest ready revision of the Container App."""
    latest_revision_fqdn: Optional[str] = rest_field(name="latestRevisionFqdn", visibility=["read"])
    """Fully Qualified Domain Name of the latest revision of the Container App."""
    custom_domain_verification_id: Optional[str] = rest_field(name="customDomainVerificationId", visibility=["read"])
    """Id used to verify domain name ownership."""
    configuration: Optional["_models.Configuration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Non versioned Container App configuration properties."""
    template: Optional["_models.Template"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container App versioned application definition."""
    outbound_ip_addresses: Optional[list[str]] = rest_field(name="outboundIpAddresses", visibility=["read"])
    """Outbound IP Addresses for container app."""
    event_stream_endpoint: Optional[str] = rest_field(name="eventStreamEndpoint", visibility=["read"])
    """The endpoint of the eventstream of the container app."""

    @overload
    def __init__(
        self,
        *,
        managed_environment_id: Optional[str] = None,
        environment_id: Optional[str] = None,
        workload_profile_name: Optional[str] = None,
        configuration: Optional["_models.Configuration"] = None,
        template: Optional["_models.Template"] = None,
    ) -> None: ...

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

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


class ContainerAppSecret(_Model):
    """Container App Secret.

    :ivar name: Secret Name.
    :vartype name: str
    :ivar value: Secret Value.
    :vartype value: str
    :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
     System to use a system-assigned identity.
    :vartype identity: str
    :ivar key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
     app.
    :vartype key_vault_url: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Secret Name."""
    value: Optional[str] = rest_field(visibility=["read"])
    """Secret Value."""
    identity: Optional[str] = rest_field(visibility=["read"])
    """Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a
     system-assigned identity."""
    key_vault_url: Optional[str] = rest_field(name="keyVaultUrl", visibility=["read"])
    """Azure Key Vault URL pointing to the secret referenced by the container app."""


class ContainerResources(_Model):
    """Container App container resource requirements.

    :ivar cpu: Required CPU in cores, e.g. 0.5.
    :vartype cpu: float
    :ivar memory: Required memory, e.g. "250Mb".
    :vartype memory: str
    :ivar ephemeral_storage: Ephemeral Storage, e.g. "1Gi".
    :vartype ephemeral_storage: str
    """

    cpu: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required CPU in cores, e.g. 0.5."""
    memory: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required memory, e.g. \"250Mb\"."""
    ephemeral_storage: Optional[str] = rest_field(name="ephemeralStorage", visibility=["read"])
    """Ephemeral Storage, e.g. \"1Gi\"."""

    @overload
    def __init__(
        self,
        *,
        cpu: Optional[float] = None,
        memory: 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 CookieExpiration(_Model):
    """The configuration settings of the session cookie's expiration.

    :ivar convention: The convention used when determining the session cookie's expiration. Known
     values are: "FixedTime" and "IdentityProviderDerived".
    :vartype convention: str or ~azure.mgmt.appcontainers.models.CookieExpirationConvention
    :ivar time_to_expiration: The time after the request is made when the session cookie should
     expire.
    :vartype time_to_expiration: str
    """

    convention: Optional[Union[str, "_models.CookieExpirationConvention"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The convention used when determining the session cookie's expiration. Known values are:
     \"FixedTime\" and \"IdentityProviderDerived\"."""
    time_to_expiration: Optional[str] = rest_field(
        name="timeToExpiration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time after the request is made when the session cookie should expire."""

    @overload
    def __init__(
        self,
        *,
        convention: Optional[Union[str, "_models.CookieExpirationConvention"]] = None,
        time_to_expiration: 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 CorsPolicy(_Model):
    """Cross-Origin-Resource-Sharing policy.

    :ivar allowed_origins: Specifies the content for the access-control-allow-origins header.
     Required.
    :vartype allowed_origins: list[str]
    :ivar allowed_methods: Specifies the content for the access-control-allow-methods header.
    :vartype allowed_methods: list[str]
    :ivar allowed_headers: Specifies the content for the access-control-allow-headers header.
    :vartype allowed_headers: list[str]
    :ivar expose_headers: Specifies the content for the access-control-expose-headers header.
    :vartype expose_headers: list[str]
    :ivar max_age: Specifies the content for the access-control-max-age header.
    :vartype max_age: int
    :ivar allow_credentials: Specifies whether the resource allows credentials.
    :vartype allow_credentials: bool
    """

    allowed_origins: list[str] = rest_field(
        name="allowedOrigins", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the content for the access-control-allow-origins header. Required."""
    allowed_methods: Optional[list[str]] = rest_field(
        name="allowedMethods", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the content for the access-control-allow-methods header."""
    allowed_headers: Optional[list[str]] = rest_field(
        name="allowedHeaders", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the content for the access-control-allow-headers header."""
    expose_headers: Optional[list[str]] = rest_field(
        name="exposeHeaders", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the content for the access-control-expose-headers header."""
    max_age: Optional[int] = rest_field(name="maxAge", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the content for the access-control-max-age header."""
    allow_credentials: Optional[bool] = rest_field(
        name="allowCredentials", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether the resource allows credentials."""

    @overload
    def __init__(
        self,
        *,
        allowed_origins: list[str],
        allowed_methods: Optional[list[str]] = None,
        allowed_headers: Optional[list[str]] = None,
        expose_headers: Optional[list[str]] = None,
        max_age: Optional[int] = None,
        allow_credentials: Optional[bool] = None,
    ) -> None: ...

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

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


class CustomContainerTemplate(_Model):
    """Custom container configuration.

    :ivar registry_credentials: Private container registry credentials for containers used by the
     sessions of the session pool.
    :vartype registry_credentials: ~azure.mgmt.appcontainers.models.SessionRegistryCredentials
    :ivar containers: List of container definitions for the sessions of the session pool.
    :vartype containers: list[~azure.mgmt.appcontainers.models.SessionContainer]
    :ivar ingress: Session pool ingress configuration.
    :vartype ingress: ~azure.mgmt.appcontainers.models.SessionIngress
    """

    registry_credentials: Optional["_models.SessionRegistryCredentials"] = rest_field(
        name="registryCredentials", visibility=["read", "create", "update", "delete", "query"]
    )
    """Private container registry credentials for containers used by the sessions of the session pool."""
    containers: Optional[list["_models.SessionContainer"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of container definitions for the sessions of the session pool."""
    ingress: Optional["_models.SessionIngress"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Session pool ingress configuration."""

    @overload
    def __init__(
        self,
        *,
        registry_credentials: Optional["_models.SessionRegistryCredentials"] = None,
        containers: Optional[list["_models.SessionContainer"]] = None,
        ingress: Optional["_models.SessionIngress"] = None,
    ) -> None: ...

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

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


class CustomDomain(_Model):
    """Custom Domain of a Container App.

    :ivar name: Hostname. Required.
    :vartype name: str
    :ivar binding_type: Custom Domain binding type. Known values are: "Disabled", "SniEnabled", and
     "Auto".
    :vartype binding_type: str or ~azure.mgmt.appcontainers.models.BindingType
    :ivar certificate_id: Resource Id of the Certificate to be bound to this hostname. Must exist
     in the Managed Environment.
    :vartype certificate_id: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Hostname. Required."""
    binding_type: Optional[Union[str, "_models.BindingType"]] = rest_field(
        name="bindingType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom Domain binding type. Known values are: \"Disabled\", \"SniEnabled\", and \"Auto\"."""
    certificate_id: Optional[str] = rest_field(
        name="certificateId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed
     Environment."""

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

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

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


class CustomDomainConfiguration(_Model):
    """Configuration properties for apps environment custom domain.

    :ivar custom_domain_verification_id: Id used to verify domain name ownership.
    :vartype custom_domain_verification_id: str
    :ivar dns_suffix: Dns suffix for the environment domain.
    :vartype dns_suffix: str
    :ivar certificate_key_vault_properties: Certificate stored in Azure Key Vault.
    :vartype certificate_key_vault_properties:
     ~azure.mgmt.appcontainers.models.CertificateKeyVaultProperties
    :ivar certificate_value: PFX or PEM blob.
    :vartype certificate_value: bytes
    :ivar certificate_password: Certificate password.
    :vartype certificate_password: str
    :ivar expiration_date: Certificate expiration date.
    :vartype expiration_date: ~datetime.datetime
    :ivar thumbprint: Certificate thumbprint.
    :vartype thumbprint: str
    :ivar subject_name: Subject name of the certificate.
    :vartype subject_name: str
    """

    custom_domain_verification_id: Optional[str] = rest_field(name="customDomainVerificationId", visibility=["read"])
    """Id used to verify domain name ownership."""
    dns_suffix: Optional[str] = rest_field(name="dnsSuffix", visibility=["read", "create"])
    """Dns suffix for the environment domain."""
    certificate_key_vault_properties: Optional["_models.CertificateKeyVaultProperties"] = rest_field(
        name="certificateKeyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Certificate stored in Azure Key Vault."""
    certificate_value: Optional[bytes] = rest_field(
        name="certificateValue", visibility=["read", "create", "update", "delete", "query"], format="base64"
    )
    """PFX or PEM blob."""
    certificate_password: Optional[str] = rest_field(
        name="certificatePassword", visibility=["read", "create", "update", "delete", "query"]
    )
    """Certificate password."""
    expiration_date: Optional[datetime.datetime] = rest_field(
        name="expirationDate", visibility=["read"], format="rfc3339"
    )
    """Certificate expiration date."""
    thumbprint: Optional[str] = rest_field(visibility=["read"])
    """Certificate thumbprint."""
    subject_name: Optional[str] = rest_field(name="subjectName", visibility=["read"])
    """Subject name of the certificate."""

    @overload
    def __init__(
        self,
        *,
        dns_suffix: Optional[str] = None,
        certificate_key_vault_properties: Optional["_models.CertificateKeyVaultProperties"] = None,
        certificate_value: Optional[bytes] = None,
        certificate_password: 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 CustomHostnameAnalysisResult(_Model):
    """Custom domain analysis.

    :ivar host_name: Host name that was analyzed.
    :vartype host_name: str
    :ivar is_hostname_already_verified: <code>true</code> if hostname is already verified;
     otherwise, <code>false</code>.
    :vartype is_hostname_already_verified: bool
    :ivar custom_domain_verification_test: DNS verification test result. Known values are:
     "Passed", "Failed", and "Skipped".
    :vartype custom_domain_verification_test: str or
     ~azure.mgmt.appcontainers.models.DnsVerificationTestResult
    :ivar custom_domain_verification_failure_info: Raw failure information if DNS verification
     fails.
    :vartype custom_domain_verification_failure_info:
     ~azure.mgmt.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo
    :ivar has_conflict_on_managed_environment: <code>true</code> if there is a conflict on the
     Container App's managed environment; otherwise, <code>false</code>.
    :vartype has_conflict_on_managed_environment: bool
    :ivar conflict_with_environment_custom_domain: <code>true</code> if there is a conflict on the
     Container App's managed environment level custom domain; otherwise, <code>false</code>.
    :vartype conflict_with_environment_custom_domain: bool
    :ivar conflicting_container_app_resource_id: Name of the conflicting Container App on the
     Managed Environment if it's within the same subscription.
    :vartype conflicting_container_app_resource_id: str
    :ivar c_name_records: CName records visible for this hostname.
    :vartype c_name_records: list[str]
    :ivar txt_records: TXT records visible for this hostname.
    :vartype txt_records: list[str]
    :ivar a_records: A records visible for this hostname.
    :vartype a_records: list[str]
    :ivar alternate_c_name_records: Alternate CName records visible for this hostname.
    :vartype alternate_c_name_records: list[str]
    :ivar alternate_txt_records: Alternate TXT records visible for this hostname.
    :vartype alternate_txt_records: list[str]
    """

    host_name: Optional[str] = rest_field(name="hostName", visibility=["read"])
    """Host name that was analyzed."""
    is_hostname_already_verified: Optional[bool] = rest_field(name="isHostnameAlreadyVerified", visibility=["read"])
    """<code>true</code> if hostname is already verified; otherwise, <code>false</code>."""
    custom_domain_verification_test: Optional[Union[str, "_models.DnsVerificationTestResult"]] = rest_field(
        name="customDomainVerificationTest", visibility=["read"]
    )
    """DNS verification test result. Known values are: \"Passed\", \"Failed\", and \"Skipped\"."""
    custom_domain_verification_failure_info: Optional[
        "_models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo"
    ] = rest_field(name="customDomainVerificationFailureInfo", visibility=["read"])
    """Raw failure information if DNS verification fails."""
    has_conflict_on_managed_environment: Optional[bool] = rest_field(
        name="hasConflictOnManagedEnvironment", visibility=["read"]
    )
    """<code>true</code> if there is a conflict on the Container App's managed environment; otherwise,
     <code>false</code>."""
    conflict_with_environment_custom_domain: Optional[bool] = rest_field(
        name="conflictWithEnvironmentCustomDomain", visibility=["read"]
    )
    """<code>true</code> if there is a conflict on the Container App's managed environment level
     custom domain; otherwise, <code>false</code>."""
    conflicting_container_app_resource_id: Optional[str] = rest_field(
        name="conflictingContainerAppResourceId", visibility=["read"]
    )
    """Name of the conflicting Container App on the Managed Environment if it's within the same
     subscription."""
    c_name_records: Optional[list[str]] = rest_field(
        name="cNameRecords", visibility=["read", "create", "update", "delete", "query"]
    )
    """CName records visible for this hostname."""
    txt_records: Optional[list[str]] = rest_field(
        name="txtRecords", visibility=["read", "create", "update", "delete", "query"]
    )
    """TXT records visible for this hostname."""
    a_records: Optional[list[str]] = rest_field(
        name="aRecords", visibility=["read", "create", "update", "delete", "query"]
    )
    """A records visible for this hostname."""
    alternate_c_name_records: Optional[list[str]] = rest_field(
        name="alternateCNameRecords", visibility=["read", "create", "update", "delete", "query"]
    )
    """Alternate CName records visible for this hostname."""
    alternate_txt_records: Optional[list[str]] = rest_field(
        name="alternateTxtRecords", visibility=["read", "create", "update", "delete", "query"]
    )
    """Alternate TXT records visible for this hostname."""

    @overload
    def __init__(
        self,
        *,
        c_name_records: Optional[list[str]] = None,
        txt_records: Optional[list[str]] = None,
        a_records: Optional[list[str]] = None,
        alternate_c_name_records: Optional[list[str]] = None,
        alternate_txt_records: 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 CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo(_Model):  # pylint: disable=name-too-long
    """Raw failure information if DNS verification fails.

    :ivar code: Standardized string to programmatically identify the error.
    :vartype code: str
    :ivar message: Detailed error description and debugging information.
    :vartype message: str
    :ivar target: Detailed error description and debugging information.
    :vartype target: str
    :ivar details: Details or the error.
    :vartype details:
     list[~azure.mgmt.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem]
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """Standardized string to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    target: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    details: Optional[list["_models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem"]] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """Details or the error."""

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

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

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


class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem(
    _Model
):  # pylint: disable=name-too-long
    """Detailed errors.

    :ivar code: Standardized string to programmatically identify the error.
    :vartype code: str
    :ivar message: Detailed error description and debugging information.
    :vartype message: str
    :ivar target: Detailed error description and debugging information.
    :vartype target: str
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """Standardized string to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    target: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""


class CustomOpenIdConnectProvider(_Model):
    """The configuration settings of the custom Open ID Connect provider.

    :ivar enabled: <code>false</code> if the custom Open ID provider provider should not be
     enabled; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the app registration for the custom Open ID
     Connect provider.
    :vartype registration: ~azure.mgmt.appcontainers.models.OpenIdConnectRegistration
    :ivar login: The configuration settings of the login flow of the custom Open ID Connect
     provider.
    :vartype login: ~azure.mgmt.appcontainers.models.OpenIdConnectLogin
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the custom Open ID provider provider should not be enabled; otherwise,
     <code>true</code>."""
    registration: Optional["_models.OpenIdConnectRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the app registration for the custom Open ID Connect provider."""
    login: Optional["_models.OpenIdConnectLogin"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the login flow of the custom Open ID Connect provider."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.OpenIdConnectRegistration"] = None,
        login: Optional["_models.OpenIdConnectLogin"] = None,
    ) -> None: ...

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

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


class CustomScaleRule(_Model):
    """Container App container Custom scaling rule.

    :ivar type: Type of the custom scale rule eg: azure-servicebus, redis etc.
    :vartype type: str
    :ivar metadata: Metadata properties to describe custom scale rule.
    :vartype metadata: dict[str, str]
    :ivar auth: Authentication secrets for the custom scale rule.
    :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Container App, or 'system' for system-assigned identity.
    :vartype identity: str
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of the custom scale rule eg: azure-servicebus, redis etc."""
    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata properties to describe custom scale rule."""
    auth: Optional[list["_models.ScaleRuleAuth"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authentication secrets for the custom scale rule."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Container App, or
     'system' for system-assigned identity."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[str] = None,
        metadata: Optional[dict[str, str]] = None,
        auth: Optional[list["_models.ScaleRuleAuth"]] = None,
        identity: 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 Dapr(_Model):
    """Container App Dapr configuration.

    :ivar enabled: Boolean indicating if the Dapr side car is enabled.
    :vartype enabled: bool
    :ivar app_id: Dapr application identifier.
    :vartype app_id: str
    :ivar app_protocol: Tells Dapr which protocol your application is using. Valid options are http
     and grpc. Default is http. Known values are: "http" and "grpc".
    :vartype app_protocol: str or ~azure.mgmt.appcontainers.models.AppProtocol
    :ivar app_port: Tells Dapr which port your application is listening on.
    :vartype app_port: int
    :ivar http_read_buffer_size: Dapr max size of http header read buffer in KB to handle when
     sending multi-KB headers. Default is 65KB.
    :vartype http_read_buffer_size: int
    :ivar http_max_request_size: Increasing max size of request body http and grpc servers
     parameter in MB to handle uploading of big files. Default is 4 MB.
    :vartype http_max_request_size: int
    :ivar log_level: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn,
     error. Default is info. Known values are: "info", "debug", "warn", and "error".
    :vartype log_level: str or ~azure.mgmt.appcontainers.models.LogLevel
    :ivar enable_api_logging: Enables API logging for the Dapr sidecar.
    :vartype enable_api_logging: bool
    :ivar app_health: Dapr application health check configuration.
    :vartype app_health: ~azure.mgmt.appcontainers.models.DaprAppHealth
    :ivar max_concurrency: Maximum number of concurrent requests, events handled by the Dapr
     sidecar.
    :vartype max_concurrency: int
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Boolean indicating if the Dapr side car is enabled."""
    app_id: Optional[str] = rest_field(name="appId", visibility=["read", "create", "update", "delete", "query"])
    """Dapr application identifier."""
    app_protocol: Optional[Union[str, "_models.AppProtocol"]] = rest_field(
        name="appProtocol", visibility=["read", "create", "update", "delete", "query"]
    )
    """Tells Dapr which protocol your application is using. Valid options are http and grpc. Default
     is http. Known values are: \"http\" and \"grpc\"."""
    app_port: Optional[int] = rest_field(name="appPort", visibility=["read", "create", "update", "delete", "query"])
    """Tells Dapr which port your application is listening on."""
    http_read_buffer_size: Optional[int] = rest_field(
        name="httpReadBufferSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default
     is 65KB."""
    http_max_request_size: Optional[int] = rest_field(
        name="httpMaxRequestSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """Increasing max size of request body http and grpc servers parameter in MB to handle uploading
     of big files. Default is 4 MB."""
    log_level: Optional[Union[str, "_models.LogLevel"]] = rest_field(
        name="logLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default
     is info. Known values are: \"info\", \"debug\", \"warn\", and \"error\"."""
    enable_api_logging: Optional[bool] = rest_field(
        name="enableApiLogging", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enables API logging for the Dapr sidecar."""
    app_health: Optional["_models.DaprAppHealth"] = rest_field(
        name="appHealth", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dapr application health check configuration."""
    max_concurrency: Optional[int] = rest_field(
        name="maxConcurrency", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum number of concurrent requests, events handled by the Dapr sidecar."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        app_id: Optional[str] = None,
        app_protocol: Optional[Union[str, "_models.AppProtocol"]] = None,
        app_port: Optional[int] = None,
        http_read_buffer_size: Optional[int] = None,
        http_max_request_size: Optional[int] = None,
        log_level: Optional[Union[str, "_models.LogLevel"]] = None,
        enable_api_logging: Optional[bool] = None,
        app_health: Optional["_models.DaprAppHealth"] = None,
        max_concurrency: Optional[int] = None,
    ) -> None: ...

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

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


class DaprAppHealth(_Model):
    """Dapr application health check configuration.

    :ivar enabled: Boolean indicating if the health probe is enabled.
    :vartype enabled: bool
    :ivar path: Path for the health probe.
    :vartype path: str
    :ivar probe_interval_seconds: Interval for the health probe in seconds.
    :vartype probe_interval_seconds: int
    :ivar probe_timeout_milliseconds: Timeout for the health probe in milliseconds.
    :vartype probe_timeout_milliseconds: int
    :ivar threshold: Threshold for the health probe.
    :vartype threshold: int
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Boolean indicating if the health probe is enabled."""
    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path for the health probe."""
    probe_interval_seconds: Optional[int] = rest_field(
        name="probeIntervalSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Interval for the health probe in seconds."""
    probe_timeout_milliseconds: Optional[int] = rest_field(
        name="probeTimeoutMilliseconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Timeout for the health probe in milliseconds."""
    threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Threshold for the health probe."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        path: Optional[str] = None,
        probe_interval_seconds: Optional[int] = None,
        probe_timeout_milliseconds: Optional[int] = None,
        threshold: Optional[int] = None,
    ) -> None: ...

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

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


class DaprComponent(ProxyResource):
    """Dapr Component.

    :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.appcontainers.models.SystemData
    :ivar properties: Dapr Component resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.DaprComponentProperties
    """

    properties: Optional["_models.DaprComponentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Dapr Component resource specific properties."""

    __flattened_items = [
        "component_type",
        "version",
        "ignore_errors",
        "init_timeout",
        "secrets",
        "secret_store_component",
        "metadata",
        "scopes",
        "provisioning_state",
        "deployment_errors",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 DaprComponentProperties(_Model):
    """Dapr Component resource specific properties.

    :ivar component_type: Component type.
    :vartype component_type: str
    :ivar version: Component version.
    :vartype version: str
    :ivar ignore_errors: Boolean describing if the component errors are ignores.
    :vartype ignore_errors: bool
    :ivar init_timeout: Initialization timeout.
    :vartype init_timeout: str
    :ivar secrets: Collection of secrets used by a Dapr component.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.Secret]
    :ivar secret_store_component: Name of a Dapr component to retrieve component secrets from.
    :vartype secret_store_component: str
    :ivar metadata: Component metadata.
    :vartype metadata: list[~azure.mgmt.appcontainers.models.DaprMetadata]
    :ivar scopes: Names of container apps that can use this Dapr component.
    :vartype scopes: list[str]
    :ivar provisioning_state: Provisioning state of the Connected Environment Dapr Component. Known
     values are: "Succeeded", "Failed", "Canceled", "InProgress", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.DaprComponentProvisioningState
    :ivar deployment_errors: Any errors that occurred during deployment or deployment validation.
    :vartype deployment_errors: str
    """

    component_type: Optional[str] = rest_field(
        name="componentType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Component type."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Component version."""
    ignore_errors: Optional[bool] = rest_field(
        name="ignoreErrors", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boolean describing if the component errors are ignores."""
    init_timeout: Optional[str] = rest_field(
        name="initTimeout", visibility=["read", "create", "update", "delete", "query"]
    )
    """Initialization timeout."""
    secrets: Optional[list["_models.Secret"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of secrets used by a Dapr component."""
    secret_store_component: Optional[str] = rest_field(
        name="secretStoreComponent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of a Dapr component to retrieve component secrets from."""
    metadata: Optional[list["_models.DaprMetadata"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Component metadata."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Names of container apps that can use this Dapr component."""
    provisioning_state: Optional[Union[str, "_models.DaprComponentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Connected Environment Dapr Component. Known values are:
     \"Succeeded\", \"Failed\", \"Canceled\", \"InProgress\", and \"Deleting\"."""
    deployment_errors: Optional[str] = rest_field(name="deploymentErrors", visibility=["read"])
    """Any errors that occurred during deployment or deployment validation."""

    @overload
    def __init__(
        self,
        *,
        component_type: Optional[str] = None,
        version: Optional[str] = None,
        ignore_errors: Optional[bool] = None,
        init_timeout: Optional[str] = None,
        secrets: Optional[list["_models.Secret"]] = None,
        secret_store_component: Optional[str] = None,
        metadata: Optional[list["_models.DaprMetadata"]] = None,
        scopes: Optional[list[str]] = None,
    ) -> None: ...

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

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


class DaprConfiguration(_Model):
    """Configuration properties Dapr component.

    :ivar version: The version of Dapr.
    :vartype version: str
    """

    version: Optional[str] = rest_field(visibility=["read"])
    """The version of Dapr."""


class DaprMetadata(_Model):
    """Dapr component metadata.

    :ivar name: Metadata property name.
    :vartype name: str
    :ivar value: Metadata property value.
    :vartype value: str
    :ivar secret_ref: Name of the Dapr Component secret from which to pull the metadata property
     value.
    :vartype secret_ref: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata property name."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata property value."""
    secret_ref: Optional[str] = rest_field(name="secretRef", visibility=["read", "create", "update", "delete", "query"])
    """Name of the Dapr Component secret from which to pull the metadata property value."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        value: Optional[str] = None,
        secret_ref: 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 DaprSecret(_Model):
    """Dapr component Secret for ListSecrets Action.

    :ivar name: Secret Name.
    :vartype name: str
    :ivar value: Secret Value.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Secret Name."""
    value: Optional[str] = rest_field(visibility=["read"])
    """Secret Value."""


class DaprSecretsCollection(_Model):
    """Dapr component Secrets Collection for ListSecrets Action.

    :ivar value: Collection of secrets used by a Dapr component. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.DaprSecret]
    """

    value: list["_models.DaprSecret"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of secrets used by a Dapr component. Required."""

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

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

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


class DefaultAuthorizationPolicy(_Model):
    """The configuration settings of the Azure Active Directory default authorization policy.

    :ivar allowed_principals: The configuration settings of the Azure Active Directory allowed
     principals.
    :vartype allowed_principals: ~azure.mgmt.appcontainers.models.AllowedPrincipals
    :ivar allowed_applications: The configuration settings of the Azure Active Directory allowed
     applications.
    :vartype allowed_applications: list[str]
    """

    allowed_principals: Optional["_models.AllowedPrincipals"] = rest_field(
        name="allowedPrincipals", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory allowed principals."""
    allowed_applications: Optional[list[str]] = rest_field(
        name="allowedApplications", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory allowed applications."""

    @overload
    def __init__(
        self,
        *,
        allowed_principals: Optional["_models.AllowedPrincipals"] = None,
        allowed_applications: 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 DefaultErrorResponse(_Model):
    """App Service error response.

    :ivar error: Error model.
    :vartype error: ~azure.mgmt.appcontainers.models.DefaultErrorResponseError
    """

    error: Optional["_models.DefaultErrorResponseError"] = rest_field(visibility=["read"])
    """Error model."""


class DefaultErrorResponseError(_Model):
    """Error model.

    :ivar code: Standardized string to programmatically identify the error.
    :vartype code: str
    :ivar message: Detailed error description and debugging information.
    :vartype message: str
    :ivar target: Detailed error description and debugging information.
    :vartype target: str
    :ivar details: Details or the error.
    :vartype details: list[~azure.mgmt.appcontainers.models.DefaultErrorResponseErrorDetailsItem]
    :ivar innererror: More information to debug error.
    :vartype innererror: str
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """Standardized string to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    target: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    details: Optional[list["_models.DefaultErrorResponseErrorDetailsItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Details or the error."""
    innererror: Optional[str] = rest_field(visibility=["read"])
    """More information to debug error."""

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

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

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


class DefaultErrorResponseErrorDetailsItem(_Model):
    """Detailed errors.

    :ivar code: Standardized string to programmatically identify the error.
    :vartype code: str
    :ivar message: Detailed error description and debugging information.
    :vartype message: str
    :ivar target: Detailed error description and debugging information.
    :vartype target: str
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """Standardized string to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""
    target: Optional[str] = rest_field(visibility=["read"])
    """Detailed error description and debugging information."""


class DiagnosticDataProviderMetadata(_Model):
    """Details of a diagnostics data provider.

    :ivar provider_name: Name of data provider.
    :vartype provider_name: str
    :ivar property_bag: Collection of properties.
    :vartype property_bag:
     list[~azure.mgmt.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem]
    """

    provider_name: Optional[str] = rest_field(
        name="providerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of data provider."""
    property_bag: Optional[list["_models.DiagnosticDataProviderMetadataPropertyBagItem"]] = rest_field(
        name="propertyBag", visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of properties."""

    @overload
    def __init__(
        self,
        *,
        provider_name: Optional[str] = None,
        property_bag: Optional[list["_models.DiagnosticDataProviderMetadataPropertyBagItem"]] = None,
    ) -> None: ...

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

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


class DiagnosticDataProviderMetadataPropertyBagItem(_Model):  # pylint: disable=name-too-long
    """Property details.

    :ivar name: Property name.
    :vartype name: str
    :ivar value: Property value.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Property name."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Property value."""

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

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

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


class DiagnosticDataTableResponseColumn(_Model):
    """Diagnostics data column.

    :ivar column_name: Column name.
    :vartype column_name: str
    :ivar data_type: Data type of the column.
    :vartype data_type: str
    :ivar column_type: Column type.
    :vartype column_type: str
    """

    column_name: Optional[str] = rest_field(
        name="columnName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Column name."""
    data_type: Optional[str] = rest_field(name="dataType", visibility=["read", "create", "update", "delete", "query"])
    """Data type of the column."""
    column_type: Optional[str] = rest_field(
        name="columnType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Column type."""

    @overload
    def __init__(
        self,
        *,
        column_name: Optional[str] = None,
        data_type: Optional[str] = None,
        column_type: Optional[str] = None,
    ) -> None: ...

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

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


class DiagnosticDataTableResponseObject(_Model):
    """Diagnostics data table.

    :ivar table_name: Table name.
    :vartype table_name: str
    :ivar columns: Columns in the table.
    :vartype columns: list[~azure.mgmt.appcontainers.models.DiagnosticDataTableResponseColumn]
    :ivar rows: Rows in the table.
    :vartype rows: list[any]
    """

    table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"])
    """Table name."""
    columns: Optional[list["_models.DiagnosticDataTableResponseColumn"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Columns in the table."""
    rows: Optional[list[Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Rows in the table."""

    @overload
    def __init__(
        self,
        *,
        table_name: Optional[str] = None,
        columns: Optional[list["_models.DiagnosticDataTableResponseColumn"]] = None,
        rows: Optional[list[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 DiagnosticRendering(_Model):
    """Rendering details of a diagnostics table.

    :ivar type: Rendering type.
    :vartype type: int
    :ivar title: Title of the table.
    :vartype title: str
    :ivar description: Description of the table.
    :vartype description: str
    :ivar is_visible: Flag if the table should be rendered.
    :vartype is_visible: bool
    """

    type: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Rendering type."""
    title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Title of the table."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the table."""
    is_visible: Optional[bool] = rest_field(
        name="isVisible", visibility=["read", "create", "update", "delete", "query"]
    )
    """Flag if the table should be rendered."""

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

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

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


class Diagnostics(ProxyResource):
    """Diagnostics data for a 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.appcontainers.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: ~azure.mgmt.appcontainers.models.DiagnosticsProperties
    """

    properties: Optional["_models.DiagnosticsProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource-specific properties for this resource."""

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

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

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


class DiagnosticsCollection(_Model):
    """Diagnostics data collection for a resource.

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

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

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

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

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


class DiagnosticsDataApiResponse(_Model):
    """Diagnostics data returned from a detector.

    :ivar table: Table response.
    :vartype table: ~azure.mgmt.appcontainers.models.DiagnosticDataTableResponseObject
    :ivar rendering_properties: Details of the table response.
    :vartype rendering_properties: ~azure.mgmt.appcontainers.models.DiagnosticRendering
    """

    table: Optional["_models.DiagnosticDataTableResponseObject"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Table response."""
    rendering_properties: Optional["_models.DiagnosticRendering"] = rest_field(
        name="renderingProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details of the table response."""

    @overload
    def __init__(
        self,
        *,
        table: Optional["_models.DiagnosticDataTableResponseObject"] = None,
        rendering_properties: Optional["_models.DiagnosticRendering"] = None,
    ) -> None: ...

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

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


class DiagnosticsDefinition(_Model):
    """Metadata of the diagnostics response.

    :ivar id: Unique detector name.
    :vartype id: str
    :ivar name: Display Name of the detector.
    :vartype name: str
    :ivar description: Details of the diagnostics info.
    :vartype description: str
    :ivar author: Authors' names of the detector.
    :vartype author: str
    :ivar category: Category of the detector.
    :vartype category: str
    :ivar support_topic_list: List of support topics.
    :vartype support_topic_list: list[~azure.mgmt.appcontainers.models.DiagnosticSupportTopic]
    :ivar analysis_types: List of analysis types.
    :vartype analysis_types: list[str]
    :ivar type: Authors' names of the detector.
    :vartype type: str
    :ivar score: Authors' names of the detector.
    :vartype score: float
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Unique detector name."""
    name: Optional[str] = rest_field(visibility=["read"])
    """Display Name of the detector."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Details of the diagnostics info."""
    author: Optional[str] = rest_field(visibility=["read"])
    """Authors' names of the detector."""
    category: Optional[str] = rest_field(visibility=["read"])
    """Category of the detector."""
    support_topic_list: Optional[list["_models.DiagnosticSupportTopic"]] = rest_field(
        name="supportTopicList", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of support topics."""
    analysis_types: Optional[list[str]] = rest_field(
        name="analysisTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of analysis types."""
    type: Optional[str] = rest_field(visibility=["read"])
    """Authors' names of the detector."""
    score: Optional[float] = rest_field(visibility=["read"])
    """Authors' names of the detector."""

    @overload
    def __init__(
        self,
        *,
        support_topic_list: Optional[list["_models.DiagnosticSupportTopic"]] = None,
        analysis_types: Optional[list[str]] = None,
    ) -> None: ...

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

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


class DiagnosticsProperties(_Model):
    """Diagnostics resource specific properties.

    :ivar metadata: Metadata of the diagnostics response.
    :vartype metadata: ~azure.mgmt.appcontainers.models.DiagnosticsDefinition
    :ivar dataset: Set of data collections associated with the response.
    :vartype dataset: list[~azure.mgmt.appcontainers.models.DiagnosticsDataApiResponse]
    :ivar status: Status of the diagnostics response.
    :vartype status: ~azure.mgmt.appcontainers.models.DiagnosticsStatus
    :ivar data_provider_metadata: List of data providers' metadata.
    :vartype data_provider_metadata:
     ~azure.mgmt.appcontainers.models.DiagnosticDataProviderMetadata
    """

    metadata: Optional["_models.DiagnosticsDefinition"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Metadata of the diagnostics response."""
    dataset: Optional[list["_models.DiagnosticsDataApiResponse"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Set of data collections associated with the response."""
    status: Optional["_models.DiagnosticsStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status of the diagnostics response."""
    data_provider_metadata: Optional["_models.DiagnosticDataProviderMetadata"] = rest_field(
        name="dataProviderMetadata", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of data providers' metadata."""

    @overload
    def __init__(
        self,
        *,
        metadata: Optional["_models.DiagnosticsDefinition"] = None,
        dataset: Optional[list["_models.DiagnosticsDataApiResponse"]] = None,
        status: Optional["_models.DiagnosticsStatus"] = None,
        data_provider_metadata: Optional["_models.DiagnosticDataProviderMetadata"] = None,
    ) -> None: ...

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

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


class DiagnosticsStatus(_Model):
    """Rendering details of a diagnostics table.

    :ivar message: Diagnostic message.
    :vartype message: str
    :ivar status_id: Status.
    :vartype status_id: int
    """

    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Diagnostic message."""
    status_id: Optional[int] = rest_field(name="statusId", visibility=["read", "create", "update", "delete", "query"])
    """Status."""

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

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

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


class DiagnosticSupportTopic(_Model):
    """Support topic information.

    :ivar id: Unique topic identifier.
    :vartype id: str
    :ivar pes_id: PES identifier.
    :vartype pes_id: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Unique topic identifier."""
    pes_id: Optional[str] = rest_field(name="pesId", visibility=["read"])
    """PES identifier."""


class DynamicPoolConfiguration(_Model):
    """Dynamic pool configuration.

    :ivar lifecycle_configuration: The lifecycle configuration of a session in the dynamic session
     pool.
    :vartype lifecycle_configuration: ~azure.mgmt.appcontainers.models.LifecycleConfiguration
    """

    lifecycle_configuration: Optional["_models.LifecycleConfiguration"] = rest_field(
        name="lifecycleConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The lifecycle configuration of a session in the dynamic session pool."""

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

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

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


class EncryptionSettings(_Model):
    """The configuration settings of the secrets references of encryption key and signing key for
    ContainerApp Service Authentication/Authorization.

    :ivar container_app_auth_encryption_secret_name: The secret name which is referenced for
     EncryptionKey.
    :vartype container_app_auth_encryption_secret_name: str
    :ivar container_app_auth_signing_secret_name: The secret name which is referenced for
     SigningKey.
    :vartype container_app_auth_signing_secret_name: str
    """

    container_app_auth_encryption_secret_name: Optional[str] = rest_field(
        name="containerAppAuthEncryptionSecretName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The secret name which is referenced for EncryptionKey."""
    container_app_auth_signing_secret_name: Optional[str] = rest_field(
        name="containerAppAuthSigningSecretName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The secret name which is referenced for SigningKey."""

    @overload
    def __init__(
        self,
        *,
        container_app_auth_encryption_secret_name: Optional[str] = None,
        container_app_auth_signing_secret_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 EnvironmentAuthToken(TrackedResource):
    """Environment Auth Token.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Environment auth token resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.EnvironmentAuthTokenProperties
    """

    properties: Optional["_models.EnvironmentAuthTokenProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Environment auth token resource specific properties."""

    __flattened_items = ["token", "expires"]

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

    @overload
    def __init__(self, mapping: Mapping[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 EnvironmentAuthTokenProperties(_Model):
    """Environment auth token resource specific properties.

    :ivar token: Auth token value.
    :vartype token: str
    :ivar expires: Token expiration date.
    :vartype expires: ~datetime.datetime
    """

    token: Optional[str] = rest_field(visibility=["read"])
    """Auth token value."""
    expires: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Token expiration date."""


class EnvironmentVar(_Model):
    """Container App container environment variable.

    :ivar name: Environment variable name.
    :vartype name: str
    :ivar value: Non-secret environment variable value.
    :vartype value: str
    :ivar secret_ref: Name of the Container App secret from which to pull the environment variable
     value.
    :vartype secret_ref: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Environment variable name."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Non-secret environment variable value."""
    secret_ref: Optional[str] = rest_field(name="secretRef", visibility=["read", "create", "update", "delete", "query"])
    """Name of the Container App secret from which to pull the environment variable value."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        value: Optional[str] = None,
        secret_ref: 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 ErrorAdditionalInfo(_Model):
    """The resource management error additional info.

    :ivar type: The additional info type.
    :vartype type: str
    :ivar info: The additional info.
    :vartype info: any
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """The additional info type."""
    info: Optional[Any] = rest_field(visibility=["read"])
    """The additional info."""


class ErrorDetail(_Model):
    """The error detail.

    :ivar code: The error code.
    :vartype code: str
    :ivar message: The error message.
    :vartype message: str
    :ivar target: The error target.
    :vartype target: str
    :ivar details: The error details.
    :vartype details: list[~azure.mgmt.appcontainers.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.appcontainers.models.ErrorAdditionalInfo]
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """The error code."""
    message: Optional[str] = rest_field(visibility=["read"])
    """The error message."""
    target: Optional[str] = rest_field(visibility=["read"])
    """The error target."""
    details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"])
    """The error details."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class ErrorEntity(_Model):
    """Body of the error response returned from the API.

    :ivar extended_code: Type of error.
    :vartype extended_code: str
    :ivar message_template: Message template.
    :vartype message_template: str
    :ivar parameters: Parameters for the template.
    :vartype parameters: list[str]
    :ivar inner_errors: Inner errors.
    :vartype inner_errors: list[~azure.mgmt.appcontainers.models.ErrorEntity]
    :ivar details: Error Details.
    :vartype details: list[~azure.mgmt.appcontainers.models.ErrorEntity]
    :ivar target: The error target.
    :vartype target: str
    :ivar code: Basic error code.
    :vartype code: str
    :ivar message: Any details of the error.
    :vartype message: str
    """

    extended_code: Optional[str] = rest_field(
        name="extendedCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of error."""
    message_template: Optional[str] = rest_field(
        name="messageTemplate", visibility=["read", "create", "update", "delete", "query"]
    )
    """Message template."""
    parameters: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Parameters for the template."""
    inner_errors: Optional[list["_models.ErrorEntity"]] = rest_field(
        name="innerErrors", visibility=["read", "create", "update", "delete", "query"]
    )
    """Inner errors."""
    details: Optional[list["_models.ErrorEntity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Error Details."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error target."""
    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Basic error code."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Any details of the error."""

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

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

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


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

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.appcontainers.models.ErrorDetail
    """

    error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error object."""

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

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

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


class ExtendedLocation(_Model):
    """The complex type of the extended location.

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

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

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

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

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


class Facebook(_Model):
    """The configuration settings of the Facebook provider.

    :ivar enabled: <code>false</code> if the Facebook provider should not be enabled despite the
     set registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the app registration for the Facebook
     provider.
    :vartype registration: ~azure.mgmt.appcontainers.models.AppRegistration
    :ivar graph_api_version: The version of the Facebook api to be used while logging in.
    :vartype graph_api_version: str
    :ivar login: The configuration settings of the login flow.
    :vartype login: ~azure.mgmt.appcontainers.models.LoginScopes
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Facebook provider should not be enabled despite the set registration;
     otherwise, <code>true</code>."""
    registration: Optional["_models.AppRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the app registration for the Facebook provider."""
    graph_api_version: Optional[str] = rest_field(
        name="graphApiVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The version of the Facebook api to be used while logging in."""
    login: Optional["_models.LoginScopes"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the login flow."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.AppRegistration"] = None,
        graph_api_version: Optional[str] = None,
        login: Optional["_models.LoginScopes"] = None,
    ) -> None: ...

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

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


class ForwardProxy(_Model):
    """The configuration settings of a forward proxy used to make the requests.

    :ivar convention: The convention used to determine the url of the request made. Known values
     are: "NoProxy", "Standard", and "Custom".
    :vartype convention: str or ~azure.mgmt.appcontainers.models.ForwardProxyConvention
    :ivar custom_host_header_name: The name of the header containing the host of the request.
    :vartype custom_host_header_name: str
    :ivar custom_proto_header_name: The name of the header containing the scheme of the request.
    :vartype custom_proto_header_name: str
    """

    convention: Optional[Union[str, "_models.ForwardProxyConvention"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The convention used to determine the url of the request made. Known values are: \"NoProxy\",
     \"Standard\", and \"Custom\"."""
    custom_host_header_name: Optional[str] = rest_field(
        name="customHostHeaderName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the header containing the host of the request."""
    custom_proto_header_name: Optional[str] = rest_field(
        name="customProtoHeaderName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the header containing the scheme of the request."""

    @overload
    def __init__(
        self,
        *,
        convention: Optional[Union[str, "_models.ForwardProxyConvention"]] = None,
        custom_host_header_name: Optional[str] = None,
        custom_proto_header_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 GitHub(_Model):
    """The configuration settings of the GitHub provider.

    :ivar enabled: <code>false</code> if the GitHub provider should not be enabled despite the set
     registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the app registration for the GitHub provider.
    :vartype registration: ~azure.mgmt.appcontainers.models.ClientRegistration
    :ivar login: The configuration settings of the login flow.
    :vartype login: ~azure.mgmt.appcontainers.models.LoginScopes
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the GitHub provider should not be enabled despite the set registration;
     otherwise, <code>true</code>."""
    registration: Optional["_models.ClientRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the app registration for the GitHub provider."""
    login: Optional["_models.LoginScopes"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the login flow."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.ClientRegistration"] = None,
        login: Optional["_models.LoginScopes"] = None,
    ) -> None: ...

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

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


class GithubActionConfiguration(_Model):
    """Configuration properties that define the mutable settings of a Container App SourceControl.

    :ivar registry_info: Registry configurations.
    :vartype registry_info: ~azure.mgmt.appcontainers.models.RegistryInfo
    :ivar azure_credentials: AzureCredentials configurations.
    :vartype azure_credentials: ~azure.mgmt.appcontainers.models.AzureCredentials
    :ivar context_path: Context path.
    :vartype context_path: str
    :ivar github_personal_access_token: One time Github PAT to configure github environment.
    :vartype github_personal_access_token: str
    :ivar image: Image name.
    :vartype image: str
    :ivar publish_type: Code or Image.
    :vartype publish_type: str
    :ivar os: Operation system.
    :vartype os: str
    :ivar runtime_stack: Runtime stack.
    :vartype runtime_stack: str
    :ivar runtime_version: Runtime version.
    :vartype runtime_version: str
    """

    registry_info: Optional["_models.RegistryInfo"] = rest_field(
        name="registryInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """Registry configurations."""
    azure_credentials: Optional["_models.AzureCredentials"] = rest_field(
        name="azureCredentials", visibility=["read", "create", "update", "delete", "query"]
    )
    """AzureCredentials configurations."""
    context_path: Optional[str] = rest_field(
        name="contextPath", visibility=["read", "create", "update", "delete", "query"]
    )
    """Context path."""
    github_personal_access_token: Optional[str] = rest_field(
        name="githubPersonalAccessToken", visibility=["create", "update"]
    )
    """One time Github PAT to configure github environment."""
    image: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Image name."""
    publish_type: Optional[str] = rest_field(
        name="publishType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Code or Image."""
    os: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Operation system."""
    runtime_stack: Optional[str] = rest_field(
        name="runtimeStack", visibility=["read", "create", "update", "delete", "query"]
    )
    """Runtime stack."""
    runtime_version: Optional[str] = rest_field(
        name="runtimeVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Runtime version."""

    @overload
    def __init__(
        self,
        *,
        registry_info: Optional["_models.RegistryInfo"] = None,
        azure_credentials: Optional["_models.AzureCredentials"] = None,
        context_path: Optional[str] = None,
        github_personal_access_token: Optional[str] = None,
        image: Optional[str] = None,
        publish_type: Optional[str] = None,
        os: Optional[str] = None,
        runtime_stack: Optional[str] = None,
        runtime_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 GlobalValidation(_Model):
    """The configuration settings that determines the validation flow of users using ContainerApp
    Service Authentication/Authorization.

    :ivar unauthenticated_client_action: The action to take when an unauthenticated client attempts
     to access the app. Known values are: "RedirectToLoginPage", "AllowAnonymous", "Return401", and
     "Return403".
    :vartype unauthenticated_client_action: str or
     ~azure.mgmt.appcontainers.models.UnauthenticatedClientActionV2
    :ivar redirect_to_provider: The default authentication provider to use when multiple providers
     are configured. This setting is only needed if multiple providers are configured and the
     unauthenticated client action is set to "RedirectToLoginPage".
    :vartype redirect_to_provider: str
    :ivar excluded_paths: The paths for which unauthenticated flow would not be redirected to the
     login page.
    :vartype excluded_paths: list[str]
    """

    unauthenticated_client_action: Optional[Union[str, "_models.UnauthenticatedClientActionV2"]] = rest_field(
        name="unauthenticatedClientAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """The action to take when an unauthenticated client attempts to access the app. Known values are:
     \"RedirectToLoginPage\", \"AllowAnonymous\", \"Return401\", and \"Return403\"."""
    redirect_to_provider: Optional[str] = rest_field(
        name="redirectToProvider", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default authentication provider to use when multiple providers are configured. This setting
     is only needed if multiple providers are configured and the unauthenticated client action is
     set to \"RedirectToLoginPage\"."""
    excluded_paths: Optional[list[str]] = rest_field(
        name="excludedPaths", visibility=["read", "create", "update", "delete", "query"]
    )
    """The paths for which unauthenticated flow would not be redirected to the login page."""

    @overload
    def __init__(
        self,
        *,
        unauthenticated_client_action: Optional[Union[str, "_models.UnauthenticatedClientActionV2"]] = None,
        redirect_to_provider: Optional[str] = None,
        excluded_paths: 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 Google(_Model):
    """The configuration settings of the Google provider.

    :ivar enabled: <code>false</code> if the Google provider should not be enabled despite the set
     registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the app registration for the Google provider.
    :vartype registration: ~azure.mgmt.appcontainers.models.ClientRegistration
    :ivar login: The configuration settings of the login flow.
    :vartype login: ~azure.mgmt.appcontainers.models.LoginScopes
    :ivar validation: The configuration settings of the Azure Active Directory token validation
     flow.
    :vartype validation: ~azure.mgmt.appcontainers.models.AllowedAudiencesValidation
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Google provider should not be enabled despite the set registration;
     otherwise, <code>true</code>."""
    registration: Optional["_models.ClientRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the app registration for the Google provider."""
    login: Optional["_models.LoginScopes"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the login flow."""
    validation: Optional["_models.AllowedAudiencesValidation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active Directory token validation flow."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        registration: Optional["_models.ClientRegistration"] = None,
        login: Optional["_models.LoginScopes"] = None,
        validation: Optional["_models.AllowedAudiencesValidation"] = None,
    ) -> None: ...

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

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


class HttpRoute(_Model):
    """Http Routes, including paths to match on and whether or not rewrites are to be done.

    :ivar match: Conditions route will match on.
    :vartype match: ~azure.mgmt.appcontainers.models.HttpRouteMatch
    :ivar action: Once route is matched, what is the desired action.
    :vartype action: ~azure.mgmt.appcontainers.models.HttpRouteAction
    """

    match: Optional["_models.HttpRouteMatch"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Conditions route will match on."""
    action: Optional["_models.HttpRouteAction"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Once route is matched, what is the desired action."""

    @overload
    def __init__(
        self,
        *,
        match: Optional["_models.HttpRouteMatch"] = None,
        action: Optional["_models.HttpRouteAction"] = None,
    ) -> None: ...

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

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


class HttpRouteAction(_Model):
    """Action to perform once matching of routes is done.

    :ivar prefix_rewrite: Rewrite prefix, default is no rewrites.
    :vartype prefix_rewrite: str
    """

    prefix_rewrite: Optional[str] = rest_field(
        name="prefixRewrite", visibility=["read", "create", "update", "delete", "query"]
    )
    """Rewrite prefix, default is no rewrites."""

    @overload
    def __init__(
        self,
        *,
        prefix_rewrite: 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 HttpRouteConfig(ProxyResource):
    """A set of host names and http request routing rules for a Container App Environment.

    :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.appcontainers.models.SystemData
    :ivar properties: Http Route Config properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.HttpRouteConfigProperties
    """

    properties: Optional["_models.HttpRouteConfigProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Http Route Config properties."""

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

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

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


class HttpRouteConfigProperties(_Model):
    """Http Route Config properties.

    :ivar provisioning_state: The provisioning state of the Http Route Config in cluster. Known
     values are: "Succeeded", "Failed", "Canceled", "Waiting", "Updating", "Deleting", and
     "Pending".
    :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.HttpRouteProvisioningState
    :ivar provisioning_errors: List of errors when trying to reconcile http routes.
    :vartype provisioning_errors:
     list[~azure.mgmt.appcontainers.models.HttpRouteProvisioningErrors]
    :ivar fqdn: FQDN of the route resource.
    :vartype fqdn: str
    :ivar custom_domains: Custom domain bindings for http Routes' hostnames.
    :vartype custom_domains: list[~azure.mgmt.appcontainers.models.CustomDomain]
    :ivar rules: Routing Rules for http route resource.
    :vartype rules: list[~azure.mgmt.appcontainers.models.HttpRouteRule]
    """

    provisioning_state: Optional[Union[str, "_models.HttpRouteProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the Http Route Config in cluster. Known values are: \"Succeeded\",
     \"Failed\", \"Canceled\", \"Waiting\", \"Updating\", \"Deleting\", and \"Pending\"."""
    provisioning_errors: Optional[list["_models.HttpRouteProvisioningErrors"]] = rest_field(
        name="provisioningErrors", visibility=["read"]
    )
    """List of errors when trying to reconcile http routes."""
    fqdn: Optional[str] = rest_field(visibility=["read"])
    """FQDN of the route resource."""
    custom_domains: Optional[list["_models.CustomDomain"]] = rest_field(
        name="customDomains", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom domain bindings for http Routes' hostnames."""
    rules: Optional[list["_models.HttpRouteRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Routing Rules for http route resource."""

    @overload
    def __init__(
        self,
        *,
        custom_domains: Optional[list["_models.CustomDomain"]] = None,
        rules: Optional[list["_models.HttpRouteRule"]] = None,
    ) -> None: ...

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

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


class HttpRouteMatch(_Model):
    """Criteria to match on.

    :ivar prefix: match on all prefix's. Not exact.
    :vartype prefix: str
    :ivar path: match on exact path.
    :vartype path: str
    :ivar path_separated_prefix: match on all prefix's. Not exact.
    :vartype path_separated_prefix: str
    :ivar case_sensitive: path case sensitive, default is true.
    :vartype case_sensitive: bool
    """

    prefix: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """match on all prefix's. Not exact."""
    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """match on exact path."""
    path_separated_prefix: Optional[str] = rest_field(
        name="pathSeparatedPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """match on all prefix's. Not exact."""
    case_sensitive: Optional[bool] = rest_field(
        name="caseSensitive", visibility=["read", "create", "update", "delete", "query"]
    )
    """path case sensitive, default is true."""

    @overload
    def __init__(
        self,
        *,
        prefix: Optional[str] = None,
        path: Optional[str] = None,
        path_separated_prefix: Optional[str] = None,
        case_sensitive: Optional[bool] = None,
    ) -> None: ...

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

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


class HttpRouteProvisioningErrors(_Model):
    """List of provisioning errors for a Http Route Config object.

    :ivar timestamp: Timestamp error occured at.
    :vartype timestamp: ~datetime.datetime
    :ivar message: Description or error message.
    :vartype message: str
    """

    timestamp: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339")
    """Timestamp error occured at."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Description or error message."""


class HttpRouteRule(_Model):
    """A set of routing conditions and targets.

    :ivar targets: Targets- container apps, revisions, labels.
    :vartype targets: list[~azure.mgmt.appcontainers.models.HttpRouteTarget]
    :ivar routes: Routing configuration that will allow matches on specific paths/headers.
    :vartype routes: list[~azure.mgmt.appcontainers.models.HttpRoute]
    :ivar description: Description of rule. Optional.
    :vartype description: str
    """

    targets: Optional[list["_models.HttpRouteTarget"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Targets- container apps, revisions, labels."""
    routes: Optional[list["_models.HttpRoute"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Routing configuration that will allow matches on specific paths/headers."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of rule. Optional."""

    @overload
    def __init__(
        self,
        *,
        targets: Optional[list["_models.HttpRouteTarget"]] = None,
        routes: Optional[list["_models.HttpRoute"]] = None,
        description: Optional[str] = None,
    ) -> None: ...

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

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


class HttpRouteTarget(_Model):
    """Targets - Container App Names, Revision Names, Labels.

    :ivar container_app: Container App Name to route requests to. Required.
    :vartype container_app: str
    :ivar revision: Revision to route requests to.
    :vartype revision: str
    :ivar label: Label to route requests to.
    :vartype label: str
    """

    container_app: str = rest_field(name="containerApp", visibility=["read", "create", "update", "delete", "query"])
    """Container App Name to route requests to. Required."""
    revision: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Revision to route requests to."""
    label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Label to route requests to."""

    @overload
    def __init__(
        self,
        *,
        container_app: str,
        revision: Optional[str] = None,
        label: 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 HttpScaleRule(_Model):
    """Container App container Http scaling rule.

    :ivar metadata: Metadata properties to describe http scale rule.
    :vartype metadata: dict[str, str]
    :ivar auth: Authentication secrets for the custom scale rule.
    :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Container App, or 'system' for system-assigned identity.
    :vartype identity: str
    """

    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata properties to describe http scale rule."""
    auth: Optional[list["_models.ScaleRuleAuth"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authentication secrets for the custom scale rule."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Container App, or
     'system' for system-assigned identity."""

    @overload
    def __init__(
        self,
        *,
        metadata: Optional[dict[str, str]] = None,
        auth: Optional[list["_models.ScaleRuleAuth"]] = None,
        identity: 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 HttpSettings(_Model):
    """The configuration settings of the HTTP requests for authentication and authorization requests
    made against ContainerApp Service Authentication/Authorization.

    :ivar require_https: <code>false</code> if the authentication/authorization responses not
     having the HTTPS scheme are permissible; otherwise, <code>true</code>.
    :vartype require_https: bool
    :ivar routes: The configuration settings of the paths HTTP requests.
    :vartype routes: ~azure.mgmt.appcontainers.models.HttpSettingsRoutes
    :ivar forward_proxy: The configuration settings of a forward proxy used to make the requests.
    :vartype forward_proxy: ~azure.mgmt.appcontainers.models.ForwardProxy
    """

    require_https: Optional[bool] = rest_field(
        name="requireHttps", visibility=["read", "create", "update", "delete", "query"]
    )
    """<code>false</code> if the authentication/authorization responses not having the HTTPS scheme
     are permissible; otherwise, <code>true</code>."""
    routes: Optional["_models.HttpSettingsRoutes"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the paths HTTP requests."""
    forward_proxy: Optional["_models.ForwardProxy"] = rest_field(
        name="forwardProxy", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of a forward proxy used to make the requests."""

    @overload
    def __init__(
        self,
        *,
        require_https: Optional[bool] = None,
        routes: Optional["_models.HttpSettingsRoutes"] = None,
        forward_proxy: Optional["_models.ForwardProxy"] = None,
    ) -> None: ...

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

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


class HttpSettingsRoutes(_Model):
    """The configuration settings of the paths HTTP requests.

    :ivar api_prefix: The prefix that should precede all the authentication/authorization paths.
    :vartype api_prefix: str
    """

    api_prefix: Optional[str] = rest_field(name="apiPrefix", visibility=["read", "create", "update", "delete", "query"])
    """The prefix that should precede all the authentication/authorization paths."""

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

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

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


class IdentityProviders(_Model):
    """The configuration settings of each of the identity providers used to configure ContainerApp
    Service Authentication/Authorization.

    :ivar azure_active_directory: The configuration settings of the Azure Active directory
     provider.
    :vartype azure_active_directory: ~azure.mgmt.appcontainers.models.AzureActiveDirectory
    :ivar facebook: The configuration settings of the Facebook provider.
    :vartype facebook: ~azure.mgmt.appcontainers.models.Facebook
    :ivar git_hub: The configuration settings of the GitHub provider.
    :vartype git_hub: ~azure.mgmt.appcontainers.models.GitHub
    :ivar google: The configuration settings of the Google provider.
    :vartype google: ~azure.mgmt.appcontainers.models.Google
    :ivar twitter: The configuration settings of the Twitter provider.
    :vartype twitter: ~azure.mgmt.appcontainers.models.Twitter
    :ivar apple: The configuration settings of the Apple provider.
    :vartype apple: ~azure.mgmt.appcontainers.models.Apple
    :ivar azure_static_web_apps: The configuration settings of the Azure Static Web Apps provider.
    :vartype azure_static_web_apps: ~azure.mgmt.appcontainers.models.AzureStaticWebApps
    :ivar custom_open_id_connect_providers: The map of the name of the alias of each custom Open ID
     Connect provider to the configuration settings of the custom Open ID Connect provider.
    :vartype custom_open_id_connect_providers: dict[str,
     ~azure.mgmt.appcontainers.models.CustomOpenIdConnectProvider]
    """

    azure_active_directory: Optional["_models.AzureActiveDirectory"] = rest_field(
        name="azureActiveDirectory", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Active directory provider."""
    facebook: Optional["_models.Facebook"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the Facebook provider."""
    git_hub: Optional["_models.GitHub"] = rest_field(
        name="gitHub", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the GitHub provider."""
    google: Optional["_models.Google"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the Google provider."""
    twitter: Optional["_models.Twitter"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the Twitter provider."""
    apple: Optional["_models.Apple"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the Apple provider."""
    azure_static_web_apps: Optional["_models.AzureStaticWebApps"] = rest_field(
        name="azureStaticWebApps", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the Azure Static Web Apps provider."""
    custom_open_id_connect_providers: Optional[dict[str, "_models.CustomOpenIdConnectProvider"]] = rest_field(
        name="customOpenIdConnectProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """The map of the name of the alias of each custom Open ID Connect provider to the configuration
     settings of the custom Open ID Connect provider."""

    @overload
    def __init__(
        self,
        *,
        azure_active_directory: Optional["_models.AzureActiveDirectory"] = None,
        facebook: Optional["_models.Facebook"] = None,
        git_hub: Optional["_models.GitHub"] = None,
        google: Optional["_models.Google"] = None,
        twitter: Optional["_models.Twitter"] = None,
        apple: Optional["_models.Apple"] = None,
        azure_static_web_apps: Optional["_models.AzureStaticWebApps"] = None,
        custom_open_id_connect_providers: Optional[dict[str, "_models.CustomOpenIdConnectProvider"]] = None,
    ) -> None: ...

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

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


class IdentitySettings(_Model):
    """Optional settings for a Managed Identity that is assigned to the Container App.

    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Container App, or 'system' for system-assigned identity. Required.
    :vartype identity: str
    :ivar lifecycle: Use to select the lifecycle stages of a Container App during which the Managed
     Identity should be available. Known values are: "None", "Main", "Init", and "All".
    :vartype lifecycle: str or ~azure.mgmt.appcontainers.models.IdentitySettingsLifeCycle
    """

    identity: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Container App, or
     'system' for system-assigned identity. Required."""
    lifecycle: Optional[Union[str, "_models.IdentitySettingsLifeCycle"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Use to select the lifecycle stages of a Container App during which the Managed Identity should
     be available. Known values are: \"None\", \"Main\", \"Init\", and \"All\"."""

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

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

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


class Ingress(_Model):
    """Container App Ingress configuration.

    :ivar fqdn: Hostname.
    :vartype fqdn: str
    :ivar external: Bool indicating if app exposes an external http endpoint.
    :vartype external: bool
    :ivar target_port: Target Port in containers for traffic from ingress.
    :vartype target_port: int
    :ivar exposed_port: Exposed Port in containers for TCP traffic from ingress.
    :vartype exposed_port: int
    :ivar transport: Ingress transport protocol. Known values are: "auto", "http", "http2", and
     "tcp".
    :vartype transport: str or ~azure.mgmt.appcontainers.models.IngressTransportMethod
    :ivar traffic: Traffic weights for app's revisions.
    :vartype traffic: list[~azure.mgmt.appcontainers.models.TrafficWeight]
    :ivar custom_domains: custom domain bindings for Container Apps' hostnames.
    :vartype custom_domains: list[~azure.mgmt.appcontainers.models.CustomDomain]
    :ivar allow_insecure: Bool indicating if HTTP connections to is allowed. If set to false HTTP
     connections are automatically redirected to HTTPS connections.
    :vartype allow_insecure: bool
    :ivar ip_security_restrictions: Rules to restrict incoming IP address.
    :vartype ip_security_restrictions:
     list[~azure.mgmt.appcontainers.models.IpSecurityRestrictionRule]
    :ivar sticky_sessions: Sticky Sessions for Single Revision Mode.
    :vartype sticky_sessions: ~azure.mgmt.appcontainers.models.IngressStickySessions
    :ivar client_certificate_mode: Client certificate mode for mTLS authentication. Ignore
     indicates server drops client certificate on forwarding. Accept indicates server forwards
     client certificate but does not require a client certificate. Require indicates server requires
     a client certificate. Known values are: "ignore", "accept", and "require".
    :vartype client_certificate_mode: str or
     ~azure.mgmt.appcontainers.models.IngressClientCertificateMode
    :ivar cors_policy: CORS policy for container app.
    :vartype cors_policy: ~azure.mgmt.appcontainers.models.CorsPolicy
    :ivar additional_port_mappings: Settings to expose additional ports on container app.
    :vartype additional_port_mappings: list[~azure.mgmt.appcontainers.models.IngressPortMapping]
    """

    fqdn: Optional[str] = rest_field(visibility=["read"])
    """Hostname."""
    external: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Bool indicating if app exposes an external http endpoint."""
    target_port: Optional[int] = rest_field(
        name="targetPort", visibility=["read", "create", "update", "delete", "query"]
    )
    """Target Port in containers for traffic from ingress."""
    exposed_port: Optional[int] = rest_field(
        name="exposedPort", visibility=["read", "create", "update", "delete", "query"]
    )
    """Exposed Port in containers for TCP traffic from ingress."""
    transport: Optional[Union[str, "_models.IngressTransportMethod"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Ingress transport protocol. Known values are: \"auto\", \"http\", \"http2\", and \"tcp\"."""
    traffic: Optional[list["_models.TrafficWeight"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Traffic weights for app's revisions."""
    custom_domains: Optional[list["_models.CustomDomain"]] = rest_field(
        name="customDomains", visibility=["read", "create", "update", "delete", "query"]
    )
    """custom domain bindings for Container Apps' hostnames."""
    allow_insecure: Optional[bool] = rest_field(
        name="allowInsecure", visibility=["read", "create", "update", "delete", "query"]
    )
    """Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are
     automatically redirected to HTTPS connections."""
    ip_security_restrictions: Optional[list["_models.IpSecurityRestrictionRule"]] = rest_field(
        name="ipSecurityRestrictions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Rules to restrict incoming IP address."""
    sticky_sessions: Optional["_models.IngressStickySessions"] = rest_field(
        name="stickySessions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sticky Sessions for Single Revision Mode."""
    client_certificate_mode: Optional[Union[str, "_models.IngressClientCertificateMode"]] = rest_field(
        name="clientCertificateMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Client certificate mode for mTLS authentication. Ignore indicates server drops client
     certificate on forwarding. Accept indicates server forwards client certificate but does not
     require a client certificate. Require indicates server requires a client certificate. Known
     values are: \"ignore\", \"accept\", and \"require\"."""
    cors_policy: Optional["_models.CorsPolicy"] = rest_field(
        name="corsPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """CORS policy for container app."""
    additional_port_mappings: Optional[list["_models.IngressPortMapping"]] = rest_field(
        name="additionalPortMappings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Settings to expose additional ports on container app."""

    @overload
    def __init__(
        self,
        *,
        external: Optional[bool] = None,
        target_port: Optional[int] = None,
        exposed_port: Optional[int] = None,
        transport: Optional[Union[str, "_models.IngressTransportMethod"]] = None,
        traffic: Optional[list["_models.TrafficWeight"]] = None,
        custom_domains: Optional[list["_models.CustomDomain"]] = None,
        allow_insecure: Optional[bool] = None,
        ip_security_restrictions: Optional[list["_models.IpSecurityRestrictionRule"]] = None,
        sticky_sessions: Optional["_models.IngressStickySessions"] = None,
        client_certificate_mode: Optional[Union[str, "_models.IngressClientCertificateMode"]] = None,
        cors_policy: Optional["_models.CorsPolicy"] = None,
        additional_port_mappings: Optional[list["_models.IngressPortMapping"]] = None,
    ) -> None: ...

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

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


class IngressConfiguration(_Model):
    """Settings for the ingress component, including workload profile, scaling, and connection
    handling.

    :ivar workload_profile_name: Name of the workload profile used by the ingress component.
     Required.
    :vartype workload_profile_name: str
    :ivar termination_grace_period_seconds: Time (in seconds) to allow active connections to
     complete on termination. Must be between 0 and 3600. Defaults to 480 seconds.
    :vartype termination_grace_period_seconds: int
    :ivar header_count_limit: Maximum number of headers per request allowed by the ingress. Must be
     at least 1. Defaults to 100.
    :vartype header_count_limit: int
    :ivar request_idle_timeout: Duration (in minutes) before idle requests are timed out. Must be
     between 4 and 30 inclusive. Defaults to 4 minutes.
    :vartype request_idle_timeout: int
    """

    workload_profile_name: Optional[str] = rest_field(
        name="workloadProfileName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the workload profile used by the ingress component. Required."""
    termination_grace_period_seconds: Optional[int] = rest_field(
        name="terminationGracePeriodSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Time (in seconds) to allow active connections to complete on termination. Must be between 0 and
     3600. Defaults to 480 seconds."""
    header_count_limit: Optional[int] = rest_field(
        name="headerCountLimit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum number of headers per request allowed by the ingress. Must be at least 1. Defaults to
     100."""
    request_idle_timeout: Optional[int] = rest_field(
        name="requestIdleTimeout", visibility=["read", "create", "update", "delete", "query"]
    )
    """Duration (in minutes) before idle requests are timed out. Must be between 4 and 30 inclusive.
     Defaults to 4 minutes."""

    @overload
    def __init__(
        self,
        *,
        workload_profile_name: Optional[str] = None,
        termination_grace_period_seconds: Optional[int] = None,
        header_count_limit: Optional[int] = None,
        request_idle_timeout: Optional[int] = None,
    ) -> None: ...

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

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


class IngressPortMapping(_Model):
    """Port mappings of container app ingress.

    :ivar external: Specifies whether the app port is accessible outside of the environment.
     Required.
    :vartype external: bool
    :ivar target_port: Specifies the port user's container listens on. Required.
    :vartype target_port: int
    :ivar exposed_port: Specifies the exposed port for the target port. If not specified, it
     defaults to target port.
    :vartype exposed_port: int
    """

    external: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies whether the app port is accessible outside of the environment. Required."""
    target_port: int = rest_field(name="targetPort", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the port user's container listens on. Required."""
    exposed_port: Optional[int] = rest_field(
        name="exposedPort", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the exposed port for the target port. If not specified, it defaults to target port."""

    @overload
    def __init__(
        self,
        *,
        external: bool,
        target_port: int,
        exposed_port: Optional[int] = None,
    ) -> None: ...

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

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


class IngressStickySessions(_Model):
    """Sticky Sessions for Single Revision Mode.

    :ivar affinity: Sticky Session Affinity. Known values are: "sticky" and "none".
    :vartype affinity: str or ~azure.mgmt.appcontainers.models.Affinity
    """

    affinity: Optional[Union[str, "_models.Affinity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Sticky Session Affinity. Known values are: \"sticky\" and \"none\"."""

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

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

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


class InitContainer(BaseContainer):
    """Container App init container definition.

    :ivar image: Container image tag.
    :vartype image: str
    :ivar name: Custom container name.
    :vartype name: str
    :ivar command: Container start command.
    :vartype command: list[str]
    :ivar args: Container start command arguments.
    :vartype args: list[str]
    :ivar env: Container environment variables.
    :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
    :ivar resources: Container resource requirements.
    :vartype resources: ~azure.mgmt.appcontainers.models.ContainerResources
    :ivar volume_mounts: Container volume mounts.
    :vartype volume_mounts: list[~azure.mgmt.appcontainers.models.VolumeMount]
    """

    @overload
    def __init__(
        self,
        *,
        image: Optional[str] = None,
        name: Optional[str] = None,
        command: Optional[list[str]] = None,
        args: Optional[list[str]] = None,
        env: Optional[list["_models.EnvironmentVar"]] = None,
        resources: Optional["_models.ContainerResources"] = None,
        volume_mounts: Optional[list["_models.VolumeMount"]] = None,
    ) -> None: ...

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

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


class IpSecurityRestrictionRule(_Model):
    """Rule to restrict incoming IP address.

    :ivar name: Name for the IP restriction rule. Required.
    :vartype name: str
    :ivar description: Describe the IP restriction rule that is being sent to the container-app.
     This is an optional field.
    :vartype description: str
    :ivar ip_address_range: CIDR notation to match incoming IP address. Required.
    :vartype ip_address_range: str
    :ivar action: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of
     ALL Allow or ALL Deny. Required. Known values are: "Allow" and "Deny".
    :vartype action: str or ~azure.mgmt.appcontainers.models.Action
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name for the IP restriction rule. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describe the IP restriction rule that is being sent to the container-app. This is an optional
     field."""
    ip_address_range: str = rest_field(
        name="ipAddressRange", visibility=["read", "create", "update", "delete", "query"]
    )
    """CIDR notation to match incoming IP address. Required."""
    action: Union[str, "_models.Action"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or
     ALL Deny. Required. Known values are: \"Allow\" and \"Deny\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        ip_address_range: str,
        action: Union[str, "_models.Action"],
        description: Optional[str] = None,
    ) -> None: ...

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

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


class JavaComponent(ProxyResource):
    """Java Component.

    :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.appcontainers.models.SystemData
    :ivar properties: Java Component resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.JavaComponentProperties
    """

    properties: Optional["_models.JavaComponentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Java Component resource specific properties."""

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

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

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


class JavaComponentConfigurationProperty(_Model):
    """Configuration properties for a Java Component.

    :ivar property_name: The name of the property.
    :vartype property_name: str
    :ivar value: The value of the property.
    :vartype value: str
    """

    property_name: Optional[str] = rest_field(
        name="propertyName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the property."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the property."""

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

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

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


class JavaComponentIngress(_Model):
    """Container App Ingress configuration.

    :ivar fqdn: Hostname of the Java Component endpoint.
    :vartype fqdn: str
    """

    fqdn: Optional[str] = rest_field(visibility=["read"])
    """Hostname of the Java Component endpoint."""


class JavaComponentProperties(_Model):
    """Java Component common properties.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    SpringBootAdminComponent, SpringCloudConfigComponent, SpringCloudEurekaComponent

    :ivar component_type: Type of the Java Component. Required. Known values are:
     "SpringBootAdmin", "SpringCloudEureka", and "SpringCloudConfig".
    :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
    :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
     "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
    :ivar configurations: List of Java Components configuration properties.
    :vartype configurations:
     list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
    :ivar scale: Java component scaling configurations.
    :vartype scale: ~azure.mgmt.appcontainers.models.JavaComponentPropertiesScale
    :ivar service_binds: List of Java Components that are bound to the Java component.
    :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
    """

    __mapping__: dict[str, _Model] = {}
    component_type: str = rest_discriminator(
        name="componentType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of the Java Component. Required. Known values are: \"SpringBootAdmin\",
     \"SpringCloudEureka\", and \"SpringCloudConfig\"."""
    provisioning_state: Optional[Union[str, "_models.JavaComponentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Java Component. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Deleting\", and \"InProgress\"."""
    configurations: Optional[list["_models.JavaComponentConfigurationProperty"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Java Components configuration properties."""
    scale: Optional["_models.JavaComponentPropertiesScale"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Java component scaling configurations."""
    service_binds: Optional[list["_models.JavaComponentServiceBind"]] = rest_field(
        name="serviceBinds", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Java Components that are bound to the Java component."""

    @overload
    def __init__(
        self,
        *,
        component_type: str,
        configurations: Optional[list["_models.JavaComponentConfigurationProperty"]] = None,
        scale: Optional["_models.JavaComponentPropertiesScale"] = None,
        service_binds: Optional[list["_models.JavaComponentServiceBind"]] = None,
    ) -> None: ...

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

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


class JavaComponentPropertiesScale(_Model):
    """Java component scaling configurations.

    :ivar min_replicas: Optional. Minimum number of Java component replicas. Defaults to 1 if not
     set.
    :vartype min_replicas: int
    :ivar max_replicas: Optional. Maximum number of Java component replicas.
    :vartype max_replicas: int
    """

    min_replicas: Optional[int] = rest_field(
        name="minReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Minimum number of Java component replicas. Defaults to 1 if not set."""
    max_replicas: Optional[int] = rest_field(
        name="maxReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Maximum number of Java component replicas."""

    @overload
    def __init__(
        self,
        *,
        min_replicas: Optional[int] = None,
        max_replicas: Optional[int] = None,
    ) -> None: ...

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

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


class JavaComponentServiceBind(_Model):
    """Configuration to bind a Java Component to another Java Component.

    :ivar name: Name of the service bind.
    :vartype name: str
    :ivar service_id: Resource id of the target service.
    :vartype service_id: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the service bind."""
    service_id: Optional[str] = rest_field(name="serviceId", visibility=["read", "create", "update", "delete", "query"])
    """Resource id of the target service."""

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

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

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


class Job(TrackedResource):
    """Container App Job.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Container Apps Job resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.JobProperties
    :ivar identity: The managed service identities assigned to this resource.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    """

    properties: Optional["_models.JobProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container Apps Job resource specific properties."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed service identities assigned to this resource."""

    __flattened_items = [
        "provisioning_state",
        "environment_id",
        "workload_profile_name",
        "configuration",
        "template",
        "outbound_ip_addresses",
        "event_stream_endpoint",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 JobConfiguration(_Model):
    """Non versioned Container Apps Job configuration properties.

    :ivar secrets: Collection of secrets used by a Container Apps Job.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.Secret]
    :ivar trigger_type: Trigger type of the job. Required. Known values are: "Schedule", "Event",
     and "Manual".
    :vartype trigger_type: str or ~azure.mgmt.appcontainers.models.TriggerType
    :ivar replica_timeout: Maximum number of seconds a replica is allowed to run. Required.
    :vartype replica_timeout: int
    :ivar replica_retry_limit: Maximum number of retries before failing the job.
    :vartype replica_retry_limit: int
    :ivar manual_trigger_config: Manual trigger configuration for a single execution job.
     Properties replicaCompletionCount and parallelism would be set to 1 by default.
    :vartype manual_trigger_config:
     ~azure.mgmt.appcontainers.models.JobConfigurationManualTriggerConfig
    :ivar schedule_trigger_config: Cron formatted repeating trigger schedule ("* * * * *") for
     cronjobs. Properties completions and parallelism would be set to 1 by default.
    :vartype schedule_trigger_config:
     ~azure.mgmt.appcontainers.models.JobConfigurationScheduleTriggerConfig
    :ivar event_trigger_config: Trigger configuration of an event driven job.
    :vartype event_trigger_config:
     ~azure.mgmt.appcontainers.models.JobConfigurationEventTriggerConfig
    :ivar registries: Collection of private container registry credentials used by a Container apps
     job.
    :vartype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
    :ivar identity_settings: Optional settings for Managed Identities that are assigned to the
     Container App Job. If a Managed Identity is not specified here, default settings will be used.
    :vartype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
    """

    secrets: Optional[list["_models.Secret"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of secrets used by a Container Apps Job."""
    trigger_type: Union[str, "_models.TriggerType"] = rest_field(
        name="triggerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Trigger type of the job. Required. Known values are: \"Schedule\", \"Event\", and \"Manual\"."""
    replica_timeout: int = rest_field(name="replicaTimeout", visibility=["read", "create", "update", "delete", "query"])
    """Maximum number of seconds a replica is allowed to run. Required."""
    replica_retry_limit: Optional[int] = rest_field(
        name="replicaRetryLimit", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum number of retries before failing the job."""
    manual_trigger_config: Optional["_models.JobConfigurationManualTriggerConfig"] = rest_field(
        name="manualTriggerConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Manual trigger configuration for a single execution job. Properties replicaCompletionCount and
     parallelism would be set to 1 by default."""
    schedule_trigger_config: Optional["_models.JobConfigurationScheduleTriggerConfig"] = rest_field(
        name="scheduleTriggerConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Cron formatted repeating trigger schedule (\"* * * * *\") for cronjobs. Properties completions
     and parallelism would be set to 1 by default."""
    event_trigger_config: Optional["_models.JobConfigurationEventTriggerConfig"] = rest_field(
        name="eventTriggerConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Trigger configuration of an event driven job."""
    registries: Optional[list["_models.RegistryCredentials"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of private container registry credentials used by a Container apps job."""
    identity_settings: Optional[list["_models.IdentitySettings"]] = rest_field(
        name="identitySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional settings for Managed Identities that are assigned to the Container App Job. If a
     Managed Identity is not specified here, default settings will be used."""

    @overload
    def __init__(
        self,
        *,
        trigger_type: Union[str, "_models.TriggerType"],
        replica_timeout: int,
        secrets: Optional[list["_models.Secret"]] = None,
        replica_retry_limit: Optional[int] = None,
        manual_trigger_config: Optional["_models.JobConfigurationManualTriggerConfig"] = None,
        schedule_trigger_config: Optional["_models.JobConfigurationScheduleTriggerConfig"] = None,
        event_trigger_config: Optional["_models.JobConfigurationEventTriggerConfig"] = None,
        registries: Optional[list["_models.RegistryCredentials"]] = None,
        identity_settings: Optional[list["_models.IdentitySettings"]] = None,
    ) -> None: ...

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

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


class JobConfigurationEventTriggerConfig(_Model):
    """Trigger configuration of an event driven job.

    :ivar replica_completion_count: Minimum number of successful replica completions before overall
     job completion.
    :vartype replica_completion_count: int
    :ivar parallelism: Number of parallel replicas of a job that can run at a given time.
    :vartype parallelism: int
    :ivar scale: Scaling configurations for event driven jobs.
    :vartype scale: ~azure.mgmt.appcontainers.models.JobScale
    """

    replica_completion_count: Optional[int] = rest_field(
        name="replicaCompletionCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum number of successful replica completions before overall job completion."""
    parallelism: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of parallel replicas of a job that can run at a given time."""
    scale: Optional["_models.JobScale"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scaling configurations for event driven jobs."""

    @overload
    def __init__(
        self,
        *,
        replica_completion_count: Optional[int] = None,
        parallelism: Optional[int] = None,
        scale: Optional["_models.JobScale"] = None,
    ) -> None: ...

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

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


class JobConfigurationManualTriggerConfig(_Model):
    """Manual trigger configuration for a single execution job. Properties replicaCompletionCount and
    parallelism would be set to 1 by default.

    :ivar replica_completion_count: Minimum number of successful replica completions before overall
     job completion.
    :vartype replica_completion_count: int
    :ivar parallelism: Number of parallel replicas of a job that can run at a given time.
    :vartype parallelism: int
    """

    replica_completion_count: Optional[int] = rest_field(
        name="replicaCompletionCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum number of successful replica completions before overall job completion."""
    parallelism: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of parallel replicas of a job that can run at a given time."""

    @overload
    def __init__(
        self,
        *,
        replica_completion_count: Optional[int] = None,
        parallelism: Optional[int] = None,
    ) -> None: ...

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

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


class JobConfigurationScheduleTriggerConfig(_Model):
    """Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions
    and parallelism would be set to 1 by default.

    :ivar replica_completion_count: Minimum number of successful replica completions before overall
     job completion.
    :vartype replica_completion_count: int
    :ivar cron_expression: Cron formatted repeating schedule ("* * * * *") of a Cron Job. Required.
    :vartype cron_expression: str
    :ivar parallelism: Number of parallel replicas of a job that can run at a given time.
    :vartype parallelism: int
    """

    replica_completion_count: Optional[int] = rest_field(
        name="replicaCompletionCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum number of successful replica completions before overall job completion."""
    cron_expression: str = rest_field(name="cronExpression", visibility=["read", "create", "update", "delete", "query"])
    """Cron formatted repeating schedule (\"* * * * *\") of a Cron Job. Required."""
    parallelism: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of parallel replicas of a job that can run at a given time."""

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

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

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


class JobExecution(ProxyResource):
    """Container Apps Job execution.

    :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.appcontainers.models.SystemData
    :ivar properties: Container Apps Job execution specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.JobExecutionProperties
    """

    properties: Optional["_models.JobExecutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container Apps Job execution specific properties."""

    __flattened_items = ["status", "start_time", "end_time", "template"]

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

    @overload
    def __init__(self, mapping: Mapping[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 JobExecutionBase(_Model):
    """Container App's Job execution name.

    :ivar name: Job execution name.
    :vartype name: str
    :ivar id: Job execution Id.
    :vartype id: str
    """

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

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

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

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


class JobExecutionContainer(_Model):
    """Container Apps Jobs execution container definition.

    :ivar image: Container image tag.
    :vartype image: str
    :ivar name: Custom container name.
    :vartype name: str
    :ivar command: Container start command.
    :vartype command: list[str]
    :ivar args: Container start command arguments.
    :vartype args: list[str]
    :ivar env: Container environment variables.
    :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
    :ivar resources: Container resource requirements.
    :vartype resources: ~azure.mgmt.appcontainers.models.ContainerResources
    """

    image: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container image tag."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom container name."""
    command: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command."""
    args: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command arguments."""
    env: Optional[list["_models.EnvironmentVar"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container environment variables."""
    resources: Optional["_models.ContainerResources"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container resource requirements."""

    @overload
    def __init__(
        self,
        *,
        image: Optional[str] = None,
        name: Optional[str] = None,
        command: Optional[list[str]] = None,
        args: Optional[list[str]] = None,
        env: Optional[list["_models.EnvironmentVar"]] = None,
        resources: Optional["_models.ContainerResources"] = None,
    ) -> None: ...

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

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


class JobExecutionProperties(_Model):
    """Container Apps Job execution specific properties.

    :ivar status: Current running State of the job. Known values are: "Running", "Processing",
     "Stopped", "Degraded", "Failed", "Unknown", and "Succeeded".
    :vartype status: str or ~azure.mgmt.appcontainers.models.JobExecutionRunningState
    :ivar start_time: Job execution start time.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: Job execution end time.
    :vartype end_time: ~datetime.datetime
    :ivar template: Job's execution container.
    :vartype template: ~azure.mgmt.appcontainers.models.JobExecutionTemplate
    """

    status: Optional[Union[str, "_models.JobExecutionRunningState"]] = rest_field(visibility=["read"])
    """Current running State of the job. Known values are: \"Running\", \"Processing\", \"Stopped\",
     \"Degraded\", \"Failed\", \"Unknown\", and \"Succeeded\"."""
    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Job execution start time."""
    end_time: Optional[datetime.datetime] = rest_field(
        name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Job execution end time."""
    template: Optional["_models.JobExecutionTemplate"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Job's execution container."""

    @overload
    def __init__(
        self,
        *,
        start_time: Optional[datetime.datetime] = None,
        end_time: Optional[datetime.datetime] = None,
        template: Optional["_models.JobExecutionTemplate"] = None,
    ) -> None: ...

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

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


class JobExecutionTemplate(_Model):
    """Job's execution template, containing container configuration for a job's execution.

    :ivar containers: List of container definitions for the Container Apps Job.
    :vartype containers: list[~azure.mgmt.appcontainers.models.JobExecutionContainer]
    :ivar init_containers: List of specialized containers that run before job containers.
    :vartype init_containers: list[~azure.mgmt.appcontainers.models.JobExecutionContainer]
    """

    containers: Optional[list["_models.JobExecutionContainer"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of container definitions for the Container Apps Job."""
    init_containers: Optional[list["_models.JobExecutionContainer"]] = rest_field(
        name="initContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of specialized containers that run before job containers."""

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

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

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


class JobPatchProperties(_Model):
    """Container Apps Job resource specific properties.

    :ivar identity: Managed identities needed by a container app job to interact with other Azure
     services to not maintain any secrets or credentials in code.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Container Apps Job patch resource properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.JobPatchPropertiesProperties
    """

    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed identities needed by a container app job to interact with other Azure services to not
     maintain any secrets or credentials in code."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    properties: Optional["_models.JobPatchPropertiesProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container Apps Job patch resource properties."""

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

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

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


class JobPatchPropertiesProperties(_Model):
    """Container Apps Job patch properties.

    :ivar environment_id: Resource ID of environment.
    :vartype environment_id: str
    :ivar configuration: Container Apps Job configuration properties.
    :vartype configuration: ~azure.mgmt.appcontainers.models.JobConfiguration
    :ivar template: Container Apps job definition.
    :vartype template: ~azure.mgmt.appcontainers.models.JobTemplate
    :ivar outbound_ip_addresses: Outbound IP Addresses of a container apps job.
    :vartype outbound_ip_addresses: list[str]
    :ivar event_stream_endpoint: The endpoint of the eventstream of the container apps job.
    :vartype event_stream_endpoint: str
    """

    environment_id: Optional[str] = rest_field(name="environmentId", visibility=["read", "create", "update"])
    """Resource ID of environment."""
    configuration: Optional["_models.JobConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container Apps Job configuration properties."""
    template: Optional["_models.JobTemplate"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container Apps job definition."""
    outbound_ip_addresses: Optional[list[str]] = rest_field(
        name="outboundIpAddresses", visibility=["read", "create", "update", "delete", "query"]
    )
    """Outbound IP Addresses of a container apps job."""
    event_stream_endpoint: Optional[str] = rest_field(
        name="eventStreamEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint of the eventstream of the container apps job."""

    @overload
    def __init__(
        self,
        *,
        environment_id: Optional[str] = None,
        configuration: Optional["_models.JobConfiguration"] = None,
        template: Optional["_models.JobTemplate"] = None,
        outbound_ip_addresses: Optional[list[str]] = None,
        event_stream_endpoint: 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 JobProperties(_Model):
    """Container Apps Job resource specific properties.

    :ivar provisioning_state: Provisioning state of the Container Apps Job. Known values are:
     "InProgress", "Succeeded", "Failed", "Canceled", and "Deleting".
    :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.JobProvisioningState
    :ivar environment_id: Resource ID of environment.
    :vartype environment_id: str
    :ivar workload_profile_name: Workload profile name to pin for container apps job execution.
    :vartype workload_profile_name: str
    :ivar configuration: Container Apps Job configuration properties.
    :vartype configuration: ~azure.mgmt.appcontainers.models.JobConfiguration
    :ivar template: Container Apps job definition.
    :vartype template: ~azure.mgmt.appcontainers.models.JobTemplate
    :ivar outbound_ip_addresses: Outbound IP Addresses of a container apps job.
    :vartype outbound_ip_addresses: list[str]
    :ivar event_stream_endpoint: The endpoint of the eventstream of the container apps job.
    :vartype event_stream_endpoint: str
    """

    provisioning_state: Optional[Union[str, "_models.JobProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Container Apps Job. Known values are: \"InProgress\", \"Succeeded\",
     \"Failed\", \"Canceled\", and \"Deleting\"."""
    environment_id: Optional[str] = rest_field(name="environmentId", visibility=["read", "create"])
    """Resource ID of environment."""
    workload_profile_name: Optional[str] = rest_field(
        name="workloadProfileName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Workload profile name to pin for container apps job execution."""
    configuration: Optional["_models.JobConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container Apps Job configuration properties."""
    template: Optional["_models.JobTemplate"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container Apps job definition."""
    outbound_ip_addresses: Optional[list[str]] = rest_field(name="outboundIpAddresses", visibility=["read"])
    """Outbound IP Addresses of a container apps job."""
    event_stream_endpoint: Optional[str] = rest_field(name="eventStreamEndpoint", visibility=["read"])
    """The endpoint of the eventstream of the container apps job."""

    @overload
    def __init__(
        self,
        *,
        environment_id: Optional[str] = None,
        workload_profile_name: Optional[str] = None,
        configuration: Optional["_models.JobConfiguration"] = None,
        template: Optional["_models.JobTemplate"] = None,
    ) -> None: ...

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

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


class JobScale(_Model):
    """Scaling configurations for event driven jobs.

    :ivar polling_interval: Interval to check each event source in seconds. Defaults to 30s.
    :vartype polling_interval: int
    :ivar min_executions: Minimum number of job executions that are created for a trigger, default
     0.
    :vartype min_executions: int
    :ivar max_executions: Maximum number of job executions that are created for a trigger, default
     100.
    :vartype max_executions: int
    :ivar rules: Scaling rules.
    :vartype rules: list[~azure.mgmt.appcontainers.models.JobScaleRule]
    """

    polling_interval: Optional[int] = rest_field(
        name="pollingInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Interval to check each event source in seconds. Defaults to 30s."""
    min_executions: Optional[int] = rest_field(
        name="minExecutions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum number of job executions that are created for a trigger, default 0."""
    max_executions: Optional[int] = rest_field(
        name="maxExecutions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum number of job executions that are created for a trigger, default 100."""
    rules: Optional[list["_models.JobScaleRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Scaling rules."""

    @overload
    def __init__(
        self,
        *,
        polling_interval: Optional[int] = None,
        min_executions: Optional[int] = None,
        max_executions: Optional[int] = None,
        rules: Optional[list["_models.JobScaleRule"]] = None,
    ) -> None: ...

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

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


class JobScaleRule(_Model):
    """Scaling rule.

    :ivar name: Scale Rule Name.
    :vartype name: str
    :ivar type: Type of the scale rule eg: azure-servicebus, redis etc.
    :vartype type: str
    :ivar metadata: Metadata properties to describe the scale rule.
    :vartype metadata: any
    :ivar auth: Authentication secrets for the scale rule.
    :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     job, or 'system' for system-assigned identity.
    :vartype identity: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scale Rule Name."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of the scale rule eg: azure-servicebus, redis etc."""
    metadata: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata properties to describe the scale rule."""
    auth: Optional[list["_models.ScaleRuleAuth"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authentication secrets for the scale rule."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the job, or 'system'
     for system-assigned identity."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        type: Optional[str] = None,
        metadata: Optional[Any] = None,
        auth: Optional[list["_models.ScaleRuleAuth"]] = None,
        identity: 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 JobSecretsCollection(_Model):
    """Container Apps Job Secrets Collection ARM resource.

    :ivar value: Collection of resources. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.Secret]
    """

    value: list["_models.Secret"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of resources. Required."""

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

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

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


class JobTemplate(_Model):
    """Container Apps Job versioned application definition. Defines the desired state of an immutable
    revision. Any changes to this section Will result in a new revision being created.

    :ivar init_containers: List of specialized containers that run before app containers.
    :vartype init_containers: list[~azure.mgmt.appcontainers.models.InitContainer]
    :ivar containers: List of container definitions for the Container App.
    :vartype containers: list[~azure.mgmt.appcontainers.models.Container]
    :ivar volumes: List of volume definitions for the Container App.
    :vartype volumes: list[~azure.mgmt.appcontainers.models.Volume]
    """

    init_containers: Optional[list["_models.InitContainer"]] = rest_field(
        name="initContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of specialized containers that run before app containers."""
    containers: Optional[list["_models.Container"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of container definitions for the Container App."""
    volumes: Optional[list["_models.Volume"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of volume definitions for the Container App."""

    @overload
    def __init__(
        self,
        *,
        init_containers: Optional[list["_models.InitContainer"]] = None,
        containers: Optional[list["_models.Container"]] = None,
        volumes: Optional[list["_models.Volume"]] = None,
    ) -> None: ...

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

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


class JwtClaimChecks(_Model):
    """The configuration settings of the checks that should be made while validating the JWT Claims.

    :ivar allowed_groups: The list of the allowed groups.
    :vartype allowed_groups: list[str]
    :ivar allowed_client_applications: The list of the allowed client applications.
    :vartype allowed_client_applications: list[str]
    """

    allowed_groups: Optional[list[str]] = rest_field(
        name="allowedGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of the allowed groups."""
    allowed_client_applications: Optional[list[str]] = rest_field(
        name="allowedClientApplications", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of the allowed client applications."""

    @overload
    def __init__(
        self,
        *,
        allowed_groups: Optional[list[str]] = None,
        allowed_client_applications: 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 KedaConfiguration(_Model):
    """Configuration properties Keda component.

    :ivar version: The version of Keda.
    :vartype version: str
    """

    version: Optional[str] = rest_field(visibility=["read"])
    """The version of Keda."""


class LifecycleConfiguration(_Model):
    """The lifecycle configuration properties of a session in the dynamic session pool.

    :ivar lifecycle_type: The lifecycle type of the session pool. Known values are: "Timed" and
     "OnContainerExit".
    :vartype lifecycle_type: str or ~azure.mgmt.appcontainers.models.LifecycleType
    :ivar cooldown_period_in_seconds: The cooldown period of a session in seconds when the
     lifecycle type is 'Timed'.
    :vartype cooldown_period_in_seconds: int
    :ivar max_alive_period_in_seconds: The maximum alive period of a session in seconds when the
     lifecycle type is 'OnContainerExit'.
    :vartype max_alive_period_in_seconds: int
    """

    lifecycle_type: Optional[Union[str, "_models.LifecycleType"]] = rest_field(
        name="lifecycleType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The lifecycle type of the session pool. Known values are: \"Timed\" and \"OnContainerExit\"."""
    cooldown_period_in_seconds: Optional[int] = rest_field(
        name="cooldownPeriodInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cooldown period of a session in seconds when the lifecycle type is 'Timed'."""
    max_alive_period_in_seconds: Optional[int] = rest_field(
        name="maxAlivePeriodInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'."""

    @overload
    def __init__(
        self,
        *,
        lifecycle_type: Optional[Union[str, "_models.LifecycleType"]] = None,
        cooldown_period_in_seconds: Optional[int] = None,
        max_alive_period_in_seconds: Optional[int] = None,
    ) -> None: ...

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

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


class LogAnalyticsConfiguration(_Model):
    """Log Analytics configuration, must only be provided when destination is configured as
    'log-analytics'.

    :ivar customer_id: Log analytics customer id.
    :vartype customer_id: str
    :ivar shared_key: Log analytics customer key.
    :vartype shared_key: str
    """

    customer_id: Optional[str] = rest_field(
        name="customerId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Log analytics customer id."""
    shared_key: Optional[str] = rest_field(name="sharedKey", visibility=["create", "update"])
    """Log analytics customer key."""

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

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

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


class LogicApp(ProxyResource):
    """A logic app 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.appcontainers.models.SystemData
    """


class Login(_Model):
    """The configuration settings of the login flow of users using ContainerApp Service
    Authentication/Authorization.

    :ivar routes: The routes that specify the endpoints used for login and logout requests.
    :vartype routes: ~azure.mgmt.appcontainers.models.LoginRoutes
    :ivar token_store: The configuration settings of the token store.
    :vartype token_store: ~azure.mgmt.appcontainers.models.TokenStore
    :ivar preserve_url_fragments_for_logins: <code>true</code> if the fragments from the request
     are preserved after the login request is made; otherwise, <code>false</code>.
    :vartype preserve_url_fragments_for_logins: bool
    :ivar allowed_external_redirect_urls: External URLs that can be redirected to as part of
     logging in or logging out of the app. Note that the query string part of the URL is ignored.
     This is an advanced setting typically only needed by Windows Store application backends. Note
     that URLs within the current domain are always implicitly allowed.
    :vartype allowed_external_redirect_urls: list[str]
    :ivar cookie_expiration: The configuration settings of the session cookie's expiration.
    :vartype cookie_expiration: ~azure.mgmt.appcontainers.models.CookieExpiration
    :ivar nonce: The configuration settings of the nonce used in the login flow.
    :vartype nonce: ~azure.mgmt.appcontainers.models.Nonce
    """

    routes: Optional["_models.LoginRoutes"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The routes that specify the endpoints used for login and logout requests."""
    token_store: Optional["_models.TokenStore"] = rest_field(
        name="tokenStore", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the token store."""
    preserve_url_fragments_for_logins: Optional[bool] = rest_field(
        name="preserveUrlFragmentsForLogins", visibility=["read", "create", "update", "delete", "query"]
    )
    """<code>true</code> if the fragments from the request are preserved after the login request is
     made; otherwise, <code>false</code>."""
    allowed_external_redirect_urls: Optional[list[str]] = rest_field(
        name="allowedExternalRedirectUrls", visibility=["read", "create", "update", "delete", "query"]
    )
    """External URLs that can be redirected to as part of logging in or logging out of the app. Note
     that the query string part of the URL is ignored. This is an advanced setting typically only
     needed by Windows Store application backends. Note that URLs within the current domain are
     always implicitly allowed."""
    cookie_expiration: Optional["_models.CookieExpiration"] = rest_field(
        name="cookieExpiration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the session cookie's expiration."""
    nonce: Optional["_models.Nonce"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The configuration settings of the nonce used in the login flow."""

    @overload
    def __init__(
        self,
        *,
        routes: Optional["_models.LoginRoutes"] = None,
        token_store: Optional["_models.TokenStore"] = None,
        preserve_url_fragments_for_logins: Optional[bool] = None,
        allowed_external_redirect_urls: Optional[list[str]] = None,
        cookie_expiration: Optional["_models.CookieExpiration"] = None,
        nonce: Optional["_models.Nonce"] = None,
    ) -> None: ...

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

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


class LoginRoutes(_Model):
    """The routes that specify the endpoints used for login and logout requests.

    :ivar logout_endpoint: The endpoint at which a logout request should be made.
    :vartype logout_endpoint: str
    """

    logout_endpoint: Optional[str] = rest_field(
        name="logoutEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint at which a logout request should be made."""

    @overload
    def __init__(
        self,
        *,
        logout_endpoint: 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 LoginScopes(_Model):
    """The configuration settings of the login flow, including the scopes that should be requested.

    :ivar scopes: A list of the scopes that should be requested while authenticating.
    :vartype scopes: list[str]
    """

    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of the scopes that should be requested while authenticating."""

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

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

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


class MaintenanceConfigurationResource(ProxyResource):
    """Information about the Maintenance Configuration resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: ~azure.mgmt.appcontainers.models.ScheduledEntries
    """

    properties: Optional["_models.ScheduledEntries"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource-specific properties for this resource."""

    __flattened_items = ["scheduled_entries"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ManagedCertificate(TrackedResource):
    """Managed certificates used for Custom Domain bindings of Container Apps in a Managed
    Environment.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Certificate resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ManagedCertificateProperties
    """

    properties: Optional["_models.ManagedCertificateProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Certificate resource specific properties."""

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

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

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


class ManagedCertificatePatch(_Model):
    """A managed certificate to update.

    :ivar tags: Application-specific metadata in the form of key-value pairs.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Application-specific metadata in the form of key-value pairs."""

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

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

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


class ManagedCertificateProperties(_Model):
    """Certificate resource specific properties.

    :ivar provisioning_state: Provisioning state of the certificate. Known values are: "Succeeded",
     "Failed", "Canceled", "DeleteFailed", "Pending", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.CertificateProvisioningState
    :ivar subject_name: Subject name of the certificate.
    :vartype subject_name: str
    :ivar error: Any error occurred during the certificate provision.
    :vartype error: str
    :ivar domain_control_validation: Selected type of domain control validation for managed
     certificates. Known values are: "CNAME", "HTTP", and "TXT".
    :vartype domain_control_validation: str or
     ~azure.mgmt.appcontainers.models.ManagedCertificateDomainControlValidation
    :ivar validation_token: A TXT token used for DNS TXT domain control validation when issuing
     this type of managed certificates.
    :vartype validation_token: str
    """

    provisioning_state: Optional[Union[str, "_models.CertificateProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the certificate. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"DeleteFailed\", \"Pending\", and \"Deleting\"."""
    subject_name: Optional[str] = rest_field(
        name="subjectName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Subject name of the certificate."""
    error: Optional[str] = rest_field(visibility=["read"])
    """Any error occurred during the certificate provision."""
    domain_control_validation: Optional[Union[str, "_models.ManagedCertificateDomainControlValidation"]] = rest_field(
        name="domainControlValidation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Selected type of domain control validation for managed certificates. Known values are:
     \"CNAME\", \"HTTP\", and \"TXT\"."""
    validation_token: Optional[str] = rest_field(name="validationToken", visibility=["read"])
    """A TXT token used for DNS TXT domain control validation when issuing this type of managed
     certificates."""

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

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

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


class ManagedEnvironment(TrackedResource):
    """An environment for hosting container apps.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Managed environment resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ManagedEnvironmentProperties
    :ivar kind: Kind of the Environment.
    :vartype kind: str
    :ivar identity: The managed service identities assigned to this resource.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    """

    properties: Optional["_models.ManagedEnvironmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed environment resource specific properties."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the Environment."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed service identities assigned to this resource."""

    __flattened_items = [
        "provisioning_state",
        "dapr_ai_instrumentation_key",
        "dapr_ai_connection_string",
        "vnet_configuration",
        "deployment_errors",
        "default_domain",
        "static_ip",
        "app_logs_configuration",
        "zone_redundant",
        "custom_domain_configuration",
        "event_stream_endpoint",
        "workload_profiles",
        "keda_configuration",
        "dapr_configuration",
        "infrastructure_resource_group",
        "peer_authentication",
        "peer_traffic_configuration",
        "ingress_configuration",
        "private_endpoint_connections",
        "public_network_access",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ManagedEnvironmentProperties(_Model):
    """Managed environment resource specific properties.

    :ivar provisioning_state: Provisioning state of the Environment. Known values are: "Succeeded",
     "Failed", "Canceled", "Waiting", "InitializationInProgress", "InfrastructureSetupInProgress",
     "InfrastructureSetupComplete", "ScheduledForDelete", "UpgradeRequested", and "UpgradeFailed".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.EnvironmentProvisioningState
    :ivar dapr_ai_instrumentation_key: Azure Monitor instrumentation key used by Dapr to export
     Service to Service communication telemetry.
    :vartype dapr_ai_instrumentation_key: str
    :ivar dapr_ai_connection_string: Application Insights connection string used by Dapr to export
     Service to Service communication telemetry.
    :vartype dapr_ai_connection_string: str
    :ivar vnet_configuration: Vnet configuration for the environment.
    :vartype vnet_configuration: ~azure.mgmt.appcontainers.models.VnetConfiguration
    :ivar deployment_errors: Any errors that occurred during deployment or deployment validation.
    :vartype deployment_errors: str
    :ivar default_domain: Default Domain Name for the cluster.
    :vartype default_domain: str
    :ivar static_ip: Static IP of the Environment.
    :vartype static_ip: str
    :ivar app_logs_configuration: Cluster configuration which enables the log daemon to export app
     logs to configured destination.
    :vartype app_logs_configuration: ~azure.mgmt.appcontainers.models.AppLogsConfiguration
    :ivar zone_redundant: Whether or not this Managed Environment is zone-redundant.
    :vartype zone_redundant: bool
    :ivar custom_domain_configuration: Custom domain configuration for the environment.
    :vartype custom_domain_configuration:
     ~azure.mgmt.appcontainers.models.CustomDomainConfiguration
    :ivar event_stream_endpoint: The endpoint of the eventstream of the Environment.
    :vartype event_stream_endpoint: str
    :ivar workload_profiles: Workload profiles configured for the Managed Environment.
    :vartype workload_profiles: list[~azure.mgmt.appcontainers.models.WorkloadProfile]
    :ivar keda_configuration: The configuration of Keda component.
    :vartype keda_configuration: ~azure.mgmt.appcontainers.models.KedaConfiguration
    :ivar dapr_configuration: The configuration of Dapr component.
    :vartype dapr_configuration: ~azure.mgmt.appcontainers.models.DaprConfiguration
    :ivar infrastructure_resource_group: Name of the platform-managed resource group created for
     the Managed Environment to host infrastructure resources. If a subnet ID is provided, this
     resource group will be created in the same subscription as the subnet.
    :vartype infrastructure_resource_group: str
    :ivar peer_authentication: Peer authentication settings for the Managed Environment.
    :vartype peer_authentication:
     ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication
    :ivar peer_traffic_configuration: Peer traffic settings for the Managed Environment.
    :vartype peer_traffic_configuration:
     ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration
    :ivar ingress_configuration: Ingress configuration for the Managed Environment.
    :vartype ingress_configuration: ~azure.mgmt.appcontainers.models.IngressConfiguration
    :ivar private_endpoint_connections: Private endpoint connections to the resource.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
    :ivar public_network_access: Property to allow or block all public traffic. Allowed Values:
     'Enabled', 'Disabled'. Known values are: "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.appcontainers.models.PublicNetworkAccess
    """

    provisioning_state: Optional[Union[str, "_models.EnvironmentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the Environment. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Waiting\", \"InitializationInProgress\", \"InfrastructureSetupInProgress\",
     \"InfrastructureSetupComplete\", \"ScheduledForDelete\", \"UpgradeRequested\", and
     \"UpgradeFailed\"."""
    dapr_ai_instrumentation_key: Optional[str] = rest_field(
        name="daprAIInstrumentationKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Monitor instrumentation key used by Dapr to export Service to Service communication
     telemetry."""
    dapr_ai_connection_string: Optional[str] = rest_field(
        name="daprAIConnectionString", visibility=["read", "create", "update", "delete", "query"]
    )
    """Application Insights connection string used by Dapr to export Service to Service communication
     telemetry."""
    vnet_configuration: Optional["_models.VnetConfiguration"] = rest_field(
        name="vnetConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Vnet configuration for the environment."""
    deployment_errors: Optional[str] = rest_field(name="deploymentErrors", visibility=["read"])
    """Any errors that occurred during deployment or deployment validation."""
    default_domain: Optional[str] = rest_field(name="defaultDomain", visibility=["read"])
    """Default Domain Name for the cluster."""
    static_ip: Optional[str] = rest_field(name="staticIp", visibility=["read"])
    """Static IP of the Environment."""
    app_logs_configuration: Optional["_models.AppLogsConfiguration"] = rest_field(
        name="appLogsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Cluster configuration which enables the log daemon to export app logs to configured
     destination."""
    zone_redundant: Optional[bool] = rest_field(name="zoneRedundant", visibility=["read", "create"])
    """Whether or not this Managed Environment is zone-redundant."""
    custom_domain_configuration: Optional["_models.CustomDomainConfiguration"] = rest_field(
        name="customDomainConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom domain configuration for the environment."""
    event_stream_endpoint: Optional[str] = rest_field(name="eventStreamEndpoint", visibility=["read"])
    """The endpoint of the eventstream of the Environment."""
    workload_profiles: Optional[list["_models.WorkloadProfile"]] = rest_field(
        name="workloadProfiles", visibility=["read", "create", "update", "delete", "query"]
    )
    """Workload profiles configured for the Managed Environment."""
    keda_configuration: Optional["_models.KedaConfiguration"] = rest_field(
        name="kedaConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration of Keda component."""
    dapr_configuration: Optional["_models.DaprConfiguration"] = rest_field(
        name="daprConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration of Dapr component."""
    infrastructure_resource_group: Optional[str] = rest_field(
        name="infrastructureResourceGroup", visibility=["read", "create"]
    )
    """Name of the platform-managed resource group created for the Managed Environment to host
     infrastructure resources. If a subnet ID is provided, this resource group will be created in
     the same subscription as the subnet."""
    peer_authentication: Optional["_models.ManagedEnvironmentPropertiesPeerAuthentication"] = rest_field(
        name="peerAuthentication", visibility=["read", "create", "update", "delete", "query"]
    )
    """Peer authentication settings for the Managed Environment."""
    peer_traffic_configuration: Optional["_models.ManagedEnvironmentPropertiesPeerTrafficConfiguration"] = rest_field(
        name="peerTrafficConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Peer traffic settings for the Managed Environment."""
    ingress_configuration: Optional["_models.IngressConfiguration"] = rest_field(
        name="ingressConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Ingress configuration for the Managed Environment."""
    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """Private endpoint connections to the resource."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. Known
     values are: \"Enabled\" and \"Disabled\"."""

    @overload
    def __init__(
        self,
        *,
        dapr_ai_instrumentation_key: Optional[str] = None,
        dapr_ai_connection_string: Optional[str] = None,
        vnet_configuration: Optional["_models.VnetConfiguration"] = None,
        app_logs_configuration: Optional["_models.AppLogsConfiguration"] = None,
        zone_redundant: Optional[bool] = None,
        custom_domain_configuration: Optional["_models.CustomDomainConfiguration"] = None,
        workload_profiles: Optional[list["_models.WorkloadProfile"]] = None,
        keda_configuration: Optional["_models.KedaConfiguration"] = None,
        dapr_configuration: Optional["_models.DaprConfiguration"] = None,
        infrastructure_resource_group: Optional[str] = None,
        peer_authentication: Optional["_models.ManagedEnvironmentPropertiesPeerAuthentication"] = None,
        peer_traffic_configuration: Optional["_models.ManagedEnvironmentPropertiesPeerTrafficConfiguration"] = None,
        ingress_configuration: Optional["_models.IngressConfiguration"] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
    ) -> None: ...

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

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


class ManagedEnvironmentPropertiesPeerAuthentication(_Model):  # pylint: disable=name-too-long
    """Peer authentication settings for the Managed Environment.

    :ivar mtls: Mutual TLS authentication settings for the Managed Environment.
    :vartype mtls: ~azure.mgmt.appcontainers.models.Mtls
    """

    mtls: Optional["_models.Mtls"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Mutual TLS authentication settings for the Managed Environment."""

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

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

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


class ManagedEnvironmentPropertiesPeerTrafficConfiguration(_Model):  # pylint: disable=name-too-long
    """Peer traffic settings for the Managed Environment.

    :ivar encryption: Peer traffic encryption settings for the Managed Environment.
    :vartype encryption:
     ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption
    """

    encryption: Optional["_models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Peer traffic encryption settings for the Managed Environment."""

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

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

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


class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(_Model):  # pylint: disable=name-too-long
    """Peer traffic encryption settings for the Managed Environment.

    :ivar enabled: Boolean indicating whether the peer traffic encryption is enabled.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Boolean indicating whether the peer traffic encryption is enabled."""

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

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

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


class ManagedEnvironmentStorage(ProxyResource):
    """Storage resource for managedEnvironment.

    :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.appcontainers.models.SystemData
    :ivar properties: Storage properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStorageProperties
    """

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

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

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

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


class ManagedEnvironmentStorageProperties(_Model):
    """Storage properties.

    :ivar azure_file: Azure file properties.
    :vartype azure_file: ~azure.mgmt.appcontainers.models.AzureFileProperties
    :ivar nfs_azure_file: NFS Azure file properties.
    :vartype nfs_azure_file: ~azure.mgmt.appcontainers.models.NfsAzureFileProperties
    """

    azure_file: Optional["_models.AzureFileProperties"] = rest_field(
        name="azureFile", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure file properties."""
    nfs_azure_file: Optional["_models.NfsAzureFileProperties"] = rest_field(
        name="nfsAzureFile", visibility=["read", "create", "update", "delete", "query"]
    )
    """NFS Azure file properties."""

    @overload
    def __init__(
        self,
        *,
        azure_file: Optional["_models.AzureFileProperties"] = None,
        nfs_azure_file: Optional["_models.NfsAzureFileProperties"] = None,
    ) -> None: ...

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

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


class ManagedEnvironmentStoragesCollection(_Model):
    """Collection of Storage for Environments.

    :ivar value: Collection of storage resources. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.ManagedEnvironmentStorage]
    """

    value: list["_models.ManagedEnvironmentStorage"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Collection of storage resources. Required."""

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

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

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


class ManagedIdentitySetting(_Model):
    """Optional settings for a Managed Identity that is assigned to the Session pool.

    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Session Pool, or 'system' for system-assigned identity. Required.
    :vartype identity: str
    :ivar lifecycle: Use to select the lifecycle stages of a Session Pool during which the Managed
     Identity should be available. Known values are: "None" and "Main".
    :vartype lifecycle: str or ~azure.mgmt.appcontainers.models.SessionPoolIdentityLifeCycle
    """

    identity: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or
     'system' for system-assigned identity. Required."""
    lifecycle: Optional[Union[str, "_models.SessionPoolIdentityLifeCycle"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Use to select the lifecycle stages of a Session Pool during which the Managed Identity should
     be available. Known values are: \"None\" and \"Main\"."""

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

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

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


class ManagedServiceIdentity(_Model):
    """Managed service identity (system assigned and/or user assigned identities).

    :ivar principal_id: The service principal ID of the system assigned identity. This property
     will only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of managed identity assigned to this resource. Required. Known values are:
     "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.appcontainers.models.ManagedServiceIdentityType
    :ivar user_assigned_identities: The identities assigned to this resource by the user.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.appcontainers.models.UserAssignedIdentity]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The service principal ID of the system assigned identity. This property will only be provided
     for a system assigned identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of the system assigned identity. This property will only be provided for a system
     assigned identity."""
    type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of managed identity assigned to this resource. Required. Known values are: \"None\",
     \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The identities assigned to this resource by the user."""

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.ManagedServiceIdentityType"],
        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 Mtls(_Model):
    """Configuration properties for mutual TLS authentication.

    :ivar enabled: Boolean indicating whether the mutual TLS authentication is enabled.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Boolean indicating whether the mutual TLS authentication is enabled."""

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

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

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


class NfsAzureFileProperties(_Model):
    """NFS Azure File Properties.

    :ivar server: Server for NFS azure file. Specify the Azure storage account server address.
    :vartype server: str
    :ivar access_mode: Access mode for storage. Known values are: "ReadOnly" and "ReadWrite".
    :vartype access_mode: str or ~azure.mgmt.appcontainers.models.AccessMode
    :ivar share_name: NFS Azure file share name.
    :vartype share_name: str
    """

    server: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Server for NFS azure file. Specify the Azure storage account server address."""
    access_mode: Optional[Union[str, "_models.AccessMode"]] = rest_field(
        name="accessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access mode for storage. Known values are: \"ReadOnly\" and \"ReadWrite\"."""
    share_name: Optional[str] = rest_field(name="shareName", visibility=["read", "create", "update", "delete", "query"])
    """NFS Azure file share name."""

    @overload
    def __init__(
        self,
        *,
        server: Optional[str] = None,
        access_mode: Optional[Union[str, "_models.AccessMode"]] = None,
        share_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 Nonce(_Model):
    """The configuration settings of the nonce used in the login flow.

    :ivar validate_nonce: <code>false</code> if the nonce should not be validated while completing
     the login flow; otherwise, <code>true</code>.
    :vartype validate_nonce: bool
    :ivar nonce_expiration_interval: The time after the request is made when the nonce should
     expire.
    :vartype nonce_expiration_interval: str
    """

    validate_nonce: Optional[bool] = rest_field(
        name="validateNonce", visibility=["read", "create", "update", "delete", "query"]
    )
    """<code>false</code> if the nonce should not be validated while completing the login flow;
     otherwise, <code>true</code>."""
    nonce_expiration_interval: Optional[str] = rest_field(
        name="nonceExpirationInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time after the request is made when the nonce should expire."""

    @overload
    def __init__(
        self,
        *,
        validate_nonce: Optional[bool] = None,
        nonce_expiration_interval: 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 OpenIdConnectClientCredential(_Model):
    """The authentication client credentials of the custom Open ID Connect provider.

    :ivar method: The method that should be used to authenticate the user. Default value is
     "ClientSecretPost".
    :vartype method: str
    :ivar client_secret_setting_name: The app setting that contains the client secret for the
     custom Open ID Connect provider.
    :vartype client_secret_setting_name: str
    """

    method: Optional[Literal["ClientSecretPost"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The method that should be used to authenticate the user. Default value is \"ClientSecretPost\"."""
    client_secret_setting_name: Optional[str] = rest_field(
        name="clientSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting that contains the client secret for the custom Open ID Connect provider."""

    @overload
    def __init__(
        self,
        *,
        method: Optional[Literal["ClientSecretPost"]] = None,
        client_secret_setting_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 OpenIdConnectConfig(_Model):
    """The configuration settings of the endpoints used for the custom Open ID Connect provider.

    :ivar authorization_endpoint: The endpoint to be used to make an authorization request.
    :vartype authorization_endpoint: str
    :ivar token_endpoint: The endpoint to be used to request a token.
    :vartype token_endpoint: str
    :ivar issuer: The endpoint that issues the token.
    :vartype issuer: str
    :ivar certification_uri: The endpoint that provides the keys necessary to validate the token.
    :vartype certification_uri: str
    :ivar well_known_open_id_configuration: The endpoint that contains all the configuration
     endpoints for the provider.
    :vartype well_known_open_id_configuration: str
    """

    authorization_endpoint: Optional[str] = rest_field(
        name="authorizationEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint to be used to make an authorization request."""
    token_endpoint: Optional[str] = rest_field(
        name="tokenEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint to be used to request a token."""
    issuer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The endpoint that issues the token."""
    certification_uri: Optional[str] = rest_field(
        name="certificationUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint that provides the keys necessary to validate the token."""
    well_known_open_id_configuration: Optional[str] = rest_field(
        name="wellKnownOpenIdConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint that contains all the configuration endpoints for the provider."""

    @overload
    def __init__(
        self,
        *,
        authorization_endpoint: Optional[str] = None,
        token_endpoint: Optional[str] = None,
        issuer: Optional[str] = None,
        certification_uri: Optional[str] = None,
        well_known_open_id_configuration: 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 OpenIdConnectLogin(_Model):
    """The configuration settings of the login flow of the custom Open ID Connect provider.

    :ivar name_claim_type: The name of the claim that contains the users name.
    :vartype name_claim_type: str
    :ivar scopes: A list of the scopes that should be requested while authenticating.
    :vartype scopes: list[str]
    """

    name_claim_type: Optional[str] = rest_field(
        name="nameClaimType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the claim that contains the users name."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of the scopes that should be requested while authenticating."""

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

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

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


class OpenIdConnectRegistration(_Model):
    """The configuration settings of the app registration for the custom Open ID Connect provider.

    :ivar client_id: The client id of the custom Open ID Connect provider.
    :vartype client_id: str
    :ivar client_credential: The authentication credentials of the custom Open ID Connect provider.
    :vartype client_credential: ~azure.mgmt.appcontainers.models.OpenIdConnectClientCredential
    :ivar open_id_connect_configuration: The configuration settings of the endpoints used for the
     custom Open ID Connect provider.
    :vartype open_id_connect_configuration: ~azure.mgmt.appcontainers.models.OpenIdConnectConfig
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The client id of the custom Open ID Connect provider."""
    client_credential: Optional["_models.OpenIdConnectClientCredential"] = rest_field(
        name="clientCredential", visibility=["read", "create", "update", "delete", "query"]
    )
    """The authentication credentials of the custom Open ID Connect provider."""
    open_id_connect_configuration: Optional["_models.OpenIdConnectConfig"] = rest_field(
        name="openIdConnectConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the endpoints used for the custom Open ID Connect provider."""

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
        client_credential: Optional["_models.OpenIdConnectClientCredential"] = None,
        open_id_connect_configuration: Optional["_models.OpenIdConnectConfig"] = None,
    ) -> None: ...

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

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


class OperationDetail(_Model):
    """Operation detail payload.

    :ivar name: Name of the operation.
    :vartype name: str
    :ivar is_data_action: Indicates whether the operation is a data action.
    :vartype is_data_action: bool
    :ivar display: Display of the operation.
    :vartype display: ~azure.mgmt.appcontainers.models.OperationDisplay
    :ivar origin: Origin of the operation.
    :vartype origin: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the operation."""
    is_data_action: Optional[bool] = rest_field(
        name="isDataAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the operation is a data action."""
    display: Optional["_models.OperationDisplay"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Display of the operation."""
    origin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Origin of the operation."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        is_data_action: Optional[bool] = None,
        display: Optional["_models.OperationDisplay"] = None,
        origin: 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 OperationDisplay(_Model):
    """Operation display payload.

    :ivar provider: Resource provider of the operation.
    :vartype provider: str
    :ivar resource: Resource of the operation.
    :vartype resource: str
    :ivar operation: Localized friendly name for the operation.
    :vartype operation: str
    :ivar description: Localized friendly description for the operation.
    :vartype description: str
    """

    provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource provider of the operation."""
    resource: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource of the operation."""
    operation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Localized friendly name for the operation."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Localized friendly description for the operation."""

    @overload
    def __init__(
        self,
        *,
        provider: Optional[str] = None,
        resource: Optional[str] = None,
        operation: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

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

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


class PrivateEndpoint(_Model):
    """The Private Endpoint resource.

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

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


class PrivateEndpointConnection(ProxyResource):
    """The Private Endpoint Connection resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.PrivateEndpointConnectionProperties
    """

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

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

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class PrivateEndpointConnectionProperties(_Model):
    """Properties of the private endpoint connection.

    :ivar group_ids: The group ids for the private endpoint resource.
    :vartype group_ids: list[str]
    :ivar private_endpoint: The resource of private end point.
    :vartype private_endpoint: ~azure.mgmt.appcontainers.models.PrivateEndpoint
    :ivar private_link_service_connection_state: A collection of information about the state of the
     connection between service consumer and provider. Required.
    :vartype private_link_service_connection_state:
     ~azure.mgmt.appcontainers.models.PrivateLinkServiceConnectionState
    :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
     Known values are: "Succeeded", "Failed", "Canceled", "Waiting", "Updating", "Deleting", and
     "Pending".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.PrivateEndpointConnectionProvisioningState
    """

    group_ids: Optional[list[str]] = rest_field(name="groupIds", visibility=["read"])
    """The group ids for the private endpoint resource."""
    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(
        name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource of private end point."""
    private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field(
        name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of information about the state of the connection between service consumer and
     provider. Required."""
    provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the private endpoint connection resource. Known values are:
     \"Succeeded\", \"Failed\", \"Canceled\", \"Waiting\", \"Updating\", \"Deleting\", and
     \"Pending\"."""

    @overload
    def __init__(
        self,
        *,
        private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState",
        private_endpoint: Optional["_models.PrivateEndpoint"] = None,
    ) -> None: ...

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

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


class PrivateLinkResource(Resource):
    """A private link resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.PrivateLinkResourceProperties
    """

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

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

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
        super().__init__(*args, **kwargs)
        for k, v in _flattened_input.items():
            setattr(self, k, v)

    def __getattr__(self, name: str) -> Any:
        if name in self.__flattened_items:
            if self.properties is None:
                return None
            return getattr(self.properties, name)
        raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")

    def __setattr__(self, key: str, value: Any) -> None:
        if key in self.__flattened_items:
            if self.properties is None:
                self.properties = self._attr_to_rest_field["properties"]._class_type()
            setattr(self.properties, key, value)
        else:
            super().__setattr__(key, value)


class PrivateLinkResourceProperties(_Model):
    """Properties of a private link resource.

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

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

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

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

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


class PrivateLinkServiceConnectionState(_Model):
    """A collection of information about the state of the connection between service consumer and
    provider.

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

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

    @overload
    def __init__(
        self,
        *,
        status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None,
        description: Optional[str] = None,
        actions_required: Optional[str] = None,
    ) -> None: ...

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

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


class QueueScaleRule(_Model):
    """Container App container Azure Queue based scaling rule.

    :ivar account_name: Storage account name. required if using managed identity to authenticate.
    :vartype account_name: str
    :ivar queue_name: Queue name.
    :vartype queue_name: str
    :ivar queue_length: Queue length.
    :vartype queue_length: int
    :ivar auth: Authentication secrets for the queue scale rule.
    :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Container App, or 'system' for system-assigned identity.
    :vartype identity: str
    """

    account_name: Optional[str] = rest_field(
        name="accountName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage account name. required if using managed identity to authenticate."""
    queue_name: Optional[str] = rest_field(name="queueName", visibility=["read", "create", "update", "delete", "query"])
    """Queue name."""
    queue_length: Optional[int] = rest_field(
        name="queueLength", visibility=["read", "create", "update", "delete", "query"]
    )
    """Queue length."""
    auth: Optional[list["_models.ScaleRuleAuth"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authentication secrets for the queue scale rule."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Container App, or
     'system' for system-assigned identity."""

    @overload
    def __init__(
        self,
        *,
        account_name: Optional[str] = None,
        queue_name: Optional[str] = None,
        queue_length: Optional[int] = None,
        auth: Optional[list["_models.ScaleRuleAuth"]] = None,
        identity: 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 RegistryCredentials(_Model):
    """Container App Private Registry.

    :ivar server: Container Registry Server.
    :vartype server: str
    :ivar username: Container Registry Username.
    :vartype username: str
    :ivar password_secret_ref: The name of the Secret that contains the registry login password.
    :vartype password_secret_ref: str
    :ivar identity: A Managed Identity to use to authenticate with Azure Container Registry. For
     user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
     identities, use 'system'.
    :vartype identity: str
    """

    server: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container Registry Server."""
    username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container Registry Username."""
    password_secret_ref: Optional[str] = rest_field(
        name="passwordSecretRef", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the Secret that contains the registry login password."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned
     identities, use the full user-assigned identity Resource ID. For system-assigned identities,
     use 'system'."""

    @overload
    def __init__(
        self,
        *,
        server: Optional[str] = None,
        username: Optional[str] = None,
        password_secret_ref: Optional[str] = None,
        identity: 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 RegistryInfo(_Model):
    """Container App registry information.

    :ivar registry_url: registry server Url.
    :vartype registry_url: str
    :ivar registry_user_name: registry username.
    :vartype registry_user_name: str
    :ivar registry_password: registry secret.
    :vartype registry_password: str
    """

    registry_url: Optional[str] = rest_field(
        name="registryUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """registry server Url."""
    registry_user_name: Optional[str] = rest_field(
        name="registryUserName", visibility=["read", "create", "update", "delete", "query"]
    )
    """registry username."""
    registry_password: Optional[str] = rest_field(name="registryPassword", visibility=["create", "update"])
    """registry secret."""

    @overload
    def __init__(
        self,
        *,
        registry_url: Optional[str] = None,
        registry_user_name: Optional[str] = None,
        registry_password: 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 Replica(ProxyResource):
    """Container App Revision Replica.

    :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.appcontainers.models.SystemData
    :ivar properties: Replica resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.ReplicaProperties
    """

    properties: Optional["_models.ReplicaProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Replica resource specific properties."""

    __flattened_items = ["created_time", "running_state", "running_state_details", "containers", "init_containers"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ReplicaCollection(_Model):
    """Container App Revision Replicas collection ARM resource.

    :ivar value: Collection of resources. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.Replica]
    """

    value: list["_models.Replica"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of resources. Required."""

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

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

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


class ReplicaContainer(_Model):
    """Container object under Container App Revision Replica.

    :ivar name: The Name of the Container.
    :vartype name: str
    :ivar container_id: The Id of the Container.
    :vartype container_id: str
    :ivar ready: The container ready status.
    :vartype ready: bool
    :ivar started: The container start status.
    :vartype started: bool
    :ivar restart_count: The container restart count.
    :vartype restart_count: int
    :ivar running_state: Current running state of the container. Known values are: "Running",
     "Terminated", and "Waiting".
    :vartype running_state: str or
     ~azure.mgmt.appcontainers.models.ContainerAppContainerRunningState
    :ivar running_state_details: The details of container current running state.
    :vartype running_state_details: str
    :ivar log_stream_endpoint: Log Stream endpoint.
    :vartype log_stream_endpoint: str
    :ivar exec_endpoint: Container exec endpoint.
    :vartype exec_endpoint: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Name of the Container."""
    container_id: Optional[str] = rest_field(
        name="containerId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Id of the Container."""
    ready: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The container ready status."""
    started: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The container start status."""
    restart_count: Optional[int] = rest_field(
        name="restartCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The container restart count."""
    running_state: Optional[Union[str, "_models.ContainerAppContainerRunningState"]] = rest_field(
        name="runningState", visibility=["read"]
    )
    """Current running state of the container. Known values are: \"Running\", \"Terminated\", and
     \"Waiting\"."""
    running_state_details: Optional[str] = rest_field(name="runningStateDetails", visibility=["read"])
    """The details of container current running state."""
    log_stream_endpoint: Optional[str] = rest_field(name="logStreamEndpoint", visibility=["read"])
    """Log Stream endpoint."""
    exec_endpoint: Optional[str] = rest_field(name="execEndpoint", visibility=["read"])
    """Container exec endpoint."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        container_id: Optional[str] = None,
        ready: Optional[bool] = None,
        started: Optional[bool] = None,
        restart_count: Optional[int] = None,
    ) -> None: ...

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

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


class ReplicaProperties(_Model):
    """Replica resource specific properties.

    :ivar created_time: Timestamp describing when the pod was created by controller.
    :vartype created_time: ~datetime.datetime
    :ivar running_state: Current running state of the replica. Known values are: "Running",
     "NotRunning", and "Unknown".
    :vartype running_state: str or ~azure.mgmt.appcontainers.models.ContainerAppReplicaRunningState
    :ivar running_state_details: The details of replica current running state.
    :vartype running_state_details: str
    :ivar containers: The containers collection under a replica.
    :vartype containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
    :ivar init_containers: The init containers collection under a replica.
    :vartype init_containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
    """

    created_time: Optional[datetime.datetime] = rest_field(name="createdTime", visibility=["read"], format="rfc3339")
    """Timestamp describing when the pod was created by controller."""
    running_state: Optional[Union[str, "_models.ContainerAppReplicaRunningState"]] = rest_field(
        name="runningState", visibility=["read"]
    )
    """Current running state of the replica. Known values are: \"Running\", \"NotRunning\", and
     \"Unknown\"."""
    running_state_details: Optional[str] = rest_field(name="runningStateDetails", visibility=["read"])
    """The details of replica current running state."""
    containers: Optional[list["_models.ReplicaContainer"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The containers collection under a replica."""
    init_containers: Optional[list["_models.ReplicaContainer"]] = rest_field(
        name="initContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The init containers collection under a replica."""

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

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

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


class Revision(ProxyResource):
    """Container App Revision.

    :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.appcontainers.models.SystemData
    :ivar properties: Revision resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.RevisionProperties
    """

    properties: Optional["_models.RevisionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Revision resource specific properties."""

    __flattened_items = [
        "created_time",
        "last_active_time",
        "fqdn",
        "template",
        "active",
        "replicas",
        "traffic_weight",
        "provisioning_error",
        "health_state",
        "provisioning_state",
        "running_state",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 RevisionProperties(_Model):
    """Revision resource specific properties.

    :ivar created_time: Timestamp describing when the revision was created by controller.
    :vartype created_time: ~datetime.datetime
    :ivar last_active_time: Timestamp describing when the revision was last active. Only meaningful
     when revision is inactive.
    :vartype last_active_time: ~datetime.datetime
    :ivar fqdn: Fully qualified domain name of the revision.
    :vartype fqdn: str
    :ivar template: Container App Revision Template with all possible settings and the defaults if
     user did not provide them. The defaults are populated as they were at the creation time.
    :vartype template: ~azure.mgmt.appcontainers.models.Template
    :ivar active: Boolean describing if the Revision is Active.
    :vartype active: bool
    :ivar replicas: Number of pods currently running for this revision.
    :vartype replicas: int
    :ivar traffic_weight: Traffic weight assigned to this revision.
    :vartype traffic_weight: int
    :ivar provisioning_error: Optional Field - Platform Error Message.
    :vartype provisioning_error: str
    :ivar health_state: Current health State of the revision. Known values are: "Healthy",
     "Unhealthy", and "None".
    :vartype health_state: str or ~azure.mgmt.appcontainers.models.RevisionHealthState
    :ivar provisioning_state: Current provisioning State of the revision. Known values are:
     "Provisioning", "Provisioned", "Failed", "Deprovisioning", and "Deprovisioned".
    :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.RevisionProvisioningState
    :ivar running_state: Current running state of the revision. Known values are: "Running",
     "Processing", "Stopped", "Degraded", "Failed", and "Unknown".
    :vartype running_state: str or ~azure.mgmt.appcontainers.models.RevisionRunningState
    """

    created_time: Optional[datetime.datetime] = rest_field(name="createdTime", visibility=["read"], format="rfc3339")
    """Timestamp describing when the revision was created by controller."""
    last_active_time: Optional[datetime.datetime] = rest_field(
        name="lastActiveTime", visibility=["read"], format="rfc3339"
    )
    """Timestamp describing when the revision was last active. Only meaningful when revision is
     inactive."""
    fqdn: Optional[str] = rest_field(visibility=["read"])
    """Fully qualified domain name of the revision."""
    template: Optional["_models.Template"] = rest_field(visibility=["read"])
    """Container App Revision Template with all possible settings and the defaults if user did not
     provide them. The defaults are populated as they were at the creation time."""
    active: Optional[bool] = rest_field(visibility=["read"])
    """Boolean describing if the Revision is Active."""
    replicas: Optional[int] = rest_field(visibility=["read"])
    """Number of pods currently running for this revision."""
    traffic_weight: Optional[int] = rest_field(name="trafficWeight", visibility=["read"])
    """Traffic weight assigned to this revision."""
    provisioning_error: Optional[str] = rest_field(name="provisioningError", visibility=["read"])
    """Optional Field - Platform Error Message."""
    health_state: Optional[Union[str, "_models.RevisionHealthState"]] = rest_field(
        name="healthState", visibility=["read"]
    )
    """Current health State of the revision. Known values are: \"Healthy\", \"Unhealthy\", and
     \"None\"."""
    provisioning_state: Optional[Union[str, "_models.RevisionProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Current provisioning State of the revision. Known values are: \"Provisioning\",
     \"Provisioned\", \"Failed\", \"Deprovisioning\", and \"Deprovisioned\"."""
    running_state: Optional[Union[str, "_models.RevisionRunningState"]] = rest_field(
        name="runningState", visibility=["read"]
    )
    """Current running state of the revision. Known values are: \"Running\", \"Processing\",
     \"Stopped\", \"Degraded\", \"Failed\", and \"Unknown\"."""


class Runtime(_Model):
    """Container App Runtime configuration.

    :ivar java: Java app configuration.
    :vartype java: ~azure.mgmt.appcontainers.models.RuntimeJava
    """

    java: Optional["_models.RuntimeJava"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Java app configuration."""

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

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

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


class RuntimeJava(_Model):
    """Java app configuration.

    :ivar enable_metrics: Enable jmx core metrics for the java app.
    :vartype enable_metrics: bool
    """

    enable_metrics: Optional[bool] = rest_field(
        name="enableMetrics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enable jmx core metrics for the java app."""

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

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

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


class Scale(_Model):
    """Container App scaling configurations.

    :ivar min_replicas: Optional. Minimum number of container replicas.
    :vartype min_replicas: int
    :ivar max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not set.
    :vartype max_replicas: int
    :ivar cooldown_period: Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if
     not set.
    :vartype cooldown_period: int
    :ivar polling_interval: Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if
     not set.
    :vartype polling_interval: int
    :ivar rules: Scaling rules.
    :vartype rules: list[~azure.mgmt.appcontainers.models.ScaleRule]
    """

    min_replicas: Optional[int] = rest_field(
        name="minReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Minimum number of container replicas."""
    max_replicas: Optional[int] = rest_field(
        name="maxReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Maximum number of container replicas. Defaults to 10 if not set."""
    cooldown_period: Optional[int] = rest_field(
        name="cooldownPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set."""
    polling_interval: Optional[int] = rest_field(
        name="pollingInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set."""
    rules: Optional[list["_models.ScaleRule"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scaling rules."""

    @overload
    def __init__(
        self,
        *,
        min_replicas: Optional[int] = None,
        max_replicas: Optional[int] = None,
        cooldown_period: Optional[int] = None,
        polling_interval: Optional[int] = None,
        rules: Optional[list["_models.ScaleRule"]] = None,
    ) -> None: ...

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

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


class ScaleConfiguration(_Model):
    """Scale configuration.

    :ivar max_concurrent_sessions: The maximum count of sessions at the same time.
    :vartype max_concurrent_sessions: int
    :ivar ready_session_instances: The minimum count of ready session instances.
    :vartype ready_session_instances: int
    """

    max_concurrent_sessions: Optional[int] = rest_field(
        name="maxConcurrentSessions", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum count of sessions at the same time."""
    ready_session_instances: Optional[int] = rest_field(
        name="readySessionInstances", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum count of ready session instances."""

    @overload
    def __init__(
        self,
        *,
        max_concurrent_sessions: Optional[int] = None,
        ready_session_instances: Optional[int] = None,
    ) -> None: ...

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

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


class ScaleRule(_Model):
    """Container App container scaling rule.

    :ivar name: Scale Rule Name.
    :vartype name: str
    :ivar azure_queue: Azure Queue based scaling.
    :vartype azure_queue: ~azure.mgmt.appcontainers.models.QueueScaleRule
    :ivar custom: Custom scale rule.
    :vartype custom: ~azure.mgmt.appcontainers.models.CustomScaleRule
    :ivar http: HTTP requests based scaling.
    :vartype http: ~azure.mgmt.appcontainers.models.HttpScaleRule
    :ivar tcp: Tcp requests based scaling.
    :vartype tcp: ~azure.mgmt.appcontainers.models.TcpScaleRule
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scale Rule Name."""
    azure_queue: Optional["_models.QueueScaleRule"] = rest_field(
        name="azureQueue", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Queue based scaling."""
    custom: Optional["_models.CustomScaleRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom scale rule."""
    http: Optional["_models.HttpScaleRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """HTTP requests based scaling."""
    tcp: Optional["_models.TcpScaleRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Tcp requests based scaling."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        azure_queue: Optional["_models.QueueScaleRule"] = None,
        custom: Optional["_models.CustomScaleRule"] = None,
        http: Optional["_models.HttpScaleRule"] = None,
        tcp: Optional["_models.TcpScaleRule"] = None,
    ) -> None: ...

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

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


class ScaleRuleAuth(_Model):
    """Auth Secrets for Scale Rule.

    :ivar secret_ref: Name of the secret from which to pull the auth params.
    :vartype secret_ref: str
    :ivar trigger_parameter: Trigger Parameter that uses the secret.
    :vartype trigger_parameter: str
    """

    secret_ref: Optional[str] = rest_field(name="secretRef", visibility=["read", "create", "update", "delete", "query"])
    """Name of the secret from which to pull the auth params."""
    trigger_parameter: Optional[str] = rest_field(
        name="triggerParameter", visibility=["read", "create", "update", "delete", "query"]
    )
    """Trigger Parameter that uses the secret."""

    @overload
    def __init__(
        self,
        *,
        secret_ref: Optional[str] = None,
        trigger_parameter: 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 ScheduledEntries(_Model):
    """List of maintenance schedules for a managed environment.

    :ivar scheduled_entries: List of maintenance schedules for a managed environment. Required.
    :vartype scheduled_entries: list[~azure.mgmt.appcontainers.models.ScheduledEntry]
    """

    scheduled_entries: list["_models.ScheduledEntry"] = rest_field(
        name="scheduledEntries", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of maintenance schedules for a managed environment. Required."""

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

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

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


class ScheduledEntry(_Model):
    """Maintenance schedule entry for a managed environment.

    :ivar week_day: Day of the week when a managed environment can be patched. Required. Known
     values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
    :vartype week_day: str or ~azure.mgmt.appcontainers.models.WeekDay
    :ivar start_hour_utc: Start hour after which managed environment maintenance can start from 0
     to 23 hour. Required.
    :vartype start_hour_utc: int
    :ivar duration_hours: Length of maintenance window range from 8 to 24 hours. Required.
    :vartype duration_hours: int
    """

    week_day: Union[str, "_models.WeekDay"] = rest_field(
        name="weekDay", visibility=["read", "create", "update", "delete", "query"]
    )
    """Day of the week when a managed environment can be patched. Required. Known values are:
     \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", and \"Sunday\"."""
    start_hour_utc: int = rest_field(name="startHourUtc", visibility=["read", "create", "update", "delete", "query"])
    """Start hour after which managed environment maintenance can start from 0 to 23 hour. Required."""
    duration_hours: int = rest_field(name="durationHours", visibility=["read", "create", "update", "delete", "query"])
    """Length of maintenance window range from 8 to 24 hours. Required."""

    @overload
    def __init__(
        self,
        *,
        week_day: Union[str, "_models.WeekDay"],
        start_hour_utc: int,
        duration_hours: int,
    ) -> None: ...

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

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


class Secret(_Model):
    """Secret definition.

    :ivar name: Secret Name.
    :vartype name: str
    :ivar value: Secret Value.
    :vartype value: str
    :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
     System to use a system-assigned identity.
    :vartype identity: str
    :ivar key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
     app.
    :vartype key_vault_url: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Secret Name."""
    value: Optional[str] = rest_field(visibility=["create", "update"])
    """Secret Value."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a
     system-assigned identity."""
    key_vault_url: Optional[str] = rest_field(
        name="keyVaultUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Key Vault URL pointing to the secret referenced by the container app."""

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

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

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


class SecretKeyVaultProperties(_Model):
    """Properties for a secret stored in a Key Vault.

    :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
     System to use a system-assigned identity.
    :vartype identity: str
    :ivar key_vault_url: URL pointing to the Azure Key Vault secret.
    :vartype key_vault_url: str
    """

    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a
     system-assigned identity."""
    key_vault_url: Optional[str] = rest_field(
        name="keyVaultUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """URL pointing to the Azure Key Vault secret."""

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

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

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


class SecretsCollection(_Model):
    """Container App Secrets Collection ARM resource.

    :ivar value: Collection of resources. Required.
    :vartype value: list[~azure.mgmt.appcontainers.models.ContainerAppSecret]
    """

    value: list["_models.ContainerAppSecret"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Collection of resources. Required."""

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

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

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


class SecretVolumeItem(_Model):
    """Secret to be added to volume.

    :ivar secret_ref: Name of the Container App secret from which to pull the secret value.
    :vartype secret_ref: str
    :ivar path: Path to project secret to. If no path is provided, path defaults to name of secret
     listed in secretRef.
    :vartype path: str
    """

    secret_ref: Optional[str] = rest_field(name="secretRef", visibility=["read", "create", "update", "delete", "query"])
    """Name of the Container App secret from which to pull the secret value."""
    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path to project secret to. If no path is provided, path defaults to name of secret listed in
     secretRef."""

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

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

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


class Service(_Model):
    """Container App to be a dev service.

    :ivar type: Dev ContainerApp service type. Required.
    :vartype type: str
    """

    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Dev ContainerApp service type. Required."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

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

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


class ServiceBind(_Model):
    """Configuration to bind a ContainerApp to a dev ContainerApp Service.

    :ivar service_id: Resource id of the target service.
    :vartype service_id: str
    :ivar name: Name of the service bind.
    :vartype name: str
    """

    service_id: Optional[str] = rest_field(name="serviceId", visibility=["read", "create", "update", "delete", "query"])
    """Resource id of the target service."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the service bind."""

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

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

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


class SessionContainer(_Model):
    """Container definitions for the sessions of the session pool.

    :ivar image: Container image tag.
    :vartype image: str
    :ivar name: Custom container name.
    :vartype name: str
    :ivar command: Container start command.
    :vartype command: list[str]
    :ivar args: Container start command arguments.
    :vartype args: list[str]
    :ivar env: Container environment variables.
    :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
    :ivar resources: Container resource requirements.
    :vartype resources: ~azure.mgmt.appcontainers.models.SessionContainerResources
    """

    image: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container image tag."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom container name."""
    command: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command."""
    args: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container start command arguments."""
    env: Optional[list["_models.EnvironmentVar"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container environment variables."""
    resources: Optional["_models.SessionContainerResources"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container resource requirements."""

    @overload
    def __init__(
        self,
        *,
        image: Optional[str] = None,
        name: Optional[str] = None,
        command: Optional[list[str]] = None,
        args: Optional[list[str]] = None,
        env: Optional[list["_models.EnvironmentVar"]] = None,
        resources: Optional["_models.SessionContainerResources"] = None,
    ) -> None: ...

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

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


class SessionContainerResources(_Model):
    """Container resource requirements for sessions of the session pool.

    :ivar cpu: Required CPU in cores, e.g. 0.5.
    :vartype cpu: float
    :ivar memory: Required memory, e.g. "250Mb".
    :vartype memory: str
    """

    cpu: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required CPU in cores, e.g. 0.5."""
    memory: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required memory, e.g. \"250Mb\"."""

    @overload
    def __init__(
        self,
        *,
        cpu: Optional[float] = None,
        memory: 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 SessionIngress(_Model):
    """Session pool ingress configuration.

    :ivar target_port: Target port in containers for traffic from ingress.
    :vartype target_port: int
    """

    target_port: Optional[int] = rest_field(
        name="targetPort", visibility=["read", "create", "update", "delete", "query"]
    )
    """Target port in containers for traffic from ingress."""

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

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

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


class SessionNetworkConfiguration(_Model):
    """Session network configuration.

    :ivar status: Network status for the sessions. Known values are: "EgressEnabled" and
     "EgressDisabled".
    :vartype status: str or ~azure.mgmt.appcontainers.models.SessionNetworkStatus
    """

    status: Optional[Union[str, "_models.SessionNetworkStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Network status for the sessions. Known values are: \"EgressEnabled\" and \"EgressDisabled\"."""

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

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

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


class SessionPool(TrackedResource):
    """Container App session pool.

    :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.appcontainers.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Container App session pool resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.SessionPoolProperties
    :ivar identity: The managed service identities assigned to this resource.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    """

    properties: Optional["_models.SessionPoolProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Container App session pool resource specific properties."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed service identities assigned to this resource."""

    __flattened_items = [
        "environment_id",
        "container_type",
        "pool_management_type",
        "node_count",
        "scale_configuration",
        "secrets",
        "dynamic_pool_configuration",
        "custom_container_template",
        "session_network_configuration",
        "pool_management_endpoint",
        "provisioning_state",
        "managed_identity_settings",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SessionPoolProperties(_Model):
    """Container App session pool resource specific properties.

    :ivar environment_id: Resource ID of the session pool's environment.
    :vartype environment_id: str
    :ivar container_type: The container type of the sessions. You can use your own container to
     build the session pool, or you can use a predefined container to run workload with specific
     language. Known values are: "CustomContainer" and "PythonLTS".
    :vartype container_type: str or ~azure.mgmt.appcontainers.models.ContainerType
    :ivar pool_management_type: The pool management type of the session pool. Known values are:
     "Manual" and "Dynamic".
    :vartype pool_management_type: str or ~azure.mgmt.appcontainers.models.PoolManagementType
    :ivar node_count: The number of nodes the session pool is using.
    :vartype node_count: int
    :ivar scale_configuration: The scale configuration of the session pool.
    :vartype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
    :ivar secrets: The secrets of the session pool.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.SessionPoolSecret]
    :ivar dynamic_pool_configuration: The pool configuration if the poolManagementType is dynamic.
    :vartype dynamic_pool_configuration: ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
    :ivar custom_container_template: The custom container configuration if the containerType is
     CustomContainer.
    :vartype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
    :ivar session_network_configuration: The network configuration of the sessions in the session
     pool.
    :vartype session_network_configuration:
     ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
    :ivar pool_management_endpoint: The endpoint to manage the pool.
    :vartype pool_management_endpoint: str
    :ivar provisioning_state: Provisioning state of the session pool. Known values are:
     "InProgress", "Succeeded", "Failed", "Canceled", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.SessionPoolProvisioningState
    :ivar managed_identity_settings: Optional settings for a Managed Identity that is assigned to
     the Session pool.
    :vartype managed_identity_settings:
     list[~azure.mgmt.appcontainers.models.ManagedIdentitySetting]
    """

    environment_id: Optional[str] = rest_field(name="environmentId", visibility=["read", "create"])
    """Resource ID of the session pool's environment."""
    container_type: Optional[Union[str, "_models.ContainerType"]] = rest_field(
        name="containerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The container type of the sessions. You can use your own container to build the session pool,
     or you can use a predefined container to run workload with specific language. Known values are:
     \"CustomContainer\" and \"PythonLTS\"."""
    pool_management_type: Optional[Union[str, "_models.PoolManagementType"]] = rest_field(
        name="poolManagementType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The pool management type of the session pool. Known values are: \"Manual\" and \"Dynamic\"."""
    node_count: Optional[int] = rest_field(name="nodeCount", visibility=["read"])
    """The number of nodes the session pool is using."""
    scale_configuration: Optional["_models.ScaleConfiguration"] = rest_field(
        name="scaleConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scale configuration of the session pool."""
    secrets: Optional[list["_models.SessionPoolSecret"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The secrets of the session pool."""
    dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = rest_field(
        name="dynamicPoolConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The pool configuration if the poolManagementType is dynamic."""
    custom_container_template: Optional["_models.CustomContainerTemplate"] = rest_field(
        name="customContainerTemplate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The custom container configuration if the containerType is CustomContainer."""
    session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = rest_field(
        name="sessionNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The network configuration of the sessions in the session pool."""
    pool_management_endpoint: Optional[str] = rest_field(name="poolManagementEndpoint", visibility=["read"])
    """The endpoint to manage the pool."""
    provisioning_state: Optional[Union[str, "_models.SessionPoolProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the session pool. Known values are: \"InProgress\", \"Succeeded\",
     \"Failed\", \"Canceled\", and \"Deleting\"."""
    managed_identity_settings: Optional[list["_models.ManagedIdentitySetting"]] = rest_field(
        name="managedIdentitySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional settings for a Managed Identity that is assigned to the Session pool."""

    @overload
    def __init__(
        self,
        *,
        environment_id: Optional[str] = None,
        container_type: Optional[Union[str, "_models.ContainerType"]] = None,
        pool_management_type: Optional[Union[str, "_models.PoolManagementType"]] = None,
        scale_configuration: Optional["_models.ScaleConfiguration"] = None,
        secrets: Optional[list["_models.SessionPoolSecret"]] = None,
        dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = None,
        custom_container_template: Optional["_models.CustomContainerTemplate"] = None,
        session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = None,
        managed_identity_settings: Optional[list["_models.ManagedIdentitySetting"]] = None,
    ) -> None: ...

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

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


class SessionPoolSecret(_Model):
    """Secret definition.

    :ivar name: Secret Name.
    :vartype name: str
    :ivar value: Secret Value.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Secret Name."""
    value: Optional[str] = rest_field(visibility=["create", "update"])
    """Secret Value."""

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

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

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


class SessionPoolUpdatableProperties(_Model):
    """Container App session pool updatable properties.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar identity: Managed identities needed by a session pool to interact with other Azure
     services to not maintain any secrets or credentials in code.
    :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
    :ivar properties: Session pool resource specific updatable properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.SessionPoolUpdatablePropertiesProperties
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed identities needed by a session pool to interact with other Azure services to not
     maintain any secrets or credentials in code."""
    properties: Optional["_models.SessionPoolUpdatablePropertiesProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Session pool resource specific updatable properties."""

    __flattened_items = [
        "scale_configuration",
        "secrets",
        "dynamic_pool_configuration",
        "custom_container_template",
        "session_network_configuration",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SessionPoolUpdatablePropertiesProperties(_Model):
    """Session pool resource specific updatable properties.

    :ivar scale_configuration: The scale configuration of the session pool.
    :vartype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
    :ivar secrets: The secrets of the session pool.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.SessionPoolSecret]
    :ivar dynamic_pool_configuration: The pool configuration if the poolManagementType is dynamic.
    :vartype dynamic_pool_configuration: ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
    :ivar custom_container_template: The custom container configuration if the containerType is
     CustomContainer.
    :vartype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
    :ivar session_network_configuration: The network configuration of the sessions in the session
     pool.
    :vartype session_network_configuration:
     ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
    """

    scale_configuration: Optional["_models.ScaleConfiguration"] = rest_field(
        name="scaleConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scale configuration of the session pool."""
    secrets: Optional[list["_models.SessionPoolSecret"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The secrets of the session pool."""
    dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = rest_field(
        name="dynamicPoolConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The pool configuration if the poolManagementType is dynamic."""
    custom_container_template: Optional["_models.CustomContainerTemplate"] = rest_field(
        name="customContainerTemplate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The custom container configuration if the containerType is CustomContainer."""
    session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = rest_field(
        name="sessionNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The network configuration of the sessions in the session pool."""

    @overload
    def __init__(
        self,
        *,
        scale_configuration: Optional["_models.ScaleConfiguration"] = None,
        secrets: Optional[list["_models.SessionPoolSecret"]] = None,
        dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = None,
        custom_container_template: Optional["_models.CustomContainerTemplate"] = None,
        session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = None,
    ) -> None: ...

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

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


class SessionRegistryCredentials(_Model):
    """Session pool private registry credentials.

    :ivar server: Container registry server.
    :vartype server: str
    :ivar username: Container registry username.
    :vartype username: str
    :ivar password_secret_ref: The name of the secret that contains the registry login password.
    :vartype password_secret_ref: str
    :ivar identity: A Managed Identity to use to authenticate with Azure Container Registry. For
     user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
     identities, use 'system'.
    :vartype identity: str
    """

    server: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container registry server."""
    username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Container registry username."""
    password_secret_ref: Optional[str] = rest_field(
        name="passwordSecretRef", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the secret that contains the registry login password."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned
     identities, use the full user-assigned identity Resource ID. For system-assigned identities,
     use 'system'."""

    @overload
    def __init__(
        self,
        *,
        server: Optional[str] = None,
        username: Optional[str] = None,
        password_secret_ref: Optional[str] = None,
        identity: 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 SourceControl(ProxyResource):
    """Container App SourceControl.

    :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.appcontainers.models.SystemData
    :ivar properties: SourceControl resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.SourceControlProperties
    """

    properties: Optional["_models.SourceControlProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """SourceControl resource specific properties."""

    __flattened_items = ["operation_state", "repo_url", "branch", "github_action_configuration"]

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

    @overload
    def __init__(self, mapping: Mapping[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 SourceControlProperties(_Model):
    """SourceControl resource specific properties.

    :ivar operation_state: Current provisioning State of the operation. Known values are:
     "InProgress", "Succeeded", "Failed", and "Canceled".
    :vartype operation_state: str or ~azure.mgmt.appcontainers.models.SourceControlOperationState
    :ivar repo_url: The repo url which will be integrated to ContainerApp.
    :vartype repo_url: str
    :ivar branch: The branch which will trigger the auto deployment.
    :vartype branch: str
    :ivar github_action_configuration: Container App Revision Template with all possible settings
     and the defaults if user did not provide them. The defaults are populated as they were at the
     creation time.
    :vartype github_action_configuration:
     ~azure.mgmt.appcontainers.models.GithubActionConfiguration
    """

    operation_state: Optional[Union[str, "_models.SourceControlOperationState"]] = rest_field(
        name="operationState", visibility=["read"]
    )
    """Current provisioning State of the operation. Known values are: \"InProgress\", \"Succeeded\",
     \"Failed\", and \"Canceled\"."""
    repo_url: Optional[str] = rest_field(name="repoUrl", visibility=["read", "create", "update", "delete", "query"])
    """The repo url which will be integrated to ContainerApp."""
    branch: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The branch which will trigger the auto deployment."""
    github_action_configuration: Optional["_models.GithubActionConfiguration"] = rest_field(
        name="githubActionConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Container App Revision Template with all possible settings and the defaults if user did not
     provide them. The defaults are populated as they were at the creation time."""

    @overload
    def __init__(
        self,
        *,
        repo_url: Optional[str] = None,
        branch: Optional[str] = None,
        github_action_configuration: Optional["_models.GithubActionConfiguration"] = None,
    ) -> None: ...

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

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


class SpringBootAdminComponent(JavaComponentProperties, discriminator="SpringBootAdmin"):
    """Spring Boot Admin properties.

    :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
     "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
    :ivar configurations: List of Java Components configuration properties.
    :vartype configurations:
     list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
    :ivar scale: Java component scaling configurations.
    :vartype scale: ~azure.mgmt.appcontainers.models.JavaComponentPropertiesScale
    :ivar service_binds: List of Java Components that are bound to the Java component.
    :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
    :ivar ingress: Java Component Ingress configurations.
    :vartype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
    :ivar component_type: Type of the Java Component. Required. SpringBootAdmin.
    :vartype component_type: str or ~azure.mgmt.appcontainers.models.SPRING_BOOT_ADMIN
    """

    ingress: Optional["_models.JavaComponentIngress"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Java Component Ingress configurations."""
    component_type: Literal[JavaComponentType.SPRING_BOOT_ADMIN] = rest_discriminator(name="componentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of the Java Component. Required. SpringBootAdmin."""

    @overload
    def __init__(
        self,
        *,
        configurations: Optional[list["_models.JavaComponentConfigurationProperty"]] = None,
        scale: Optional["_models.JavaComponentPropertiesScale"] = None,
        service_binds: Optional[list["_models.JavaComponentServiceBind"]] = None,
        ingress: Optional["_models.JavaComponentIngress"] = None,
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.component_type = JavaComponentType.SPRING_BOOT_ADMIN  # type: ignore


class SpringCloudConfigComponent(JavaComponentProperties, discriminator="SpringCloudConfig"):
    """Spring Cloud Config properties.

    :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
     "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
    :ivar configurations: List of Java Components configuration properties.
    :vartype configurations:
     list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
    :ivar scale: Java component scaling configurations.
    :vartype scale: ~azure.mgmt.appcontainers.models.JavaComponentPropertiesScale
    :ivar service_binds: List of Java Components that are bound to the Java component.
    :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
    :ivar component_type: Type of the Java Component. Required. SpringCloudConfig.
    :vartype component_type: str or ~azure.mgmt.appcontainers.models.SPRING_CLOUD_CONFIG
    """

    component_type: Literal[JavaComponentType.SPRING_CLOUD_CONFIG] = rest_discriminator(name="componentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of the Java Component. Required. SpringCloudConfig."""

    @overload
    def __init__(
        self,
        *,
        configurations: Optional[list["_models.JavaComponentConfigurationProperty"]] = None,
        scale: Optional["_models.JavaComponentPropertiesScale"] = None,
        service_binds: Optional[list["_models.JavaComponentServiceBind"]] = None,
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.component_type = JavaComponentType.SPRING_CLOUD_CONFIG  # type: ignore


class SpringCloudEurekaComponent(JavaComponentProperties, discriminator="SpringCloudEureka"):
    """Spring Cloud Eureka properties.

    :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
     "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
    :vartype provisioning_state: str or
     ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
    :ivar configurations: List of Java Components configuration properties.
    :vartype configurations:
     list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
    :ivar scale: Java component scaling configurations.
    :vartype scale: ~azure.mgmt.appcontainers.models.JavaComponentPropertiesScale
    :ivar service_binds: List of Java Components that are bound to the Java component.
    :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
    :ivar ingress: Java Component Ingress configurations.
    :vartype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
    :ivar component_type: Type of the Java Component. Required. SpringCloudEureka.
    :vartype component_type: str or ~azure.mgmt.appcontainers.models.SPRING_CLOUD_EUREKA
    """

    ingress: Optional["_models.JavaComponentIngress"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Java Component Ingress configurations."""
    component_type: Literal[JavaComponentType.SPRING_CLOUD_EUREKA] = rest_discriminator(name="componentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of the Java Component. Required. SpringCloudEureka."""

    @overload
    def __init__(
        self,
        *,
        configurations: Optional[list["_models.JavaComponentConfigurationProperty"]] = None,
        scale: Optional["_models.JavaComponentPropertiesScale"] = None,
        service_binds: Optional[list["_models.JavaComponentServiceBind"]] = None,
        ingress: Optional["_models.JavaComponentIngress"] = None,
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.component_type = JavaComponentType.SPRING_CLOUD_EUREKA  # type: ignore


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.appcontainers.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.appcontainers.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 TcpScaleRule(_Model):
    """Container App container Tcp scaling rule.

    :ivar metadata: Metadata properties to describe tcp scale rule.
    :vartype metadata: dict[str, str]
    :ivar auth: Authentication secrets for the tcp scale rule.
    :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
    :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
     Container App, or 'system' for system-assigned identity.
    :vartype identity: str
    """

    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Metadata properties to describe tcp scale rule."""
    auth: Optional[list["_models.ScaleRuleAuth"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authentication secrets for the tcp scale rule."""
    identity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of a user-assigned managed identity that is assigned to the Container App, or
     'system' for system-assigned identity."""

    @overload
    def __init__(
        self,
        *,
        metadata: Optional[dict[str, str]] = None,
        auth: Optional[list["_models.ScaleRuleAuth"]] = None,
        identity: 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 Template(_Model):
    """Container App versioned application definition. Defines the desired state of an immutable
    revision. Any changes to this section Will result in a new revision being created.

    :ivar revision_suffix: User friendly suffix that is appended to the revision name.
    :vartype revision_suffix: str
    :ivar termination_grace_period_seconds: Optional duration in seconds the Container App Instance
     needs to terminate gracefully. Value must be non-negative integer. The value zero indicates
     stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the
     default grace period will be used instead. Set this value longer than the expected cleanup time
     for your process. Defaults to 30 seconds.
    :vartype termination_grace_period_seconds: int
    :ivar init_containers: List of specialized containers that run before app containers.
    :vartype init_containers: list[~azure.mgmt.appcontainers.models.InitContainer]
    :ivar containers: List of container definitions for the Container App.
    :vartype containers: list[~azure.mgmt.appcontainers.models.Container]
    :ivar scale: Scaling properties for the Container App.
    :vartype scale: ~azure.mgmt.appcontainers.models.Scale
    :ivar volumes: List of volume definitions for the Container App.
    :vartype volumes: list[~azure.mgmt.appcontainers.models.Volume]
    :ivar service_binds: List of container app services bound to the app.
    :vartype service_binds: list[~azure.mgmt.appcontainers.models.ServiceBind]
    """

    revision_suffix: Optional[str] = rest_field(
        name="revisionSuffix", visibility=["read", "create", "update", "delete", "query"]
    )
    """User friendly suffix that is appended to the revision name."""
    termination_grace_period_seconds: Optional[int] = rest_field(
        name="terminationGracePeriodSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional duration in seconds the Container App Instance needs to terminate gracefully. Value
     must be non-negative integer. The value zero indicates stop immediately via the kill signal (no
     opportunity to shut down). If this value is nil, the default grace period will be used instead.
     Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds."""
    init_containers: Optional[list["_models.InitContainer"]] = rest_field(
        name="initContainers", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of specialized containers that run before app containers."""
    containers: Optional[list["_models.Container"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of container definitions for the Container App."""
    scale: Optional["_models.Scale"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scaling properties for the Container App."""
    volumes: Optional[list["_models.Volume"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of volume definitions for the Container App."""
    service_binds: Optional[list["_models.ServiceBind"]] = rest_field(
        name="serviceBinds", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of container app services bound to the app."""

    @overload
    def __init__(
        self,
        *,
        revision_suffix: Optional[str] = None,
        termination_grace_period_seconds: Optional[int] = None,
        init_containers: Optional[list["_models.InitContainer"]] = None,
        containers: Optional[list["_models.Container"]] = None,
        scale: Optional["_models.Scale"] = None,
        volumes: Optional[list["_models.Volume"]] = None,
        service_binds: Optional[list["_models.ServiceBind"]] = None,
    ) -> None: ...

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

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


class TokenStore(_Model):
    """The configuration settings of the token store.

    :ivar enabled: <code>true</code> to durably store platform-specific security tokens that are
     obtained during login flows; otherwise, <code>false</code>. The default is <code>false</code>.
    :vartype enabled: bool
    :ivar token_refresh_extension_hours: The number of hours after session token expiration that a
     session token can be used to call the token refresh API. The default is 72 hours.
    :vartype token_refresh_extension_hours: float
    :ivar azure_blob_storage: The configuration settings of the storage of the tokens if blob
     storage is used.
    :vartype azure_blob_storage: ~azure.mgmt.appcontainers.models.BlobStorageTokenStore
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>true</code> to durably store platform-specific security tokens that are obtained during
     login flows; otherwise, <code>false</code>. The default is <code>false</code>."""
    token_refresh_extension_hours: Optional[float] = rest_field(
        name="tokenRefreshExtensionHours", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of hours after session token expiration that a session token can be used to call the
     token refresh API. The default is 72 hours."""
    azure_blob_storage: Optional["_models.BlobStorageTokenStore"] = rest_field(
        name="azureBlobStorage", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the storage of the tokens if blob storage is used."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        token_refresh_extension_hours: Optional[float] = None,
        azure_blob_storage: Optional["_models.BlobStorageTokenStore"] = None,
    ) -> None: ...

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

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


class TrafficWeight(_Model):
    """Traffic weight assigned to a revision.

    :ivar revision_name: Name of a revision.
    :vartype revision_name: str
    :ivar weight: Traffic weight assigned to a revision.
    :vartype weight: int
    :ivar latest_revision: Indicates that the traffic weight belongs to a latest stable revision.
    :vartype latest_revision: bool
    :ivar label: Associates a traffic label with a revision.
    :vartype label: str
    """

    revision_name: Optional[str] = rest_field(
        name="revisionName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of a revision."""
    weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Traffic weight assigned to a revision."""
    latest_revision: Optional[bool] = rest_field(
        name="latestRevision", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates that the traffic weight belongs to a latest stable revision."""
    label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Associates a traffic label with a revision."""

    @overload
    def __init__(
        self,
        *,
        revision_name: Optional[str] = None,
        weight: Optional[int] = None,
        latest_revision: Optional[bool] = None,
        label: 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 Twitter(_Model):
    """The configuration settings of the Twitter provider.

    :ivar enabled: <code>false</code> if the Twitter provider should not be enabled despite the set
     registration; otherwise, <code>true</code>.
    :vartype enabled: bool
    :ivar registration: The configuration settings of the app registration for the Twitter
     provider.
    :vartype registration: ~azure.mgmt.appcontainers.models.TwitterRegistration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """<code>false</code> if the Twitter provider should not be enabled despite the set registration;
     otherwise, <code>true</code>."""
    registration: Optional["_models.TwitterRegistration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration settings of the app registration for the Twitter provider."""

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

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

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


class TwitterRegistration(_Model):
    """The configuration settings of the app registration for the Twitter provider.

    :ivar consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in.
     This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation:
     `https://dev.twitter.com/web/sign-in <https://dev.twitter.com/web/sign-in>`_.
    :vartype consumer_key: str
    :ivar consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer
     secret of the Twitter application used for sign-in.
    :vartype consumer_secret_setting_name: str
    """

    consumer_key: Optional[str] = rest_field(
        name="consumerKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """The OAuth 1.0a consumer key of the Twitter application used for sign-in. This setting is
     required for enabling Twitter Sign-In. Twitter Sign-In documentation:
     `https://dev.twitter.com/web/sign-in <https://dev.twitter.com/web/sign-in>`_."""
    consumer_secret_setting_name: Optional[str] = rest_field(
        name="consumerSecretSettingName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application
     used for sign-in."""

    @overload
    def __init__(
        self,
        *,
        consumer_key: Optional[str] = None,
        consumer_secret_setting_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 Usage(_Model):
    """Describes Compute Resource Usage.

    :ivar unit: An enum describing the unit of usage measurement. Required. Default value is
     "Count".
    :vartype unit: str
    :ivar current_value: The current usage of the resource. Required.
    :vartype current_value: float
    :ivar limit: The maximum permitted usage of the resource. Required.
    :vartype limit: float
    :ivar name: The name of the type of usage. Required.
    :vartype name: ~azure.mgmt.appcontainers.models.UsageName
    """

    unit: Literal["Count"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An enum describing the unit of usage measurement. Required. Default value is \"Count\"."""
    current_value: float = rest_field(name="currentValue", visibility=["read", "create", "update", "delete", "query"])
    """The current usage of the resource. Required."""
    limit: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum permitted usage of the resource. Required."""
    name: "_models.UsageName" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the type of usage. Required."""

    @overload
    def __init__(
        self,
        *,
        current_value: float,
        limit: float,
        name: "_models.UsageName",
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.unit: Literal["Count"] = "Count"


class UsageName(_Model):
    """The Usage Names.

    :ivar value: The name of the resource.
    :vartype value: str
    :ivar localized_value: The localized name of the resource.
    :vartype localized_value: str
    """

    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the resource."""
    localized_value: Optional[str] = rest_field(
        name="localizedValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The localized name of the resource."""

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

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

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


class 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 VnetConfiguration(_Model):
    """Configuration properties for apps environment to join a Virtual Network.

    :ivar internal: Boolean indicating the environment only has an internal load balancer. These
     environments do not have a public static IP resource. They must provide infrastructureSubnetId
     if enabling this property.
    :vartype internal: bool
    :ivar infrastructure_subnet_id: Resource ID of a subnet for infrastructure components. Must not
     overlap with any other provided IP ranges.
    :vartype infrastructure_subnet_id: str
    :ivar docker_bridge_cidr: CIDR notation IP range assigned to the Docker bridge, network. Must
     not overlap with any other provided IP ranges.
    :vartype docker_bridge_cidr: str
    :ivar platform_reserved_cidr: IP range in CIDR notation that can be reserved for environment
     infrastructure IP addresses. Must not overlap with any other provided IP ranges.
    :vartype platform_reserved_cidr: str
    :ivar platform_reserved_dns_ip: An IP address from the IP range defined by platformReservedCidr
     that will be reserved for the internal DNS server.
    :vartype platform_reserved_dns_ip: str
    """

    internal: Optional[bool] = rest_field(visibility=["read", "create"])
    """Boolean indicating the environment only has an internal load balancer. These environments do
     not have a public static IP resource. They must provide infrastructureSubnetId if enabling this
     property."""
    infrastructure_subnet_id: Optional[str] = rest_field(name="infrastructureSubnetId", visibility=["read", "create"])
    """Resource ID of a subnet for infrastructure components. Must not overlap with any other provided
     IP ranges."""
    docker_bridge_cidr: Optional[str] = rest_field(name="dockerBridgeCidr", visibility=["read", "create"])
    """CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other
     provided IP ranges."""
    platform_reserved_cidr: Optional[str] = rest_field(name="platformReservedCidr", visibility=["read", "create"])
    """IP range in CIDR notation that can be reserved for environment infrastructure IP addresses.
     Must not overlap with any other provided IP ranges."""
    platform_reserved_dns_ip: Optional[str] = rest_field(name="platformReservedDnsIP", visibility=["read", "create"])
    """An IP address from the IP range defined by platformReservedCidr that will be reserved for the
     internal DNS server."""

    @overload
    def __init__(
        self,
        *,
        internal: Optional[bool] = None,
        infrastructure_subnet_id: Optional[str] = None,
        docker_bridge_cidr: Optional[str] = None,
        platform_reserved_cidr: Optional[str] = None,
        platform_reserved_dns_ip: 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 Volume(_Model):
    """Volume definitions for the Container App.

    :ivar name: Volume name.
    :vartype name: str
    :ivar storage_type: Storage type for the volume. If not provided, use EmptyDir. Known values
     are: "AzureFile", "EmptyDir", "Secret", and "NfsAzureFile".
    :vartype storage_type: str or ~azure.mgmt.appcontainers.models.StorageType
    :ivar storage_name: Name of storage resource. No need to provide for EmptyDir and Secret.
    :vartype storage_name: str
    :ivar secrets: List of secrets to be added in volume. If no secrets are provided, all secrets
     in collection will be added to volume.
    :vartype secrets: list[~azure.mgmt.appcontainers.models.SecretVolumeItem]
    :ivar mount_options: Mount options used while mounting the Azure file share or NFS Azure file
     share. Must be a comma-separated string.
    :vartype mount_options: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Volume name."""
    storage_type: Optional[Union[str, "_models.StorageType"]] = rest_field(
        name="storageType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage type for the volume. If not provided, use EmptyDir. Known values are: \"AzureFile\",
     \"EmptyDir\", \"Secret\", and \"NfsAzureFile\"."""
    storage_name: Optional[str] = rest_field(
        name="storageName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of storage resource. No need to provide for EmptyDir and Secret."""
    secrets: Optional[list["_models.SecretVolumeItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of secrets to be added in volume. If no secrets are provided, all secrets in collection
     will be added to volume."""
    mount_options: Optional[str] = rest_field(
        name="mountOptions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mount options used while mounting the Azure file share or NFS Azure file share. Must be a
     comma-separated string."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        storage_type: Optional[Union[str, "_models.StorageType"]] = None,
        storage_name: Optional[str] = None,
        secrets: Optional[list["_models.SecretVolumeItem"]] = None,
        mount_options: 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 VolumeMount(_Model):
    """Volume mount for the Container App.

    :ivar volume_name: This must match the Name of a Volume.
    :vartype volume_name: str
    :ivar mount_path: Path within the container at which the volume should be mounted.Must not
     contain ':'.
    :vartype mount_path: str
    :ivar sub_path: Path within the volume from which the container's volume should be mounted.
     Defaults to "" (volume's root).
    :vartype sub_path: str
    """

    volume_name: Optional[str] = rest_field(
        name="volumeName", visibility=["read", "create", "update", "delete", "query"]
    )
    """This must match the Name of a Volume."""
    mount_path: Optional[str] = rest_field(name="mountPath", visibility=["read", "create", "update", "delete", "query"])
    """Path within the container at which the volume should be mounted.Must not contain ':'."""
    sub_path: Optional[str] = rest_field(name="subPath", visibility=["read", "create", "update", "delete", "query"])
    """Path within the volume from which the container's volume should be mounted. Defaults to \"\"
     (volume's root)."""

    @overload
    def __init__(
        self,
        *,
        volume_name: Optional[str] = None,
        mount_path: Optional[str] = None,
        sub_path: Optional[str] = None,
    ) -> None: ...

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

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


class WorkflowEnvelope(ProxyResource):
    """Schema for the workflow object.

    :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.appcontainers.models.SystemData
    :ivar properties: Additional workflow properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.WorkflowEnvelopeProperties
    :ivar kind: Gets the logic app hybrid workflow kind. Known values are: "Stateful", "Stateless",
     and "Agentic".
    :vartype kind: str or ~azure.mgmt.appcontainers.models.WorkflowKind
    """

    properties: Optional["_models.WorkflowEnvelopeProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional workflow properties."""
    kind: Optional[Union[str, "_models.WorkflowKind"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the logic app hybrid workflow kind. Known values are: \"Stateful\", \"Stateless\", and
     \"Agentic\"."""

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.WorkflowEnvelopeProperties"] = None,
        kind: Optional[Union[str, "_models.WorkflowKind"]] = None,
    ) -> None: ...

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

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


class WorkflowEnvelopeProperties(_Model):
    """Additional workflow properties.

    :ivar files: Gets or sets the files.
    :vartype files: any
    :ivar flow_state: Gets or sets the state of the workflow. Known values are: "NotSpecified",
     "Completed", "Enabled", "Disabled", "Deleted", and "Suspended".
    :vartype flow_state: str or ~azure.mgmt.appcontainers.models.WorkflowState
    :ivar health: Gets or sets workflow health.
    :vartype health: ~azure.mgmt.appcontainers.models.WorkflowHealth
    """

    files: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the files."""
    flow_state: Optional[Union[str, "_models.WorkflowState"]] = rest_field(
        name="flowState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the state of the workflow. Known values are: \"NotSpecified\", \"Completed\",
     \"Enabled\", \"Disabled\", \"Deleted\", and \"Suspended\"."""
    health: Optional["_models.WorkflowHealth"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets workflow health."""

    @overload
    def __init__(
        self,
        *,
        files: Optional[Any] = None,
        flow_state: Optional[Union[str, "_models.WorkflowState"]] = None,
        health: Optional["_models.WorkflowHealth"] = None,
    ) -> None: ...

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

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


class WorkflowHealth(_Model):
    """Represents the workflow health.

    :ivar state: Gets or sets the workflow health state. Required. Known values are:
     "NotSpecified", "Healthy", "Unhealthy", and "Unknown".
    :vartype state: str or ~azure.mgmt.appcontainers.models.WorkflowHealthState
    :ivar error: Gets or sets the workflow error.
    :vartype error: ~azure.mgmt.appcontainers.models.ErrorEntity
    """

    state: Union[str, "_models.WorkflowHealthState"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the workflow health state. Required. Known values are: \"NotSpecified\",
     \"Healthy\", \"Unhealthy\", and \"Unknown\"."""
    error: Optional["_models.ErrorEntity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the workflow error."""

    @overload
    def __init__(
        self,
        *,
        state: Union[str, "_models.WorkflowHealthState"],
        error: Optional["_models.ErrorEntity"] = None,
    ) -> None: ...

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

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


class WorkloadProfile(_Model):
    """Workload profile to scope container app execution.

    :ivar name: Workload profile type for the workloads to run on. Required.
    :vartype name: str
    :ivar workload_profile_type: Workload profile type for the workloads to run on. Required.
    :vartype workload_profile_type: str
    :ivar minimum_count: The minimum capacity.
    :vartype minimum_count: int
    :ivar maximum_count: The maximum capacity.
    :vartype maximum_count: int
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Workload profile type for the workloads to run on. Required."""
    workload_profile_type: str = rest_field(
        name="workloadProfileType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Workload profile type for the workloads to run on. Required."""
    minimum_count: Optional[int] = rest_field(
        name="minimumCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum capacity."""
    maximum_count: Optional[int] = rest_field(
        name="maximumCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The maximum capacity."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        workload_profile_type: str,
        minimum_count: Optional[int] = None,
        maximum_count: Optional[int] = None,
    ) -> None: ...

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

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


class WorkloadProfileStates(ProxyResource):
    """Collection of all the workload Profile States for a Managed Environment..

    :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.appcontainers.models.SystemData
    :ivar properties: Workload Profile resource specific properties.
    :vartype properties: ~azure.mgmt.appcontainers.models.WorkloadProfileStatesProperties
    """

    properties: Optional["_models.WorkloadProfileStatesProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Workload Profile resource specific properties."""

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

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

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


class WorkloadProfileStatesProperties(_Model):
    """Workload Profile resource specific properties.

    :ivar minimum_count: Minimum count of instances.
    :vartype minimum_count: int
    :ivar maximum_count: Maximum count of nodes.
    :vartype maximum_count: int
    :ivar current_count: Current count of nodes.
    :vartype current_count: int
    """

    minimum_count: Optional[int] = rest_field(
        name="minimumCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimum count of instances."""
    maximum_count: Optional[int] = rest_field(
        name="maximumCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum count of nodes."""
    current_count: Optional[int] = rest_field(
        name="currentCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Current count of nodes."""

    @overload
    def __init__(
        self,
        *,
        minimum_count: Optional[int] = None,
        maximum_count: Optional[int] = None,
        current_count: Optional[int] = None,
    ) -> None: ...

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

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