# 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 AgentDeploymentType, BuiltInAuthorizationScheme, ConnectionAuthType, RuleType

if TYPE_CHECKING:
    from .. import models as _models


class ConnectionPropertiesV2(_Model):
    """Connection property base schema.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AADAuthTypeConnectionProperties, AccessKeyAuthTypeConnectionProperties,
    AccountKeyAuthTypeConnectionProperties, ApiKeyAuthConnectionProperties,
    CustomKeysConnectionProperties, ManagedIdentityAuthTypeConnectionProperties,
    NoneAuthTypeConnectionProperties, OAuth2AuthTypeConnectionProperties,
    PATAuthTypeConnectionProperties, SASAuthTypeConnectionProperties,
    ServicePrincipalAuthTypeConnectionProperties, UsernamePasswordAuthTypeConnectionProperties

    :ivar auth_type: Authentication type of the connection target. Required. Known values are:
     "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", "AccountKey", "ServicePrincipal",
     "AccessKey", "ApiKey", "CustomKeys", "OAuth2", "AAD", "DelegatedSAS", "ProjectManagedIdentity",
     "AccountManagedIdentity", "UserEntraToken", "AgentUserImpersonation", "AgenticIdentityToken",
     and "AgenticUser".
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.ConnectionAuthType
    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    """

    __mapping__: dict[str, _Model] = {}
    auth_type: str = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])
    """Authentication type of the connection target. Required. Known values are: \"PAT\",
     \"ManagedIdentity\", \"UsernamePassword\", \"None\", \"SAS\", \"AccountKey\",
     \"ServicePrincipal\", \"AccessKey\", \"ApiKey\", \"CustomKeys\", \"OAuth2\", \"AAD\",
     \"DelegatedSAS\", \"ProjectManagedIdentity\", \"AccountManagedIdentity\", \"UserEntraToken\",
     \"AgentUserImpersonation\", \"AgenticIdentityToken\", and \"AgenticUser\"."""
    category: Optional[Union[str, "_models.ConnectionCategory"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Category of the connection. Known values are: \"PythonFeed\", \"ContainerRegistry\", \"Git\",
     \"S3\", \"Snowflake\", \"AzureKeyVault\", \"AzureSqlDb\", \"AzureSynapseAnalytics\",
     \"AzureMySqlDb\", \"AzurePostgresDb\", \"ADLSGen2\", \"AzureContainerAppEnvironment\",
     \"Redis\", \"ApiKey\", \"AzureOpenAI\", \"AIServices\", \"CognitiveSearch\",
     \"CognitiveService\", \"CustomKeys\", \"AzureBlob\", \"AzureStorageAccount\", \"AzureOneLake\",
     \"CosmosDb\", \"CosmosDbMongoDbApi\", \"AzureDataExplorer\", \"AzureMariaDb\",
     \"AzureDatabricksDeltaLake\", \"AzureSqlMi\", \"AzureTableStorage\", \"AmazonRdsForOracle\",
     \"AmazonRdsForSqlServer\", \"AmazonRedshift\", \"Db2\", \"Drill\", \"GoogleBigQuery\",
     \"Greenplum\", \"Hbase\", \"Hive\", \"Impala\", \"Informix\", \"MariaDb\", \"MicrosoftAccess\",
     \"MySql\", \"Netezza\", \"Oracle\", \"Phoenix\", \"PostgreSql\", \"Presto\", \"SapOpenHub\",
     \"SapBw\", \"SapHana\", \"SapTable\", \"Spark\", \"SqlServer\", \"Sybase\", \"Teradata\",
     \"Vertica\", \"Pinecone\", \"Databricks\", \"Cassandra\", \"Couchbase\", \"MongoDbV2\",
     \"MongoDbAtlas\", \"AmazonS3Compatible\", \"FileServer\", \"FtpServer\",
     \"GoogleCloudStorage\", \"Hdfs\", \"OracleCloudStorage\", \"Sftp\", \"GenericHttp\",
     \"ODataRest\", \"Odbc\", \"GenericRest\", \"RemoteTool\", \"AmazonMws\", \"Concur\",
     \"Dynamics\", \"DynamicsAx\", \"DynamicsCrm\", \"GoogleAdWords\", \"Hubspot\", \"Jira\",
     \"Magento\", \"Marketo\", \"Office365\", \"Eloqua\", \"Responsys\", \"OracleServiceCloud\",
     \"PayPal\", \"QuickBooks\", \"Salesforce\", \"SalesforceServiceCloud\",
     \"SalesforceMarketingCloud\", \"SapCloudForCustomer\", \"SapEcc\", \"ServiceNow\",
     \"SharePointOnlineList\", \"Shopify\", \"Square\", \"WebTable\", \"Xero\", \"Zoho\",
     \"GenericContainerRegistry\", \"Elasticsearch\", \"AppInsights\", \"AppConfig\", \"OpenAI\",
     \"Serp\", \"BingLLMSearch\", \"Serverless\", \"ManagedOnlineEndpoint\", \"ApiManagement\",
     \"ModelGateway\", \"GroundingWithBingSearch\", \"GroundingWithCustomSearch\", \"Sharepoint\",
     \"MicrosoftFabric\", \"PowerPlatformEnvironment\", and \"RemoteA2A\"."""
    created_by_workspace_arm_id: Optional[str] = rest_field(name="createdByWorkspaceArmId", visibility=["read"])
    error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Provides the error message if the connection fails."""
    expiry_time: Optional[datetime.datetime] = rest_field(
        name="expiryTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    group: Optional[Union[str, "_models.ConnectionGroup"]] = rest_field(visibility=["read"])
    """Group based on connection category. Known values are: \"Azure\", \"AzureAI\", \"Database\",
     \"NoSQL\", \"File\", \"GenericProtocol\", and \"ServicesAndApps\"."""
    is_shared_to_all: Optional[bool] = rest_field(
        name="isSharedToAll", visibility=["read", "create", "update", "delete", "query"]
    )
    metadata: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Store user metadata for this connection."""
    pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = rest_field(
        name="peRequirement", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies how private endpoints are used with this connection: 'Required', 'NotRequired', or
     'NotApplicable'. Known values are: \"Required\", \"NotRequired\", and \"NotApplicable\"."""
    pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = rest_field(
        name="peStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the status of private endpoints for this connection: 'Inactive', 'Active', or
     'NotApplicable'. Known values are: \"Inactive\", \"Active\", and \"NotApplicable\"."""
    shared_user_list: Optional[list[str]] = rest_field(
        name="sharedUserList", visibility=["read", "create", "update", "delete", "query"]
    )
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The connection URL to be used."""
    use_workspace_managed_identity: Optional[bool] = rest_field(
        name="useWorkspaceManagedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        auth_type: str,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: 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 AADAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="AAD"):
    """This connection type covers the AAD auth for any applicable Azure service.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar auth_type: Authentication type of the connection target. Required. AAD.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.AAD
    """

    auth_type: Literal[ConnectionAuthType.AAD] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. AAD."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: 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)
        self.auth_type = ConnectionAuthType.AAD  # type: ignore


class AbusePenalty(_Model):
    """The abuse penalty.

    :ivar action: The action of AbusePenalty. Known values are: "Throttle" and "Block".
    :vartype action: str or ~azure.mgmt.cognitiveservices.models.AbusePenaltyAction
    :ivar rate_limit_percentage: The percentage of rate limit.
    :vartype rate_limit_percentage: float
    :ivar expiration: The datetime of expiration of the AbusePenalty.
    :vartype expiration: ~datetime.datetime
    """

    action: Optional[Union[str, "_models.AbusePenaltyAction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action of AbusePenalty. Known values are: \"Throttle\" and \"Block\"."""
    rate_limit_percentage: Optional[float] = rest_field(
        name="rateLimitPercentage", visibility=["read", "create", "update", "delete", "query"]
    )
    """The percentage of rate limit."""
    expiration: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The datetime of expiration of the AbusePenalty."""

    @overload
    def __init__(
        self,
        *,
        action: Optional[Union[str, "_models.AbusePenaltyAction"]] = None,
        rate_limit_percentage: Optional[float] = None,
        expiration: 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 AccessKeyAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="AccessKey"):
    """AccessKeyAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionAccessKey
    :ivar auth_type: Authentication type of the connection target. Required. ACCESS_KEY.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.ACCESS_KEY
    """

    credentials: Optional["_models.ConnectionAccessKey"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.ACCESS_KEY] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. ACCESS_KEY."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionAccessKey"] = None,
    ) -> None: ...

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


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.cognitiveservices.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 Account(Resource):
    """Cognitive Services account is an Azure resource representing the provisioned account, it's
    type, location and SKU.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services account.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.AccountProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    :ivar sku: The resource model definition representing SKU.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    :ivar identity: Identity for the resource.
    :vartype identity: ~azure.mgmt.cognitiveservices.models.Identity
    """

    properties: Optional["_models.AccountProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource model definition representing SKU."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Identity for the resource."""

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

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

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


class AccountKeyAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="AccountKey"):
    """This connection type covers the account key connection for Azure storage.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials: Account key object for connection credential.
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionAccountKey
    :ivar auth_type: Authentication type of the connection target. Required. ACCOUNT_KEY.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.ACCOUNT_KEY
    """

    credentials: Optional["_models.ConnectionAccountKey"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Account key object for connection credential."""
    auth_type: Literal[ConnectionAuthType.ACCOUNT_KEY] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. ACCOUNT_KEY."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionAccountKey"] = None,
    ) -> None: ...

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


class DeploymentModel(_Model):
    """Properties of Cognitive Services account deployment model.

    :ivar publisher: Deployment model publisher.
    :vartype publisher: str
    :ivar format: Deployment model format.
    :vartype format: str
    :ivar name: Deployment model name.
    :vartype name: str
    :ivar version: Optional. Deployment model version. If version is not specified, a default
     version will be assigned. The default version is different for different models and might
     change when there is new version available for a model. Default version for a model could be
     found from list models API.
    :vartype version: str
    :ivar source: Optional. Deployment model source ARM resource ID.
    :vartype source: str
    :ivar source_account: Optional. Source of the model, another Microsoft.CognitiveServices
     accounts ARM resource ID.
    :vartype source_account: str
    :ivar call_rate_limit: The call rate limit Cognitive Services account.
    :vartype call_rate_limit: ~azure.mgmt.cognitiveservices.models.CallRateLimit
    """

    publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment model publisher."""
    format: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment model format."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment model name."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Deployment model version. If version is not specified, a default version will be
     assigned. The default version is different for different models and might change when there is
     new version available for a model. Default version for a model could be found from list models
     API."""
    source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional. Deployment model source ARM resource ID."""
    source_account: Optional[str] = rest_field(
        name="sourceAccount", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Source of the model, another Microsoft.CognitiveServices accounts ARM resource ID."""
    call_rate_limit: Optional["_models.CallRateLimit"] = rest_field(name="callRateLimit", visibility=["read"])
    """The call rate limit Cognitive Services account."""

    @overload
    def __init__(
        self,
        *,
        publisher: Optional[str] = None,
        format: Optional[str] = None,
        name: Optional[str] = None,
        version: Optional[str] = None,
        source: Optional[str] = None,
        source_account: 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 AccountModel(DeploymentModel):
    """Cognitive Services account Model.

    :ivar publisher: Deployment model publisher.
    :vartype publisher: str
    :ivar format: Deployment model format.
    :vartype format: str
    :ivar name: Deployment model name.
    :vartype name: str
    :ivar version: Optional. Deployment model version. If version is not specified, a default
     version will be assigned. The default version is different for different models and might
     change when there is new version available for a model. Default version for a model could be
     found from list models API.
    :vartype version: str
    :ivar source: Optional. Deployment model source ARM resource ID.
    :vartype source: str
    :ivar source_account: Optional. Source of the model, another Microsoft.CognitiveServices
     accounts ARM resource ID.
    :vartype source_account: str
    :ivar call_rate_limit: The call rate limit Cognitive Services account.
    :vartype call_rate_limit: ~azure.mgmt.cognitiveservices.models.CallRateLimit
    :ivar base_model: Properties of Cognitive Services account deployment model.
    :vartype base_model: ~azure.mgmt.cognitiveservices.models.DeploymentModel
    :ivar is_default_version: If the model is default version.
    :vartype is_default_version: bool
    :ivar skus: The list of Model Sku.
    :vartype skus: list[~azure.mgmt.cognitiveservices.models.ModelSku]
    :ivar max_capacity: The max capacity.
    :vartype max_capacity: int
    :ivar capabilities: The capabilities.
    :vartype capabilities: dict[str, str]
    :ivar finetune_capabilities: The capabilities for finetune models.
    :vartype finetune_capabilities: dict[str, str]
    :ivar deprecation: Cognitive Services account ModelDeprecationInfo.
    :vartype deprecation: ~azure.mgmt.cognitiveservices.models.ModelDeprecationInfo
    :ivar replacement_config: Configuration for model replacement.
    :vartype replacement_config: ~azure.mgmt.cognitiveservices.models.ReplacementConfig
    :ivar model_catalog_asset_id: Asset identifier for the model in the model catalog.
    :vartype model_catalog_asset_id: str
    :ivar lifecycle_status: Model lifecycle status. Known values are: "Stable", "Preview",
     "GenerallyAvailable", "Deprecating", "Deprecated", and "Legacy".
    :vartype lifecycle_status: str or ~azure.mgmt.cognitiveservices.models.ModelLifecycleStatus
    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
    :vartype system_data: ~azure.mgmt.cognitiveservices.models.SystemData
    """

    base_model: Optional["_models.DeploymentModel"] = rest_field(
        name="baseModel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account deployment model."""
    is_default_version: Optional[bool] = rest_field(
        name="isDefaultVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the model is default version."""
    skus: Optional[list["_models.ModelSku"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of Model Sku."""
    max_capacity: Optional[int] = rest_field(
        name="maxCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The max capacity."""
    capabilities: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The capabilities."""
    finetune_capabilities: Optional[dict[str, str]] = rest_field(
        name="finetuneCapabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The capabilities for finetune models."""
    deprecation: Optional["_models.ModelDeprecationInfo"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Cognitive Services account ModelDeprecationInfo."""
    replacement_config: Optional["_models.ReplacementConfig"] = rest_field(
        name="replacementConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration for model replacement."""
    model_catalog_asset_id: Optional[str] = rest_field(
        name="modelCatalogAssetId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Asset identifier for the model in the model catalog."""
    lifecycle_status: Optional[Union[str, "_models.ModelLifecycleStatus"]] = rest_field(
        name="lifecycleStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Model lifecycle status. Known values are: \"Stable\", \"Preview\", \"GenerallyAvailable\",
     \"Deprecating\", \"Deprecated\", and \"Legacy\"."""
    system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"])
    """Metadata pertaining to creation and last modification of the resource."""

    @overload
    def __init__(
        self,
        *,
        publisher: Optional[str] = None,
        format: Optional[str] = None,
        name: Optional[str] = None,
        version: Optional[str] = None,
        source: Optional[str] = None,
        source_account: Optional[str] = None,
        base_model: Optional["_models.DeploymentModel"] = None,
        is_default_version: Optional[bool] = None,
        skus: Optional[list["_models.ModelSku"]] = None,
        max_capacity: Optional[int] = None,
        capabilities: Optional[dict[str, str]] = None,
        finetune_capabilities: Optional[dict[str, str]] = None,
        deprecation: Optional["_models.ModelDeprecationInfo"] = None,
        replacement_config: Optional["_models.ReplacementConfig"] = None,
        model_catalog_asset_id: Optional[str] = None,
        lifecycle_status: Optional[Union[str, "_models.ModelLifecycleStatus"]] = None,
    ) -> None: ...

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

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


class AccountProperties(_Model):
    """Properties of Cognitive Services account.

    :ivar provisioning_state: Gets the status of the cognitive services account at the time the
     operation was called. Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed",
     "Succeeded", "Canceled", and "ResolvingDNS".
    :vartype provisioning_state: str or ~azure.mgmt.cognitiveservices.models.ProvisioningState
    :ivar endpoint: Endpoint of the created account.
    :vartype endpoint: str
    :ivar internal_id: The internal identifier (deprecated, do not use this property).
    :vartype internal_id: str
    :ivar capabilities: Gets the capabilities of the cognitive services account. Each item
     indicates the capability of a specific feature. The values are read-only and for reference
     only.
    :vartype capabilities: list[~azure.mgmt.cognitiveservices.models.SkuCapability]
    :ivar is_migrated: If the resource is migrated from an existing key.
    :vartype is_migrated: bool
    :ivar migration_token: Resource migration token.
    :vartype migration_token: str
    :ivar sku_change_info: Sku change info of account.
    :vartype sku_change_info: ~azure.mgmt.cognitiveservices.models.SkuChangeInfo
    :ivar custom_sub_domain_name: Optional subdomain name used for token-based authentication.
    :vartype custom_sub_domain_name: str
    :ivar network_acls: A collection of rules governing the accessibility from specific network
     locations.
    :vartype network_acls: ~azure.mgmt.cognitiveservices.models.NetworkRuleSet
    :ivar encryption: The encryption properties for this resource.
    :vartype encryption: ~azure.mgmt.cognitiveservices.models.Encryption
    :ivar user_owned_storage: The storage accounts for this resource.
    :vartype user_owned_storage: list[~azure.mgmt.cognitiveservices.models.UserOwnedStorage]
    :ivar aml_workspace: The user owned AML account properties.
    :vartype aml_workspace: ~azure.mgmt.cognitiveservices.models.UserOwnedAmlWorkspace
    :ivar private_endpoint_connections: The private endpoint connection associated with the
     Cognitive Services account.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.cognitiveservices.models.PrivateEndpointConnection]
    :ivar public_network_access: Whether or not public endpoint access is allowed for this account.
     Known values are: "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.cognitiveservices.models.PublicNetworkAccess
    :ivar api_properties: The api properties for special APIs.
    :vartype api_properties: ~azure.mgmt.cognitiveservices.models.ApiProperties
    :ivar date_created: Gets the date of cognitive services account creation.
    :vartype date_created: str
    :ivar call_rate_limit: The call rate limit Cognitive Services account.
    :vartype call_rate_limit: ~azure.mgmt.cognitiveservices.models.CallRateLimit
    :ivar dynamic_throttling_enabled: The flag to enable dynamic throttling.
    :vartype dynamic_throttling_enabled: bool
    :ivar stored_completions_disabled: The flag to disable stored completions.
    :vartype stored_completions_disabled: bool
    :ivar quota_limit:
    :vartype quota_limit: ~azure.mgmt.cognitiveservices.models.QuotaLimit
    :ivar restrict_outbound_network_access:
    :vartype restrict_outbound_network_access: bool
    :ivar allowed_fqdn_list:
    :vartype allowed_fqdn_list: list[str]
    :ivar disable_local_auth:
    :vartype disable_local_auth: bool
    :ivar endpoints: Dictionary of <string>.
    :vartype endpoints: dict[str, str]
    :ivar restore:
    :vartype restore: bool
    :ivar deletion_date: The deletion date, only available for deleted account.
    :vartype deletion_date: str
    :ivar scheduled_purge_date: The scheduled purge date, only available for deleted account.
    :vartype scheduled_purge_date: str
    :ivar locations: The multiregion settings of Cognitive Services account.
    :vartype locations: ~azure.mgmt.cognitiveservices.models.MultiRegionSettings
    :ivar commitment_plan_associations: The commitment plan associations of Cognitive Services
     account.
    :vartype commitment_plan_associations:
     list[~azure.mgmt.cognitiveservices.models.CommitmentPlanAssociation]
    :ivar abuse_penalty: The abuse penalty.
    :vartype abuse_penalty: ~azure.mgmt.cognitiveservices.models.AbusePenalty
    :ivar rai_monitor_config: Cognitive Services Rai Monitor Config.
    :vartype rai_monitor_config: ~azure.mgmt.cognitiveservices.models.RaiMonitorConfig
    :ivar network_injections:
    :vartype network_injections: list[~azure.mgmt.cognitiveservices.models.NetworkInjection]
    :ivar foundry_auto_upgrade: Represents the foundry auto-upgrade configuration for a Cognitive
     Services account.
    :vartype foundry_auto_upgrade: ~azure.mgmt.cognitiveservices.models.FoundryAutoUpgrade
    :ivar allow_project_management: Specifies whether this resource support project management as
     child resources, used as containers for access management, data isolation and cost in AI
     Foundry.
    :vartype allow_project_management: bool
    :ivar default_project: Specifies the project, by project name, that is targeted when data plane
     endpoints are called without a project parameter.
    :vartype default_project: str
    :ivar associated_projects: Specifies the projects, by project name, that are associated with
     this resource.
    :vartype associated_projects: list[str]
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the cognitive services account at the time the operation was called. Known
     values are: \"Accepted\", \"Creating\", \"Deleting\", \"Moving\", \"Failed\", \"Succeeded\",
     \"Canceled\", and \"ResolvingDNS\"."""
    endpoint: Optional[str] = rest_field(visibility=["read"])
    """Endpoint of the created account."""
    internal_id: Optional[str] = rest_field(name="internalId", visibility=["read"])
    """The internal identifier (deprecated, do not use this property)."""
    capabilities: Optional[list["_models.SkuCapability"]] = rest_field(visibility=["read"])
    """Gets the capabilities of the cognitive services account. Each item indicates the capability of
     a specific feature. The values are read-only and for reference only."""
    is_migrated: Optional[bool] = rest_field(name="isMigrated", visibility=["read"])
    """If the resource is migrated from an existing key."""
    migration_token: Optional[str] = rest_field(
        name="migrationToken", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource migration token."""
    sku_change_info: Optional["_models.SkuChangeInfo"] = rest_field(name="skuChangeInfo", visibility=["read"])
    """Sku change info of account."""
    custom_sub_domain_name: Optional[str] = rest_field(
        name="customSubDomainName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional subdomain name used for token-based authentication."""
    network_acls: Optional["_models.NetworkRuleSet"] = rest_field(
        name="networkAcls", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of rules governing the accessibility from specific network locations."""
    encryption: Optional["_models.Encryption"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encryption properties for this resource."""
    user_owned_storage: Optional[list["_models.UserOwnedStorage"]] = rest_field(
        name="userOwnedStorage", visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage accounts for this resource."""
    aml_workspace: Optional["_models.UserOwnedAmlWorkspace"] = rest_field(
        name="amlWorkspace", visibility=["read", "create", "update", "delete", "query"]
    )
    """The user owned AML account properties."""
    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """The private endpoint connection associated with the Cognitive Services account."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether or not public endpoint access is allowed for this account. Known values are:
     \"Enabled\" and \"Disabled\"."""
    api_properties: Optional["_models.ApiProperties"] = rest_field(
        name="apiProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The api properties for special APIs."""
    date_created: Optional[str] = rest_field(name="dateCreated", visibility=["read"])
    """Gets the date of cognitive services account creation."""
    call_rate_limit: Optional["_models.CallRateLimit"] = rest_field(name="callRateLimit", visibility=["read"])
    """The call rate limit Cognitive Services account."""
    dynamic_throttling_enabled: Optional[bool] = rest_field(
        name="dynamicThrottlingEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag to enable dynamic throttling."""
    stored_completions_disabled: Optional[bool] = rest_field(
        name="storedCompletionsDisabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag to disable stored completions."""
    quota_limit: Optional["_models.QuotaLimit"] = rest_field(name="quotaLimit", visibility=["read"])
    restrict_outbound_network_access: Optional[bool] = rest_field(
        name="restrictOutboundNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    allowed_fqdn_list: Optional[list[str]] = rest_field(
        name="allowedFqdnList", visibility=["read", "create", "update", "delete", "query"]
    )
    disable_local_auth: Optional[bool] = rest_field(
        name="disableLocalAuth", visibility=["read", "create", "update", "delete", "query"]
    )
    endpoints: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """Dictionary of <string>."""
    restore: Optional[bool] = rest_field(visibility=["create", "update"])
    deletion_date: Optional[str] = rest_field(name="deletionDate", visibility=["read"])
    """The deletion date, only available for deleted account."""
    scheduled_purge_date: Optional[str] = rest_field(name="scheduledPurgeDate", visibility=["read"])
    """The scheduled purge date, only available for deleted account."""
    locations: Optional["_models.MultiRegionSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The multiregion settings of Cognitive Services account."""
    commitment_plan_associations: Optional[list["_models.CommitmentPlanAssociation"]] = rest_field(
        name="commitmentPlanAssociations", visibility=["read"]
    )
    """The commitment plan associations of Cognitive Services account."""
    abuse_penalty: Optional["_models.AbusePenalty"] = rest_field(name="abusePenalty", visibility=["read"])
    """The abuse penalty."""
    rai_monitor_config: Optional["_models.RaiMonitorConfig"] = rest_field(
        name="raiMonitorConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Cognitive Services Rai Monitor Config."""
    network_injections: Optional[list["_models.NetworkInjection"]] = rest_field(
        name="networkInjections", visibility=["read", "create", "update", "delete", "query"]
    )
    foundry_auto_upgrade: Optional["_models.FoundryAutoUpgrade"] = rest_field(
        name="foundryAutoUpgrade", visibility=["read", "create", "update", "delete", "query"]
    )
    """Represents the foundry auto-upgrade configuration for a Cognitive Services account."""
    allow_project_management: Optional[bool] = rest_field(
        name="allowProjectManagement", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether this resource support project management as child resources, used as
     containers for access management, data isolation and cost in AI Foundry."""
    default_project: Optional[str] = rest_field(
        name="defaultProject", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the project, by project name, that is targeted when data plane endpoints are called
     without a project parameter."""
    associated_projects: Optional[list[str]] = rest_field(
        name="associatedProjects", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the projects, by project name, that are associated with this resource."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        migration_token: Optional[str] = None,
        custom_sub_domain_name: Optional[str] = None,
        network_acls: Optional["_models.NetworkRuleSet"] = None,
        encryption: Optional["_models.Encryption"] = None,
        user_owned_storage: Optional[list["_models.UserOwnedStorage"]] = None,
        aml_workspace: Optional["_models.UserOwnedAmlWorkspace"] = None,
        public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None,
        api_properties: Optional["_models.ApiProperties"] = None,
        dynamic_throttling_enabled: Optional[bool] = None,
        stored_completions_disabled: Optional[bool] = None,
        restrict_outbound_network_access: Optional[bool] = None,
        allowed_fqdn_list: Optional[list[str]] = None,
        disable_local_auth: Optional[bool] = None,
        restore: Optional[bool] = None,
        locations: Optional["_models.MultiRegionSettings"] = None,
        rai_monitor_config: Optional["_models.RaiMonitorConfig"] = None,
        network_injections: Optional[list["_models.NetworkInjection"]] = None,
        foundry_auto_upgrade: Optional["_models.FoundryAutoUpgrade"] = None,
        allow_project_management: Optional[bool] = None,
        default_project: Optional[str] = None,
        associated_projects: 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 AccountSku(_Model):
    """Cognitive Services resource type and SKU.

    :ivar resource_type: Resource Namespace and Type.
    :vartype resource_type: str
    :ivar sku: The SKU of Cognitive Services account.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    """

    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Namespace and Type."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU of Cognitive Services account."""

    @overload
    def __init__(
        self,
        *,
        resource_type: Optional[str] = None,
        sku: Optional["_models.Sku"] = None,
    ) -> None: ...

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

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


class AccountSkuListResult(_Model):
    """The list of cognitive services accounts operation response.

    :ivar value: Gets the list of Cognitive Services accounts and their properties.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.AccountSku]
    """

    value: Optional[list["_models.AccountSku"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets the list of Cognitive Services accounts and their properties."""

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

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

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


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.cognitiveservices.models.SystemData
    """


class AgentApplication(ProxyResource):
    """Agent Application 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.cognitiveservices.models.SystemData
    :ivar properties: [Required] Additional attributes of the entity. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.AgenticApplicationProperties
    """

    properties: "_models.AgenticApplicationProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """[Required] Additional attributes of the entity. Required."""

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

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

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


class AgentDeployment(ProxyResource):
    """Agent Deployment 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.cognitiveservices.models.SystemData
    :ivar properties: [Required] Additional attributes of the entity. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.AgentDeploymentProperties
    """

    properties: "_models.AgentDeploymentProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """[Required] Additional attributes of the entity. Required."""

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

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

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


class ResourceBase(_Model):
    """ResourceBase.

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The asset description text."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Tag dictionary. Tags can be added, removed, and updated."""

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

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

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


class AgentDeploymentProperties(ResourceBase):
    """Type representing an agent deployment as a management construct.

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

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    :ivar display_name: Gets or sets the display name of the deployment.
    :vartype display_name: str
    :ivar deployment_id: Gets or sets the unique identifier of the deployment.
    :vartype deployment_id: str
    :ivar state: Gets or sets the current operational state of the deployment (and, intrinsically,
     of the comprising agents). Known values are: "Starting", "Running", "Stopping", "Stopped",
     "Failed", "Deleting", "Deleted", and "Updating".
    :vartype state: str or ~azure.mgmt.cognitiveservices.models.AgentDeploymentState
    :ivar protocols: Gets or sets the supported protocol types and versions exposed by this
     deployment.
    :vartype protocols: list[~azure.mgmt.cognitiveservices.models.AgentProtocolVersion]
    :ivar agents: Returns a flat list of agent:version deployed in this deployment.
    :vartype agents: list[~azure.mgmt.cognitiveservices.models.VersionedAgentReference]
    :ivar deployment_type: Gets or sets the type of deployment for the agent. Required. Known
     values are: "Managed", "Hosted", and "Custom".
    :vartype deployment_type: str or ~azure.mgmt.cognitiveservices.models.AgentDeploymentType
    :ivar provisioning_state: Gets or sets the provisioning state of the agent deployment. Known
     values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.AgentDeploymentProvisioningState
    """

    __mapping__: dict[str, _Model] = {}
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the display name of the deployment."""
    deployment_id: Optional[str] = rest_field(
        name="deploymentId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the unique identifier of the deployment."""
    state: Optional[Union[str, "_models.AgentDeploymentState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the current operational state of the deployment (and, intrinsically, of the
     comprising agents). Known values are: \"Starting\", \"Running\", \"Stopping\", \"Stopped\",
     \"Failed\", \"Deleting\", \"Deleted\", and \"Updating\"."""
    protocols: Optional[list["_models.AgentProtocolVersion"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the supported protocol types and versions exposed by this deployment."""
    agents: Optional[list["_models.VersionedAgentReference"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Returns a flat list of agent:version deployed in this deployment."""
    deployment_type: str = rest_discriminator(
        name="deploymentType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the type of deployment for the agent. Required. Known values are: \"Managed\",
     \"Hosted\", and \"Custom\"."""
    provisioning_state: Optional[Union[str, "_models.AgentDeploymentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets or sets the provisioning state of the agent deployment. Known values are: \"Succeeded\",
     \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\"."""

    @overload
    def __init__(
        self,
        *,
        deployment_type: str,
        description: Optional[str] = None,
        tags: Optional[dict[str, str]] = None,
        display_name: Optional[str] = None,
        deployment_id: Optional[str] = None,
        state: Optional[Union[str, "_models.AgentDeploymentState"]] = None,
        protocols: Optional[list["_models.AgentProtocolVersion"]] = None,
        agents: Optional[list["_models.VersionedAgentReference"]] = None,
    ) -> None: ...

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

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


class AgenticApplicationProperties(ResourceBase):
    """Resource type representing an agentic application as a management construct.

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    :ivar display_name: The display name of the application.
    :vartype display_name: str
    :ivar base_url: The application's dedicated invocation endpoint.
    :vartype base_url: str
    :ivar agents: The list of agent definitions comprising this application, returned as references
     to the objects under the parent project; use this to obtain a flat list of all agent-version
     pairs represented by this application.
    :vartype agents: list[~azure.mgmt.cognitiveservices.models.AgentReferenceProperties]
    :ivar agent_identity_blueprint: The EntraId Agentic Blueprint of the application.
    :vartype agent_identity_blueprint: ~azure.mgmt.cognitiveservices.models.AssignedIdentity
    :ivar default_instance_identity: The (default) agent instance identity of the application.
    :vartype default_instance_identity: ~azure.mgmt.cognitiveservices.models.AssignedIdentity
    :ivar authorization_policy: Gets or sets the authorization policy associated with this agentic
     application instance.
    :vartype authorization_policy:
     ~azure.mgmt.cognitiveservices.models.ApplicationAuthorizationPolicy
    :ivar traffic_routing_policy: Gets or sets the traffic routing policy for the application's
     deployments.
    :vartype traffic_routing_policy:
     ~azure.mgmt.cognitiveservices.models.ApplicationTrafficRoutingPolicy
    :ivar provisioning_state: Provisioning state of the application. Known values are: "Succeeded",
     "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.AgenticApplicationProvisioningState
    :ivar is_enabled: Enabledstate of the application.
    :vartype is_enabled: bool
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The display name of the application."""
    base_url: Optional[str] = rest_field(name="baseUrl", visibility=["read", "create", "update", "delete", "query"])
    """The application's dedicated invocation endpoint."""
    agents: Optional[list["_models.AgentReferenceProperties"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of agent definitions comprising this application, returned as references to the
     objects under the parent project; use this to obtain a flat list of all agent-version pairs
     represented by this application."""
    agent_identity_blueprint: Optional["_models.AssignedIdentity"] = rest_field(
        name="agentIdentityBlueprint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The EntraId Agentic Blueprint of the application."""
    default_instance_identity: Optional["_models.AssignedIdentity"] = rest_field(
        name="defaultInstanceIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The (default) agent instance identity of the application."""
    authorization_policy: Optional["_models.ApplicationAuthorizationPolicy"] = rest_field(
        name="authorizationPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the authorization policy associated with this agentic application instance."""
    traffic_routing_policy: Optional["_models.ApplicationTrafficRoutingPolicy"] = rest_field(
        name="trafficRoutingPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the traffic routing policy for the application's deployments."""
    provisioning_state: Optional[Union[str, "_models.AgenticApplicationProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state of the application. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\"."""
    is_enabled: Optional[bool] = rest_field(name="isEnabled", visibility=["read"])
    """Enabledstate of the application."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        tags: Optional[dict[str, str]] = None,
        display_name: Optional[str] = None,
        base_url: Optional[str] = None,
        agents: Optional[list["_models.AgentReferenceProperties"]] = None,
        agent_identity_blueprint: Optional["_models.AssignedIdentity"] = None,
        default_instance_identity: Optional["_models.AssignedIdentity"] = None,
        authorization_policy: Optional["_models.ApplicationAuthorizationPolicy"] = None,
        traffic_routing_policy: Optional["_models.ApplicationTrafficRoutingPolicy"] = None,
    ) -> None: ...

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

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


class AgentProtocolVersion(_Model):
    """Type modeling the protocol and version used by an agent/exposed by a deployment.

    :ivar protocol: The protocol used by the agent/exposed by a deployment. Known values are:
     "Agent", "A2A", and "Responses".
    :vartype protocol: str or ~azure.mgmt.cognitiveservices.models.AgentProtocol
    :ivar version: The version of the protocol.
    :vartype version: str
    """

    protocol: Optional[Union[str, "_models.AgentProtocol"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The protocol used by the agent/exposed by a deployment. Known values are: \"Agent\", \"A2A\",
     and \"Responses\"."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The version of the protocol."""

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

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

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


class AgentReference(ProxyResource):
    """Agent Reference 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.cognitiveservices.models.SystemData
    :ivar properties: [Required] Additional attributes of the entity. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.AgentReferenceProperties
    """

    properties: "_models.AgentReferenceProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """[Required] Additional attributes of the entity. Required."""

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

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

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


class AgentReferenceProperties(_Model):
    """Type modeling a reference to a version of an agent definition.

    :ivar agent_id: Gets the agent's unique identifier within the organization (subscription).
    :vartype agent_id: str
    :ivar agent_name: Gets the agent's name (unique within the project/app).
    :vartype agent_name: str
    """

    agent_id: Optional[str] = rest_field(name="agentId", visibility=["read", "create", "update", "delete", "query"])
    """Gets the agent's unique identifier within the organization (subscription)."""
    agent_name: Optional[str] = rest_field(name="agentName", visibility=["read", "create", "update", "delete", "query"])
    """Gets the agent's name (unique within the project/app)."""

    @overload
    def __init__(
        self,
        *,
        agent_id: Optional[str] = None,
        agent_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 AgentReferenceResourceArmPaginatedResult(_Model):
    """A paginated list of Agent Reference entities.

    :ivar next_link: The link to the next page of Agent Reference objects. If null, there are no
     additional pages.
    :vartype next_link: str
    :ivar value: An array of objects of type Agent Reference.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.AgentReference]
    """

    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The link to the next page of Agent Reference objects. If null, there are no additional pages."""
    value: Optional[list["_models.AgentReference"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of objects of type Agent Reference."""

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

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

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


class ApiKeyAuthConnectionProperties(ConnectionPropertiesV2, discriminator="ApiKey"):
    """This connection type covers the generic ApiKey auth connection categories, for examples:
    AzureOpenAI:
    Category:= AzureOpenAI
    AuthType:= ApiKey (as type discriminator)
    Credentials:= {ApiKey} as .ApiKey
    Target:= {ApiBase}

    CognitiveService:
    Category:= CognitiveService
    AuthType:= ApiKey (as type discriminator)
    Credentials:= {SubscriptionKey} as ApiKey
    Target:= ServiceRegion={serviceRegion}

    CognitiveSearch:
    Category:= CognitiveSearch
    AuthType:= ApiKey (as type discriminator)
    Credentials:= {Key} as ApiKey
    Target:= {Endpoint}

    Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials: Api key object for connection credential.
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionApiKey
    :ivar auth_type: Authentication type of the connection target. Required. API_KEY.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.API_KEY
    """

    credentials: Optional["_models.ConnectionApiKey"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Api key object for connection credential."""
    auth_type: Literal[ConnectionAuthType.API_KEY] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. API_KEY."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionApiKey"] = None,
    ) -> None: ...

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


class ApiKeys(_Model):
    """The access keys for the cognitive services account.

    :ivar key1: Gets the value of key 1.
    :vartype key1: str
    :ivar key2: Gets the value of key 2.
    :vartype key2: str
    """

    key1: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets the value of key 1."""
    key2: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets the value of key 2."""

    @overload
    def __init__(
        self,
        *,
        key1: Optional[str] = None,
        key2: 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 ApiProperties(_Model):
    """The api properties for special APIs.

    :ivar qna_runtime_endpoint: (QnAMaker Only) The runtime endpoint of QnAMaker.
    :vartype qna_runtime_endpoint: str
    :ivar qna_azure_search_endpoint_key: (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
    :vartype qna_azure_search_endpoint_key: str
    :ivar qna_azure_search_endpoint_id: (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
    :vartype qna_azure_search_endpoint_id: str
    :ivar statistics_enabled: (Bing Search Only) The flag to enable statistics of Bing Search.
    :vartype statistics_enabled: bool
    :ivar event_hub_connection_string: (Personalization Only) The flag to enable statistics of Bing
     Search.
    :vartype event_hub_connection_string: str
    :ivar storage_account_connection_string: (Personalization Only) The storage account connection
     string.
    :vartype storage_account_connection_string: str
    :ivar aad_client_id: (Metrics Advisor Only) The Azure AD Client Id (Application Id).
    :vartype aad_client_id: str
    :ivar aad_tenant_id: (Metrics Advisor Only) The Azure AD Tenant Id.
    :vartype aad_tenant_id: str
    :ivar super_user: (Metrics Advisor Only) The super user of Metrics Advisor.
    :vartype super_user: str
    :ivar website_name: (Metrics Advisor Only) The website name of Metrics Advisor.
    :vartype website_name: str
    """

    qna_runtime_endpoint: Optional[str] = rest_field(
        name="qnaRuntimeEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """(QnAMaker Only) The runtime endpoint of QnAMaker."""
    qna_azure_search_endpoint_key: Optional[str] = rest_field(
        name="qnaAzureSearchEndpointKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """(QnAMaker Only) The Azure Search endpoint key of QnAMaker."""
    qna_azure_search_endpoint_id: Optional[str] = rest_field(
        name="qnaAzureSearchEndpointId", visibility=["read", "create", "update", "delete", "query"]
    )
    """(QnAMaker Only) The Azure Search endpoint id of QnAMaker."""
    statistics_enabled: Optional[bool] = rest_field(
        name="statisticsEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Bing Search Only) The flag to enable statistics of Bing Search."""
    event_hub_connection_string: Optional[str] = rest_field(
        name="eventHubConnectionString", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Personalization Only) The flag to enable statistics of Bing Search."""
    storage_account_connection_string: Optional[str] = rest_field(
        name="storageAccountConnectionString", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Personalization Only) The storage account connection string."""
    aad_client_id: Optional[str] = rest_field(
        name="aadClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Metrics Advisor Only) The Azure AD Client Id (Application Id)."""
    aad_tenant_id: Optional[str] = rest_field(
        name="aadTenantId", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Metrics Advisor Only) The Azure AD Tenant Id."""
    super_user: Optional[str] = rest_field(name="superUser", visibility=["read", "create", "update", "delete", "query"])
    """(Metrics Advisor Only) The super user of Metrics Advisor."""
    website_name: Optional[str] = rest_field(
        name="websiteName", visibility=["read", "create", "update", "delete", "query"]
    )
    """(Metrics Advisor Only) The website name of Metrics Advisor."""

    @overload
    def __init__(
        self,
        *,
        qna_runtime_endpoint: Optional[str] = None,
        qna_azure_search_endpoint_key: Optional[str] = None,
        qna_azure_search_endpoint_id: Optional[str] = None,
        statistics_enabled: Optional[bool] = None,
        event_hub_connection_string: Optional[str] = None,
        storage_account_connection_string: Optional[str] = None,
        aad_client_id: Optional[str] = None,
        aad_tenant_id: Optional[str] = None,
        super_user: Optional[str] = None,
        website_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 ApplicationAuthorizationPolicy(_Model):
    """Represents a policy for authorizing applications based on specified authentication and
    authorization schemes.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ChannelsBuiltInAuthorizationPolicy, RoleBasedBuiltInAuthorizationPolicy,
    OrganizationSharedBuiltInAuthorizationPolicy

    :ivar type: Authorization scheme type. Required. Known values are: "Default",
     "OrganizationScope", "Channels", and "Custom".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.BuiltInAuthorizationScheme
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Authorization scheme type. Required. Known values are: \"Default\", \"OrganizationScope\",
     \"Channels\", and \"Custom\"."""

    @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 ApplicationTrafficRoutingPolicy(_Model):
    """Type representing an application traffic policy as a property of an agentic application.

    :ivar protocol: Methodology used to route traffic to the application's deployments.
     "FixedRatio"
    :vartype protocol: str or ~azure.mgmt.cognitiveservices.models.TrafficRoutingProtocol
    :ivar rules: Gets or sets the collection of traffic routing rules.
    :vartype rules: list[~azure.mgmt.cognitiveservices.models.TrafficRoutingRule]
    """

    protocol: Optional[Union[str, "_models.TrafficRoutingProtocol"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Methodology used to route traffic to the application's deployments. \"FixedRatio\""""
    rules: Optional[list["_models.TrafficRoutingRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the collection of traffic routing rules."""

    @overload
    def __init__(
        self,
        *,
        protocol: Optional[Union[str, "_models.TrafficRoutingProtocol"]] = None,
        rules: Optional[list["_models.TrafficRoutingRule"]] = None,
    ) -> None: ...

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

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


class AssignedIdentity(_Model):
    """Type representing an identity assignment.

    :ivar kind: Specifies the kind of Entra identity described by this object. Required. Known
     values are: "AgentBlueprint", "AgentInstance", "AgenticUser", "Managed", and "None".
    :vartype kind: str or ~azure.mgmt.cognitiveservices.models.IdentityKind
    :ivar type: Enumeration of identity types, from the perspective of management. Required. Known
     values are: "System", "User", and "None".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.IdentityManagementType
    :ivar client_id: The client ID of the identity. Required.
    :vartype client_id: str
    :ivar principal_id: The principal ID of the identity. Required.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the identity. Required.
    :vartype tenant_id: str
    :ivar subject: The subject of this identity assignment.
    :vartype subject: str
    :ivar provisioning_state: Represents the provisioning state of an identity resource. Known
     values are: "Creating", "Updating", "Succeeded", "Failed", "Canceled", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.IdentityProvisioningState
    """

    kind: Union[str, "_models.IdentityKind"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the kind of Entra identity described by this object. Required. Known values are:
     \"AgentBlueprint\", \"AgentInstance\", \"AgenticUser\", \"Managed\", and \"None\"."""
    type: Union[str, "_models.IdentityManagementType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Enumeration of identity types, from the perspective of management. Required. Known values are:
     \"System\", \"User\", and \"None\"."""
    client_id: str = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """The client ID of the identity. Required."""
    principal_id: str = rest_field(name="principalId", visibility=["read", "create", "update", "delete", "query"])
    """The principal ID of the identity. Required."""
    tenant_id: str = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """The tenant ID of the identity. Required."""
    subject: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The subject of this identity assignment."""
    provisioning_state: Optional[Union[str, "_models.IdentityProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Represents the provisioning state of an identity resource. Known values are: \"Creating\",
     \"Updating\", \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\"."""

    @overload
    def __init__(
        self,
        *,
        kind: Union[str, "_models.IdentityKind"],
        type: Union[str, "_models.IdentityManagementType"],
        client_id: str,
        principal_id: str,
        tenant_id: str,
        subject: 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 BillingMeterInfo(_Model):
    """BillingMeterInfo.

    :ivar name:
    :vartype name: str
    :ivar meter_id:
    :vartype meter_id: str
    :ivar unit:
    :vartype unit: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    meter_id: Optional[str] = rest_field(name="meterId", visibility=["read", "create", "update", "delete", "query"])
    unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        meter_id: Optional[str] = None,
        unit: 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 CalculateModelCapacityParameter(_Model):
    """Calculate Model Capacity parameter.

    :ivar model: Properties of Cognitive Services account deployment model.
    :vartype model: ~azure.mgmt.cognitiveservices.models.DeploymentModel
    :ivar sku_name: The name of SKU.
    :vartype sku_name: str
    :ivar workloads: List of Model Capacity Calculator Workload.
    :vartype workloads: list[~azure.mgmt.cognitiveservices.models.ModelCapacityCalculatorWorkload]
    """

    model: Optional["_models.DeploymentModel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties of Cognitive Services account deployment model."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    """The name of SKU."""
    workloads: Optional[list["_models.ModelCapacityCalculatorWorkload"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Model Capacity Calculator Workload."""

    @overload
    def __init__(
        self,
        *,
        model: Optional["_models.DeploymentModel"] = None,
        sku_name: Optional[str] = None,
        workloads: Optional[list["_models.ModelCapacityCalculatorWorkload"]] = None,
    ) -> None: ...

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

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


class CalculateModelCapacityResult(_Model):
    """Calculate Model Capacity result.

    :ivar model: Properties of Cognitive Services account deployment model.
    :vartype model: ~azure.mgmt.cognitiveservices.models.DeploymentModel
    :ivar sku_name:
    :vartype sku_name: str
    :ivar estimated_capacity: Model Estimated Capacity.
    :vartype estimated_capacity:
     ~azure.mgmt.cognitiveservices.models.CalculateModelCapacityResultEstimatedCapacity
    """

    model: Optional["_models.DeploymentModel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties of Cognitive Services account deployment model."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    estimated_capacity: Optional["_models.CalculateModelCapacityResultEstimatedCapacity"] = rest_field(
        name="estimatedCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Model Estimated Capacity."""

    @overload
    def __init__(
        self,
        *,
        model: Optional["_models.DeploymentModel"] = None,
        sku_name: Optional[str] = None,
        estimated_capacity: Optional["_models.CalculateModelCapacityResultEstimatedCapacity"] = None,
    ) -> None: ...

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

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


class CalculateModelCapacityResultEstimatedCapacity(_Model):  # pylint: disable=name-too-long
    """Model Estimated Capacity.

    :ivar value:
    :vartype value: int
    :ivar deployable_value:
    :vartype deployable_value: int
    """

    value: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    deployable_value: Optional[int] = rest_field(
        name="deployableValue", visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class CallRateLimit(_Model):
    """The call rate limit Cognitive Services account.

    :ivar count: The count value of Call Rate Limit.
    :vartype count: float
    :ivar renewal_period: The renewal period in seconds of Call Rate Limit.
    :vartype renewal_period: float
    :ivar rules:
    :vartype rules: list[~azure.mgmt.cognitiveservices.models.ThrottlingRule]
    """

    count: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The count value of Call Rate Limit."""
    renewal_period: Optional[float] = rest_field(
        name="renewalPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """The renewal period in seconds of Call Rate Limit."""
    rules: Optional[list["_models.ThrottlingRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        count: Optional[float] = None,
        renewal_period: Optional[float] = None,
        rules: Optional[list["_models.ThrottlingRule"]] = None,
    ) -> None: ...

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

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


class CapabilityHost(ProxyResource):
    """Azure Resource Manager resource envelope.

    :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.cognitiveservices.models.SystemData
    :ivar properties: [Required] Additional attributes of the entity. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.CapabilityHostProperties
    """

    properties: "_models.CapabilityHostProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """[Required] Additional attributes of the entity. Required."""

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

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

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


class CapabilityHostProperties(ResourceBase):
    """CapabilityHostProperties.

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    :ivar ai_services_connections: List of AI services connections.
    :vartype ai_services_connections: list[str]
    :ivar capability_host_kind: Kind of this capability host. "Agents"
    :vartype capability_host_kind: str or ~azure.mgmt.cognitiveservices.models.CapabilityHostKind
    :ivar customer_subnet: Customer subnet info to help set up this capability host.
    :vartype customer_subnet: str
    :ivar provisioning_state: Provisioning state for the CapabilityHost. Known values are:
     "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.CapabilityHostProvisioningState
    :ivar storage_connections: List of connection names from those available in the account or
     project to be used as a storage resource.
    :vartype storage_connections: list[str]
    :ivar thread_storage_connections: List of connection names from those available in the account
     or project to be used for Thread storage.
    :vartype thread_storage_connections: list[str]
    :ivar vector_store_connections: List of connection names from those available in the account or
     project to be used for vector database (e.g. CosmosDB).
    :vartype vector_store_connections: list[str]
    :ivar enable_public_hosting_environment: Whether public hosting environment is enabled for the
     capability host.
    :vartype enable_public_hosting_environment: bool
    """

    ai_services_connections: Optional[list[str]] = rest_field(
        name="aiServicesConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of AI services connections."""
    capability_host_kind: Optional[Union[str, "_models.CapabilityHostKind"]] = rest_field(
        name="capabilityHostKind", visibility=["read", "create", "update", "delete", "query"]
    )
    """Kind of this capability host. \"Agents\""""
    customer_subnet: Optional[str] = rest_field(
        name="customerSubnet", visibility=["read", "create", "update", "delete", "query"]
    )
    """Customer subnet info to help set up this capability host."""
    provisioning_state: Optional[Union[str, "_models.CapabilityHostProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state for the CapabilityHost. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\"."""
    storage_connections: Optional[list[str]] = rest_field(
        name="storageConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used as a storage
     resource."""
    thread_storage_connections: Optional[list[str]] = rest_field(
        name="threadStorageConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used for Thread
     storage."""
    vector_store_connections: Optional[list[str]] = rest_field(
        name="vectorStoreConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used for vector
     database (e.g. CosmosDB)."""
    enable_public_hosting_environment: Optional[bool] = rest_field(
        name="enablePublicHostingEnvironment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether public hosting environment is enabled for the capability host."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        tags: Optional[dict[str, str]] = None,
        ai_services_connections: Optional[list[str]] = None,
        capability_host_kind: Optional[Union[str, "_models.CapabilityHostKind"]] = None,
        customer_subnet: Optional[str] = None,
        storage_connections: Optional[list[str]] = None,
        thread_storage_connections: Optional[list[str]] = None,
        vector_store_connections: Optional[list[str]] = None,
        enable_public_hosting_environment: 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 CapacityConfig(_Model):
    """The capacity configuration.

    :ivar minimum: The minimum capacity.
    :vartype minimum: int
    :ivar maximum: The maximum capacity.
    :vartype maximum: int
    :ivar step: The minimal incremental between allowed values for capacity.
    :vartype step: int
    :ivar default: The default capacity.
    :vartype default: int
    :ivar allowed_values: The array of allowed values for capacity.
    :vartype allowed_values: list[int]
    """

    minimum: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The minimum capacity."""
    maximum: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum capacity."""
    step: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The minimal incremental between allowed values for capacity."""
    default: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The default capacity."""
    allowed_values: Optional[list[int]] = rest_field(
        name="allowedValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The array of allowed values for capacity."""

    @overload
    def __init__(
        self,
        *,
        minimum: Optional[int] = None,
        maximum: Optional[int] = None,
        step: Optional[int] = None,
        default: Optional[int] = None,
        allowed_values: Optional[list[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 ChannelsBuiltInAuthorizationPolicy(ApplicationAuthorizationPolicy, discriminator="Channels"):
    """Represents a built-in authorization policy specific to Azure Bot Service/Channels
    authentication.

    :ivar type: Authorization scheme type. Required. Channels-specific (AzureBotService)
     authorization.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.CHANNELS
    """

    type: Literal[BuiltInAuthorizationScheme.CHANNELS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authorization scheme type. Required. Channels-specific (AzureBotService) authorization."""

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = BuiltInAuthorizationScheme.CHANNELS  # type: ignore


class CheckDomainAvailabilityParameter(_Model):
    """Check Domain availability parameter.

    :ivar subdomain_name: The subdomain name to use. Required.
    :vartype subdomain_name: str
    :ivar type: The Type of the resource. Required.
    :vartype type: str
    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    """

    subdomain_name: str = rest_field(name="subdomainName", visibility=["read", "create", "update", "delete", "query"])
    """The subdomain name to use. Required."""
    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Type of the resource. Required."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""

    @overload
    def __init__(
        self,
        *,
        subdomain_name: str,
        type: str,
        kind: 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 CheckSkuAvailabilityParameter(_Model):
    """Check SKU availability parameter.

    :ivar skus: The SKU of the resource. Required.
    :vartype skus: list[str]
    :ivar kind: The kind (type) of cognitive service account. Required.
    :vartype kind: str
    :ivar type: The Type of the resource. Required.
    :vartype type: str
    """

    skus: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU of the resource. Required."""
    kind: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account. Required."""
    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Type of the resource. Required."""

    @overload
    def __init__(
        self,
        *,
        skus: list[str],
        kind: str,
        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 CommitmentCost(_Model):
    """Cognitive Services account commitment cost.

    :ivar commitment_meter_id: Commitment meter Id.
    :vartype commitment_meter_id: str
    :ivar overage_meter_id: Overage meter Id.
    :vartype overage_meter_id: str
    """

    commitment_meter_id: Optional[str] = rest_field(
        name="commitmentMeterId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Commitment meter Id."""
    overage_meter_id: Optional[str] = rest_field(
        name="overageMeterId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Overage meter Id."""

    @overload
    def __init__(
        self,
        *,
        commitment_meter_id: Optional[str] = None,
        overage_meter_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 CommitmentPeriod(_Model):
    """Cognitive Services account commitment period.

    :ivar tier: Commitment period commitment tier.
    :vartype tier: str
    :ivar count: Commitment period commitment count.
    :vartype count: int
    :ivar quota: Cognitive Services account commitment quota.
    :vartype quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota
    :ivar start_date: Commitment period start date.
    :vartype start_date: str
    :ivar end_date: Commitment period end date.
    :vartype end_date: str
    """

    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Commitment period commitment tier."""
    count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Commitment period commitment count."""
    quota: Optional["_models.CommitmentQuota"] = rest_field(visibility=["read"])
    """Cognitive Services account commitment quota."""
    start_date: Optional[str] = rest_field(name="startDate", visibility=["read"])
    """Commitment period start date."""
    end_date: Optional[str] = rest_field(name="endDate", visibility=["read"])
    """Commitment period end date."""

    @overload
    def __init__(
        self,
        *,
        tier: Optional[str] = None,
        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 CommitmentPlan(Resource):
    """Cognitive Services account commitment plan.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services account commitment plan.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.CommitmentPlanProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    :ivar sku: The resource model definition representing SKU.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    """

    properties: Optional["_models.CommitmentPlanProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account commitment plan."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource model definition representing SKU."""

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

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

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


class CommitmentPlanAccountAssociation(ProxyResource):
    """The commitment plan association.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services account commitment plan association.
    :vartype properties:
     ~azure.mgmt.cognitiveservices.models.CommitmentPlanAccountAssociationProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.CommitmentPlanAccountAssociationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account commitment plan association."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

    __flattened_items = ["account_id"]

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _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 CommitmentPlanAccountAssociationProperties(_Model):  # pylint: disable=name-too-long
    """The commitment plan account association properties.

    :ivar account_id: The Azure resource id of the account.
    :vartype account_id: str
    """

    account_id: Optional[str] = rest_field(name="accountId", visibility=["read", "create", "update", "delete", "query"])
    """The Azure resource id of the account."""

    @overload
    def __init__(
        self,
        *,
        account_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 CommitmentPlanAssociation(_Model):
    """The commitment plan association.

    :ivar commitment_plan_id: The Azure resource id of the commitment plan.
    :vartype commitment_plan_id: str
    :ivar commitment_plan_location: The location of of the commitment plan.
    :vartype commitment_plan_location: str
    """

    commitment_plan_id: Optional[str] = rest_field(
        name="commitmentPlanId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Azure resource id of the commitment plan."""
    commitment_plan_location: Optional[str] = rest_field(
        name="commitmentPlanLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The location of of the commitment plan."""

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

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

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


class CommitmentPlanProperties(_Model):
    """Properties of Cognitive Services account commitment plan.

    :ivar provisioning_state: Gets the status of the resource at the time the operation was called.
     Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded", and
     "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.CommitmentPlanProvisioningState
    :ivar commitment_plan_guid: Commitment plan guid.
    :vartype commitment_plan_guid: str
    :ivar hosting_model: Account hosting model. Known values are: "Web", "ConnectedContainer",
     "DisconnectedContainer", and "ProvisionedWeb".
    :vartype hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel
    :ivar plan_type: Commitment plan type.
    :vartype plan_type: str
    :ivar current: Cognitive Services account commitment period.
    :vartype current: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod
    :ivar auto_renew: AutoRenew commitment plan.
    :vartype auto_renew: bool
    :ivar next: Cognitive Services account commitment period.
    :vartype next: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod
    :ivar last: Cognitive Services account commitment period.
    :vartype last: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod
    :ivar provisioning_issues: The list of ProvisioningIssue.
    :vartype provisioning_issues: list[str]
    """

    provisioning_state: Optional[Union[str, "_models.CommitmentPlanProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the resource at the time the operation was called. Known values are:
     \"Accepted\", \"Creating\", \"Deleting\", \"Moving\", \"Failed\", \"Succeeded\", and
     \"Canceled\"."""
    commitment_plan_guid: Optional[str] = rest_field(
        name="commitmentPlanGuid", visibility=["read", "create", "update", "delete", "query"]
    )
    """Commitment plan guid."""
    hosting_model: Optional[Union[str, "_models.HostingModel"]] = rest_field(
        name="hostingModel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account hosting model. Known values are: \"Web\", \"ConnectedContainer\",
     \"DisconnectedContainer\", and \"ProvisionedWeb\"."""
    plan_type: Optional[str] = rest_field(name="planType", visibility=["read", "create", "update", "delete", "query"])
    """Commitment plan type."""
    current: Optional["_models.CommitmentPeriod"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Cognitive Services account commitment period."""
    auto_renew: Optional[bool] = rest_field(
        name="autoRenew", visibility=["read", "create", "update", "delete", "query"]
    )
    """AutoRenew commitment plan."""
    next: Optional["_models.CommitmentPeriod"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Cognitive Services account commitment period."""
    last: Optional["_models.CommitmentPeriod"] = rest_field(visibility=["read"])
    """Cognitive Services account commitment period."""
    provisioning_issues: Optional[list[str]] = rest_field(name="provisioningIssues", visibility=["read"])
    """The list of ProvisioningIssue."""

    @overload
    def __init__(
        self,
        *,
        commitment_plan_guid: Optional[str] = None,
        hosting_model: Optional[Union[str, "_models.HostingModel"]] = None,
        plan_type: Optional[str] = None,
        current: Optional["_models.CommitmentPeriod"] = None,
        auto_renew: Optional[bool] = None,
        next: Optional["_models.CommitmentPeriod"] = None,
    ) -> None: ...

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

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


class CommitmentQuota(_Model):
    """Cognitive Services account commitment quota.

    :ivar quantity: Commitment quota quantity.
    :vartype quantity: int
    :ivar unit: Commitment quota unit.
    :vartype unit: str
    """

    quantity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Commitment quota quantity."""
    unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Commitment quota unit."""

    @overload
    def __init__(
        self,
        *,
        quantity: Optional[int] = None,
        unit: 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 CommitmentTier(_Model):
    """Cognitive Services account commitment tier.

    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    :ivar sku_name: The name of the SKU. Ex - P3. It is typically a letter+number code.
    :vartype sku_name: str
    :ivar hosting_model: Account hosting model. Known values are: "Web", "ConnectedContainer",
     "DisconnectedContainer", and "ProvisionedWeb".
    :vartype hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel
    :ivar plan_type: Commitment plan type.
    :vartype plan_type: str
    :ivar tier: Commitment period commitment tier.
    :vartype tier: str
    :ivar max_count: Commitment period commitment max count.
    :vartype max_count: int
    :ivar quota: Cognitive Services account commitment quota.
    :vartype quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota
    :ivar cost: Cognitive Services account commitment cost.
    :vartype cost: ~azure.mgmt.cognitiveservices.models.CommitmentCost
    """

    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the SKU. Ex - P3. It is typically a letter+number code."""
    hosting_model: Optional[Union[str, "_models.HostingModel"]] = rest_field(
        name="hostingModel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account hosting model. Known values are: \"Web\", \"ConnectedContainer\",
     \"DisconnectedContainer\", and \"ProvisionedWeb\"."""
    plan_type: Optional[str] = rest_field(name="planType", visibility=["read", "create", "update", "delete", "query"])
    """Commitment plan type."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Commitment period commitment tier."""
    max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"])
    """Commitment period commitment max count."""
    quota: Optional["_models.CommitmentQuota"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Cognitive Services account commitment quota."""
    cost: Optional["_models.CommitmentCost"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Cognitive Services account commitment cost."""

    @overload
    def __init__(
        self,
        *,
        kind: Optional[str] = None,
        sku_name: Optional[str] = None,
        hosting_model: Optional[Union[str, "_models.HostingModel"]] = None,
        plan_type: Optional[str] = None,
        tier: Optional[str] = None,
        max_count: Optional[int] = None,
        quota: Optional["_models.CommitmentQuota"] = None,
        cost: Optional["_models.CommitmentCost"] = None,
    ) -> None: ...

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

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


class ComputeOperationStatus(ProxyResource):
    """The status of an async compute operation.

    :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.cognitiveservices.models.SystemData
    :ivar properties: The properties of the compute operation status.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ComputeOperationStatusProperties
    """

    properties: Optional["_models.ComputeOperationStatusProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the compute operation status."""

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

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

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


class ComputeOperationStatusProperties(_Model):
    """The properties of a compute operation status.

    :ivar start_time: The start time of the operation.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: The end time of the operation.
    :vartype end_time: ~datetime.datetime
    :ivar status: The status of the operation. Known values are: "InProgress", "Succeeded",
     "Failed", and "Canceled".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.ComputeOperationStatusType
    :ivar error: Error details if the operation failed.
    :vartype error: ~azure.mgmt.cognitiveservices.models.ErrorDetail
    """

    start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
    """The start time of the operation."""
    end_time: Optional[datetime.datetime] = rest_field(name="endTime", visibility=["read"], format="rfc3339")
    """The end time of the operation."""
    status: Optional[Union[str, "_models.ComputeOperationStatusType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the operation. Known values are: \"InProgress\", \"Succeeded\", \"Failed\", and
     \"Canceled\"."""
    error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Error details if the operation failed."""

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

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

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


class ConnectionAccessKey(_Model):
    """ConnectionAccessKey.

    :ivar access_key_id:
    :vartype access_key_id: str
    :ivar secret_access_key:
    :vartype secret_access_key: str
    """

    access_key_id: Optional[str] = rest_field(
        name="accessKeyId", visibility=["read", "create", "update", "delete", "query"]
    )
    secret_access_key: Optional[str] = rest_field(
        name="secretAccessKey", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        access_key_id: Optional[str] = None,
        secret_access_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 ConnectionAccountKey(_Model):
    """Account key object for connection credential.

    :ivar key:
    :vartype key: str
    """

    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        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 ConnectionApiKey(_Model):
    """Api key object for connection credential.

    :ivar key:
    :vartype key: str
    """

    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

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

    :ivar client_id:
    :vartype client_id: str
    :ivar resource_id:
    :vartype resource_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class ConnectionOAuth2(_Model):
    """ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2
    provider's implementation.

    :ivar auth_url: Required by Concur connection category.
    :vartype auth_url: str
    :ivar client_id: Client id in the format of UUID.
    :vartype client_id: str
    :ivar client_secret:
    :vartype client_secret: str
    :ivar developer_token: Required by GoogleAdWords connection category.
    :vartype developer_token: str
    :ivar password:
    :vartype password: str
    :ivar refresh_token: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square,
     Xero, Zoho where user needs to get RefreshToken offline.
    :vartype refresh_token: str
    :ivar tenant_id: Required by QuickBooks and Xero connection categories.
    :vartype tenant_id: str
    :ivar username: Concur, ServiceNow auth server AccessToken grant type is 'Password' which
     requires UsernamePassword.
    :vartype username: str
    """

    auth_url: Optional[str] = rest_field(name="authUrl", visibility=["read", "create", "update", "delete", "query"])
    """Required by Concur connection category."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    """Client id in the format of UUID."""
    client_secret: Optional[str] = rest_field(
        name="clientSecret", visibility=["read", "create", "update", "delete", "query"]
    )
    developer_token: Optional[str] = rest_field(
        name="developerToken", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required by GoogleAdWords connection category."""
    password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    refresh_token: Optional[str] = rest_field(
        name="refreshToken", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user
     needs to get RefreshToken offline."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """Required by QuickBooks and Xero connection categories."""
    username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires
     UsernamePassword."""

    @overload
    def __init__(
        self,
        *,
        auth_url: Optional[str] = None,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        developer_token: Optional[str] = None,
        password: Optional[str] = None,
        refresh_token: Optional[str] = None,
        tenant_id: Optional[str] = None,
        username: 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 ConnectionPersonalAccessToken(_Model):
    """ConnectionPersonalAccessToken.

    :ivar pat:
    :vartype pat: str
    """

    pat: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        pat: 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 ConnectionPropertiesV2BasicResource(ProxyResource):
    """Connection base resource schema.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Connection property base schema. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ConnectionPropertiesV2
    """

    properties: "_models.ConnectionPropertiesV2" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Connection property base schema. Required."""

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

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

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


class ConnectionServicePrincipal(_Model):
    """ConnectionServicePrincipal.

    :ivar client_id:
    :vartype client_id: str
    :ivar client_secret:
    :vartype client_secret: str
    :ivar tenant_id:
    :vartype tenant_id: str
    """

    client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"])
    client_secret: Optional[str] = rest_field(
        name="clientSecret", visibility=["read", "create", "update", "delete", "query"]
    )
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        tenant_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 ConnectionSharedAccessSignature(_Model):
    """ConnectionSharedAccessSignature.

    :ivar sas:
    :vartype sas: str
    """

    sas: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        sas: 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 ConnectionUpdateContent(_Model):
    """The properties that the Cognitive services connection will be updated with.

    :ivar properties: The properties that the Cognitive services connection will be updated with.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ConnectionPropertiesV2
    """

    properties: Optional["_models.ConnectionPropertiesV2"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties that the Cognitive services connection will be updated with."""

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

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

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


class ConnectionUsernamePassword(_Model):
    """ConnectionUsernamePassword.

    :ivar password:
    :vartype password: str
    :ivar security_token: Optional, required by connections like SalesForce for extra security in
     addition to UsernamePassword.
    :vartype security_token: str
    :ivar username:
    :vartype username: str
    """

    password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    security_token: Optional[str] = rest_field(
        name="securityToken", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional, required by connections like SalesForce for extra security in addition to
     UsernamePassword."""
    username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        password: Optional[str] = None,
        security_token: Optional[str] = None,
        username: 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 RaiBlocklistConfig(_Model):
    """Azure OpenAI blocklist config.

    :ivar blocklist_name: Name of ContentFilter.
    :vartype blocklist_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    """

    blocklist_name: Optional[str] = rest_field(
        name="blocklistName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of ContentFilter."""
    blocking: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If blocking would occur."""

    @overload
    def __init__(
        self,
        *,
        blocklist_name: Optional[str] = None,
        blocking: 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 CustomBlocklistConfig(RaiBlocklistConfig):
    """Gets or sets the source to which filter applies.

    :ivar blocklist_name: Name of ContentFilter.
    :vartype blocklist_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    :ivar source: Content source to apply the Content Filters. Known values are: "Prompt",
     "Completion", "PreToolCall", "PostToolCall", "PreRun", and "PostRun".
    :vartype source: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyContentSource
    """

    source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Content source to apply the Content Filters. Known values are: \"Prompt\", \"Completion\",
     \"PreToolCall\", \"PostToolCall\", \"PreRun\", and \"PostRun\"."""

    @overload
    def __init__(
        self,
        *,
        blocklist_name: Optional[str] = None,
        blocking: Optional[bool] = None,
        source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = None,
    ) -> None: ...

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

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


class CustomKeys(_Model):
    """Custom Keys credential object.

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

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

    @overload
    def __init__(
        self,
        *,
        keys_property: 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 CustomKeysConnectionProperties(ConnectionPropertiesV2, discriminator="CustomKeys"):
    """Category:= CustomKeys AuthType:= CustomKeys (as type discriminator) Credentials:= {CustomKeys}
    as CustomKeys Target:= {any value} Use Metadata property bag for ApiVersion and other metadata
    fields.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials: Custom Keys credential object.
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.CustomKeys
    :ivar auth_type: Authentication type of the connection target. Required. CUSTOM_KEYS.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.CUSTOM_KEYS
    """

    credentials: Optional["_models.CustomKeys"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom Keys credential object."""
    auth_type: Literal[ConnectionAuthType.CUSTOM_KEYS] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. CUSTOM_KEYS."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.CustomKeys"] = None,
    ) -> None: ...

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


class RaiTopicConfig(_Model):
    """Azure OpenAI RAI topic config.

    :ivar topic_name: Name of RAI topic.
    :vartype topic_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    """

    topic_name: Optional[str] = rest_field(name="topicName", visibility=["read", "create", "update", "delete", "query"])
    """Name of RAI topic."""
    blocking: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If blocking would occur."""

    @overload
    def __init__(
        self,
        *,
        topic_name: Optional[str] = None,
        blocking: 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 CustomTopicConfig(RaiTopicConfig):
    """Gets or sets the source to which filter applies.

    :ivar topic_name: Name of RAI topic.
    :vartype topic_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    :ivar source: Content source to apply the Content Filters. Known values are: "Prompt",
     "Completion", "PreToolCall", "PostToolCall", "PreRun", and "PostRun".
    :vartype source: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyContentSource
    """

    source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Content source to apply the Content Filters. Known values are: \"Prompt\", \"Completion\",
     \"PreToolCall\", \"PostToolCall\", \"PreRun\", and \"PostRun\"."""

    @overload
    def __init__(
        self,
        *,
        topic_name: Optional[str] = None,
        blocking: Optional[bool] = None,
        source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = None,
    ) -> None: ...

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

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


class DefenderForAISetting(ProxyResource):
    """The Defender for AI 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.cognitiveservices.models.SystemData
    :ivar properties: The Defender for AI resource properties.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.DefenderForAISettingProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.DefenderForAISettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Defender for AI resource properties."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

    __flattened_items = ["state"]

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _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 DefenderForAISettingProperties(_Model):
    """The Defender for AI resource properties.

    :ivar state: Defender for AI state on the AI resource. Known values are: "Disabled" and
     "Enabled".
    :vartype state: str or ~azure.mgmt.cognitiveservices.models.DefenderForAISettingState
    """

    state: Optional[Union[str, "_models.DefenderForAISettingState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defender for AI state on the AI resource. Known values are: \"Disabled\" and \"Enabled\"."""

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

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

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


class Deployment(ProxyResource):
    """Cognitive Services account deployment.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services account deployment.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.DeploymentProperties
    :ivar sku: The resource model definition representing SKU.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.DeploymentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account deployment."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource model definition representing SKU."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class DeploymentCapacitySettings(_Model):
    """Internal use only.

    :ivar designated_capacity: The designated capacity.
    :vartype designated_capacity: int
    :ivar priority: The priority of this capacity setting.
    :vartype priority: int
    """

    designated_capacity: Optional[int] = rest_field(
        name="designatedCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The designated capacity."""
    priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The priority of this capacity setting."""

    @overload
    def __init__(
        self,
        *,
        designated_capacity: Optional[int] = None,
        priority: 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 DeploymentProperties(_Model):
    """Properties of Cognitive Services account deployment.

    :ivar provisioning_state: Gets the status of the resource at the time the operation was called.
     Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded",
     "Disabled", and "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.DeploymentProvisioningState
    :ivar model: Properties of Cognitive Services account deployment model.
    :vartype model: ~azure.mgmt.cognitiveservices.models.DeploymentModel
    :ivar scale_settings: Properties of Cognitive Services account deployment model. (Deprecated,
     please use Deployment.sku instead.).
    :vartype scale_settings: ~azure.mgmt.cognitiveservices.models.DeploymentScaleSettings
    :ivar capabilities: The capabilities.
    :vartype capabilities: dict[str, str]
    :ivar rai_policy_name: The name of RAI policy.
    :vartype rai_policy_name: str
    :ivar call_rate_limit: The call rate limit Cognitive Services account.
    :vartype call_rate_limit: ~azure.mgmt.cognitiveservices.models.CallRateLimit
    :ivar rate_limits:
    :vartype rate_limits: list[~azure.mgmt.cognitiveservices.models.ThrottlingRule]
    :ivar version_upgrade_option: Deployment model version upgrade option. Known values are:
     "OnceNewDefaultVersionAvailable", "OnceCurrentVersionExpired", and "NoAutoUpgrade".
    :vartype version_upgrade_option: str or
     ~azure.mgmt.cognitiveservices.models.DeploymentModelVersionUpgradeOption
    :ivar dynamic_throttling_enabled: If the dynamic throttling is enabled.
    :vartype dynamic_throttling_enabled: bool
    :ivar current_capacity: The current capacity.
    :vartype current_capacity: int
    :ivar capacity_settings: Internal use only.
    :vartype capacity_settings: ~azure.mgmt.cognitiveservices.models.DeploymentCapacitySettings
    :ivar parent_deployment_name: The name of parent deployment.
    :vartype parent_deployment_name: str
    :ivar spillover_deployment_name: Specifies the deployment name that should serve requests when
     the request would have otherwise been throttled due to reaching current deployment throughput
     limit.
    :vartype spillover_deployment_name: str
    :ivar service_tier: The service tier for the deployment. Determines the pricing and performance
     level for request processing. Use 'Default' for standard pricing or 'Priority' for
     higher-priority processing with premium pricing. Note: Pause operations are only supported on
     Standard, DataZoneStandard, and GlobalStandard SKUs. Known values are: "Default" and
     "Priority".
    :vartype service_tier: str or ~azure.mgmt.cognitiveservices.models.ServiceTier
    :ivar deployment_state: The state of the deployment. Controls whether the deployment is
     accepting inference requests. Use 'Running' for active deployments that process requests, or
     'Paused' to temporarily stop inference while preserving the deployment configuration. Known
     values are: "Running" and "Paused".
    :vartype deployment_state: str or ~azure.mgmt.cognitiveservices.models.DeploymentState
    :ivar routing: Routing configuration for the deployment. This property is only applicable when
     the deployed model is 'model-router' version 2025-11-18 or later. Allows you to select the
     models subset for routing and the routing mode (balanced, accuracy, cost) for routing across
     all supported models or the model subset.
    :vartype routing: ~azure.mgmt.cognitiveservices.models.DeploymentRouting
    """

    provisioning_state: Optional[Union[str, "_models.DeploymentProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the resource at the time the operation was called. Known values are:
     \"Accepted\", \"Creating\", \"Deleting\", \"Moving\", \"Failed\", \"Succeeded\", \"Disabled\",
     and \"Canceled\"."""
    model: Optional["_models.DeploymentModel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties of Cognitive Services account deployment model."""
    scale_settings: Optional["_models.DeploymentScaleSettings"] = rest_field(
        name="scaleSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services account deployment model. (Deprecated, please use
     Deployment.sku instead.)."""
    capabilities: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """The capabilities."""
    rai_policy_name: Optional[str] = rest_field(
        name="raiPolicyName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of RAI policy."""
    call_rate_limit: Optional["_models.CallRateLimit"] = rest_field(name="callRateLimit", visibility=["read"])
    """The call rate limit Cognitive Services account."""
    rate_limits: Optional[list["_models.ThrottlingRule"]] = rest_field(name="rateLimits", visibility=["read"])
    version_upgrade_option: Optional[Union[str, "_models.DeploymentModelVersionUpgradeOption"]] = rest_field(
        name="versionUpgradeOption", visibility=["read", "create", "update", "delete", "query"]
    )
    """Deployment model version upgrade option. Known values are: \"OnceNewDefaultVersionAvailable\",
     \"OnceCurrentVersionExpired\", and \"NoAutoUpgrade\"."""
    dynamic_throttling_enabled: Optional[bool] = rest_field(name="dynamicThrottlingEnabled", visibility=["read"])
    """If the dynamic throttling is enabled."""
    current_capacity: Optional[int] = rest_field(
        name="currentCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The current capacity."""
    capacity_settings: Optional["_models.DeploymentCapacitySettings"] = rest_field(
        name="capacitySettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Internal use only."""
    parent_deployment_name: Optional[str] = rest_field(
        name="parentDeploymentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of parent deployment."""
    spillover_deployment_name: Optional[str] = rest_field(
        name="spilloverDeploymentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the deployment name that should serve requests when the request would have otherwise
     been throttled due to reaching current deployment throughput limit."""
    service_tier: Optional[Union[str, "_models.ServiceTier"]] = rest_field(
        name="serviceTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service tier for the deployment. Determines the pricing and performance level for request
     processing. Use 'Default' for standard pricing or 'Priority' for higher-priority processing
     with premium pricing. Note: Pause operations are only supported on Standard, DataZoneStandard,
     and GlobalStandard SKUs. Known values are: \"Default\" and \"Priority\"."""
    deployment_state: Optional[Union[str, "_models.DeploymentState"]] = rest_field(
        name="deploymentState", visibility=["read", "create", "update", "delete", "query"]
    )
    """The state of the deployment. Controls whether the deployment is accepting inference requests.
     Use 'Running' for active deployments that process requests, or 'Paused' to temporarily stop
     inference while preserving the deployment configuration. Known values are: \"Running\" and
     \"Paused\"."""
    routing: Optional["_models.DeploymentRouting"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Routing configuration for the deployment. This property is only applicable when the deployed
     model is 'model-router' version 2025-11-18 or later. Allows you to select the models subset for
     routing and the routing mode (balanced, accuracy, cost) for routing across all supported models
     or the model subset."""

    @overload
    def __init__(
        self,
        *,
        model: Optional["_models.DeploymentModel"] = None,
        scale_settings: Optional["_models.DeploymentScaleSettings"] = None,
        rai_policy_name: Optional[str] = None,
        version_upgrade_option: Optional[Union[str, "_models.DeploymentModelVersionUpgradeOption"]] = None,
        current_capacity: Optional[int] = None,
        capacity_settings: Optional["_models.DeploymentCapacitySettings"] = None,
        parent_deployment_name: Optional[str] = None,
        spillover_deployment_name: Optional[str] = None,
        service_tier: Optional[Union[str, "_models.ServiceTier"]] = None,
        deployment_state: Optional[Union[str, "_models.DeploymentState"]] = None,
        routing: Optional["_models.DeploymentRouting"] = None,
    ) -> None: ...

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

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


class DeploymentRouting(_Model):
    """Routing configuration for the deployment. Specifies how requests are routed across multiple
    models.

    :ivar mode: The routing mode that determines how requests are distributed across models. Known
     values are: "cost", "balanced", and "accuracy".
    :vartype mode: str or ~azure.mgmt.cognitiveservices.models.RoutingMode
    :ivar models: Optional. The list of models that the model router can use to route requests
     across. If not specified, the model router will route to all available models specified in the
     model-router version.
    :vartype models: list[~azure.mgmt.cognitiveservices.models.DeploymentModel]
    """

    mode: Optional[Union[str, "_models.RoutingMode"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The routing mode that determines how requests are distributed across models. Known values are:
     \"cost\", \"balanced\", and \"accuracy\"."""
    models: Optional[list["_models.DeploymentModel"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. The list of models that the model router can use to route requests across. If not
     specified, the model router will route to all available models specified in the model-router
     version."""

    @overload
    def __init__(
        self,
        *,
        mode: Optional[Union[str, "_models.RoutingMode"]] = None,
        models: Optional[list["_models.DeploymentModel"]] = None,
    ) -> None: ...

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

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


class DeploymentScaleSettings(_Model):
    """Properties of Cognitive Services account deployment model. (Deprecated, please use
    Deployment.sku instead.).

    :ivar scale_type: Deployment scale type. Known values are: "Standard" and "Manual".
    :vartype scale_type: str or ~azure.mgmt.cognitiveservices.models.DeploymentScaleType
    :ivar capacity: Deployment capacity.
    :vartype capacity: int
    :ivar active_capacity: Deployment active capacity. This value might be different from
     ``capacity`` if customer recently updated ``capacity``.
    :vartype active_capacity: int
    """

    scale_type: Optional[Union[str, "_models.DeploymentScaleType"]] = rest_field(
        name="scaleType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Deployment scale type. Known values are: \"Standard\" and \"Manual\"."""
    capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Deployment capacity."""
    active_capacity: Optional[int] = rest_field(name="activeCapacity", visibility=["read"])
    """Deployment active capacity. This value might be different from ``capacity`` if customer
     recently updated ``capacity``."""

    @overload
    def __init__(
        self,
        *,
        scale_type: Optional[Union[str, "_models.DeploymentScaleType"]] = None,
        capacity: Optional[int] = None,
    ) -> None: ...

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

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


class DomainAvailability(_Model):
    """Domain availability.

    :ivar is_subdomain_available: Indicates the given SKU is available or not.
    :vartype is_subdomain_available: bool
    :ivar reason: Reason why the SKU is not available.
    :vartype reason: str
    :ivar subdomain_name: The subdomain name to use.
    :vartype subdomain_name: str
    :ivar type: The Type of the resource.
    :vartype type: str
    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    """

    is_subdomain_available: Optional[bool] = rest_field(
        name="isSubdomainAvailable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the given SKU is available or not."""
    reason: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Reason why the SKU is not available."""
    subdomain_name: Optional[str] = rest_field(
        name="subdomainName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The subdomain name to use."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Type of the resource."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""

    @overload
    def __init__(
        self,
        *,
        is_subdomain_available: Optional[bool] = None,
        reason: Optional[str] = None,
        subdomain_name: Optional[str] = None,
        type: Optional[str] = None,
        kind: 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 Encryption(_Model):
    """Properties to configure Encryption.

    :ivar key_vault_properties: Properties of KeyVault.
    :vartype key_vault_properties: ~azure.mgmt.cognitiveservices.models.KeyVaultProperties
    :ivar key_source: Enumerates the possible value of keySource for Encryption. Known values are:
     "Microsoft.CognitiveServices" and "Microsoft.KeyVault".
    :vartype key_source: str or ~azure.mgmt.cognitiveservices.models.KeySource
    """

    key_vault_properties: Optional["_models.KeyVaultProperties"] = rest_field(
        name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of KeyVault."""
    key_source: Optional[Union[str, "_models.KeySource"]] = rest_field(
        name="keySource", visibility=["read", "create", "update", "delete", "query"]
    )
    """Enumerates the possible value of keySource for Encryption. Known values are:
     \"Microsoft.CognitiveServices\" and \"Microsoft.KeyVault\"."""

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

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

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


class EncryptionScope(ProxyResource):
    """Cognitive Services EncryptionScope.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services EncryptionScope.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.EncryptionScopeProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.EncryptionScopeProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services EncryptionScope."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class EncryptionScopeProperties(Encryption):
    """Properties to EncryptionScope.

    :ivar key_vault_properties: Properties of KeyVault.
    :vartype key_vault_properties: ~azure.mgmt.cognitiveservices.models.KeyVaultProperties
    :ivar key_source: Enumerates the possible value of keySource for Encryption. Known values are:
     "Microsoft.CognitiveServices" and "Microsoft.KeyVault".
    :vartype key_source: str or ~azure.mgmt.cognitiveservices.models.KeySource
    :ivar provisioning_state: Gets the status of the resource at the time the operation was called.
     Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded", and
     "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.EncryptionScopeProvisioningState
    :ivar state: The encryptionScope state. Known values are: "Disabled" and "Enabled".
    :vartype state: str or ~azure.mgmt.cognitiveservices.models.EncryptionScopeState
    """

    provisioning_state: Optional[Union[str, "_models.EncryptionScopeProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the resource at the time the operation was called. Known values are:
     \"Accepted\", \"Creating\", \"Deleting\", \"Moving\", \"Failed\", \"Succeeded\", and
     \"Canceled\"."""
    state: Optional[Union[str, "_models.EncryptionScopeState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The encryptionScope state. Known values are: \"Disabled\" and \"Enabled\"."""

    @overload
    def __init__(
        self,
        *,
        key_vault_properties: Optional["_models.KeyVaultProperties"] = None,
        key_source: Optional[Union[str, "_models.KeySource"]] = None,
        state: Optional[Union[str, "_models.EncryptionScopeState"]] = None,
    ) -> None: ...

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

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


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

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.cognitiveservices.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 FoundryAutoUpgrade(_Model):
    """Represents the foundry auto-upgrade configuration for a Cognitive Services account. Customers
    can opt out of auto-upgrade by setting mode to Disabled.

    :ivar mode: Gets or sets the auto-upgrade mode. Known values are: "Enabled" and "Disabled".
    :vartype mode: str or ~azure.mgmt.cognitiveservices.models.FoundryAutoUpgradeMode
    :ivar planned_by_microsoft: Gets or sets a value indicating whether the auto-upgrade is planned
     by Microsoft.
    :vartype planned_by_microsoft: bool
    :ivar status_reason: Gets or sets the status reason for the auto-upgrade configuration.
    :vartype status_reason: str
    :ivar scheduled_at: Gets or sets the scheduled time for the auto-upgrade.
    :vartype scheduled_at: ~datetime.datetime
    """

    mode: Optional[Union[str, "_models.FoundryAutoUpgradeMode"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the auto-upgrade mode. Known values are: \"Enabled\" and \"Disabled\"."""
    planned_by_microsoft: Optional[bool] = rest_field(
        name="plannedByMicrosoft", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets a value indicating whether the auto-upgrade is planned by Microsoft."""
    status_reason: Optional[str] = rest_field(
        name="statusReason", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the status reason for the auto-upgrade configuration."""
    scheduled_at: Optional[datetime.datetime] = rest_field(
        name="scheduledAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Gets or sets the scheduled time for the auto-upgrade."""

    @overload
    def __init__(
        self,
        *,
        mode: Optional[Union[str, "_models.FoundryAutoUpgradeMode"]] = None,
        planned_by_microsoft: Optional[bool] = None,
        status_reason: Optional[str] = None,
        scheduled_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 OutboundRule(_Model):
    """Outbound Rule for the managed network of a cognitive services account.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FqdnOutboundRule, PrivateEndpointOutboundRule, ServiceTagOutboundRule

    :ivar category: Category of a managed network Outbound Rule of a cognitive services account.
     Known values are: "Required", "Recommended", "UserDefined", and "Dependency".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.RuleCategory
    :ivar status: Type of a managed network Outbound Rule of a cognitive services account. Known
     values are: "Inactive", "Active", "Provisioning", "Deleting", and "Failed".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.RuleStatus
    :ivar type: Type of a managed network Outbound Rule of a cognitive services account. Required.
     Known values are: "FQDN", "PrivateEndpoint", and "ServiceTag".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.RuleType
    :ivar error_information: Error information about an outbound rule of a cognitive services
     account if RuleStatus is failed.
    :vartype error_information: str
    :ivar parent_rule_names:
    :vartype parent_rule_names: list[str]
    """

    __mapping__: dict[str, _Model] = {}
    category: Optional[Union[str, "_models.RuleCategory"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Category of a managed network Outbound Rule of a cognitive services account. Known values are:
     \"Required\", \"Recommended\", \"UserDefined\", and \"Dependency\"."""
    status: Optional[Union[str, "_models.RuleStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of a managed network Outbound Rule of a cognitive services account. Known values are:
     \"Inactive\", \"Active\", \"Provisioning\", \"Deleting\", and \"Failed\"."""
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Type of a managed network Outbound Rule of a cognitive services account. Required. Known values
     are: \"FQDN\", \"PrivateEndpoint\", and \"ServiceTag\"."""
    error_information: Optional[str] = rest_field(name="errorInformation", visibility=["read"])
    """Error information about an outbound rule of a cognitive services account if RuleStatus is
     failed."""
    parent_rule_names: Optional[list[str]] = rest_field(name="parentRuleNames", visibility=["read"])

    @overload
    def __init__(
        self,
        *,
        type: str,
        category: Optional[Union[str, "_models.RuleCategory"]] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
    ) -> None: ...

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

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


class FqdnOutboundRule(OutboundRule, discriminator="FQDN"):
    """FQDN Outbound Rule for the managed network of a cognitive services account.

    :ivar category: Category of a managed network Outbound Rule of a cognitive services account.
     Known values are: "Required", "Recommended", "UserDefined", and "Dependency".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.RuleCategory
    :ivar status: Type of a managed network Outbound Rule of a cognitive services account. Known
     values are: "Inactive", "Active", "Provisioning", "Deleting", and "Failed".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.RuleStatus
    :ivar error_information: Error information about an outbound rule of a cognitive services
     account if RuleStatus is failed.
    :vartype error_information: str
    :ivar parent_rule_names:
    :vartype parent_rule_names: list[str]
    :ivar destination:
    :vartype destination: str
    :ivar type: Type of a managed network Outbound Rule of a cognitive services account. Required.
     FQDN.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.FQDN
    """

    destination: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    type: Literal[RuleType.FQDN] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of a managed network Outbound Rule of a cognitive services account. Required. FQDN."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.RuleCategory"]] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
        destination: Optional[str] = None,
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = RuleType.FQDN  # type: ignore


class HostedAgentDeployment(AgentDeploymentProperties, discriminator="Hosted"):
    """Represents a hosted agent deployment where the underlying infrastructure is owned by the
    platform.

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    :ivar display_name: Gets or sets the display name of the deployment.
    :vartype display_name: str
    :ivar deployment_id: Gets or sets the unique identifier of the deployment.
    :vartype deployment_id: str
    :ivar state: Gets or sets the current operational state of the deployment (and, intrinsically,
     of the comprising agents). Known values are: "Starting", "Running", "Stopping", "Stopped",
     "Failed", "Deleting", "Deleted", and "Updating".
    :vartype state: str or ~azure.mgmt.cognitiveservices.models.AgentDeploymentState
    :ivar protocols: Gets or sets the supported protocol types and versions exposed by this
     deployment.
    :vartype protocols: list[~azure.mgmt.cognitiveservices.models.AgentProtocolVersion]
    :ivar agents: Returns a flat list of agent:version deployed in this deployment.
    :vartype agents: list[~azure.mgmt.cognitiveservices.models.VersionedAgentReference]
    :ivar provisioning_state: Gets or sets the provisioning state of the agent deployment. Known
     values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.AgentDeploymentProvisioningState
    :ivar min_replicas: Gets or sets the minimum number of replicas for this hosted deployment.
    :vartype min_replicas: int
    :ivar max_replicas: Gets or sets the maximum number of replicas for this hosted deployment.
    :vartype max_replicas: int
    :ivar deployment_type: Gets or sets the type of deployment for the agent. Required. The
     underlying infra is owned by the platform.
    :vartype deployment_type: str or ~azure.mgmt.cognitiveservices.models.HOSTED
    """

    min_replicas: Optional[int] = rest_field(
        name="minReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the minimum number of replicas for this hosted deployment."""
    max_replicas: Optional[int] = rest_field(
        name="maxReplicas", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the maximum number of replicas for this hosted deployment."""
    deployment_type: Literal[AgentDeploymentType.HOSTED] = rest_discriminator(name="deploymentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Gets or sets the type of deployment for the agent. Required. The underlying infra is owned by
     the platform."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        tags: Optional[dict[str, str]] = None,
        display_name: Optional[str] = None,
        deployment_id: Optional[str] = None,
        state: Optional[Union[str, "_models.AgentDeploymentState"]] = None,
        protocols: Optional[list["_models.AgentProtocolVersion"]] = None,
        agents: Optional[list["_models.VersionedAgentReference"]] = None,
        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)
        self.deployment_type = AgentDeploymentType.HOSTED  # type: ignore


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

    :ivar type: The identity type. Known values are: "None", "SystemAssigned", "UserAssigned", and
     "SystemAssigned, UserAssigned".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.ResourceIdentityType
    :ivar tenant_id: The tenant ID of resource.
    :vartype tenant_id: str
    :ivar principal_id: The principal ID of resource identity.
    :vartype principal_id: str
    :ivar user_assigned_identities: The list of user assigned identities associated with the
     resource. The user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
    :vartype user_assigned_identities: dict[str,
     ~azure.mgmt.cognitiveservices.models.UserAssignedIdentity]
    """

    type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity type. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\", and
     \"SystemAssigned, UserAssigned\"."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of resource."""
    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal ID of resource identity."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user assigned identities associated with the resource. The user identity dictionary
     key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.ResourceIdentityType"]] = None,
        user_assigned_identities: Optional[dict[str, "_models.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 IpRule(_Model):
    """A rule governing the accessibility from a specific ip address or ip range.

    :ivar value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address)
     or '124.56.78.0/24' (all addresses that start with 124.56.78). Required.
    :vartype value: str
    """

    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or
     '124.56.78.0/24' (all addresses that start with 124.56.78). Required."""

    @overload
    def __init__(
        self,
        *,
        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 KeyVaultProperties(_Model):
    """Properties to configure keyVault Properties.

    :ivar key_name: Name of the Key from KeyVault.
    :vartype key_name: str
    :ivar key_version: Version of the Key from KeyVault.
    :vartype key_version: str
    :ivar key_vault_uri: Uri of KeyVault.
    :vartype key_vault_uri: str
    :ivar identity_client_id:
    :vartype identity_client_id: str
    """

    key_name: Optional[str] = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
    """Name of the Key from KeyVault."""
    key_version: Optional[str] = rest_field(
        name="keyVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Version of the Key from KeyVault."""
    key_vault_uri: Optional[str] = rest_field(
        name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Uri of KeyVault."""
    identity_client_id: Optional[str] = rest_field(
        name="identityClientId", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        key_name: Optional[str] = None,
        key_version: Optional[str] = None,
        key_vault_uri: Optional[str] = None,
        identity_client_id: Optional[str] = None,
    ) -> None: ...

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

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


class ManagedAgentDeployment(AgentDeploymentProperties, discriminator="Managed"):
    """Represents a managed agent deployment where the underlying infrastructure is managed by the
    platform in the deployer's subscription.

    :ivar description: The asset description text.
    :vartype description: str
    :ivar tags: Tag dictionary. Tags can be added, removed, and updated.
    :vartype tags: dict[str, str]
    :ivar display_name: Gets or sets the display name of the deployment.
    :vartype display_name: str
    :ivar deployment_id: Gets or sets the unique identifier of the deployment.
    :vartype deployment_id: str
    :ivar state: Gets or sets the current operational state of the deployment (and, intrinsically,
     of the comprising agents). Known values are: "Starting", "Running", "Stopping", "Stopped",
     "Failed", "Deleting", "Deleted", and "Updating".
    :vartype state: str or ~azure.mgmt.cognitiveservices.models.AgentDeploymentState
    :ivar protocols: Gets or sets the supported protocol types and versions exposed by this
     deployment.
    :vartype protocols: list[~azure.mgmt.cognitiveservices.models.AgentProtocolVersion]
    :ivar agents: Returns a flat list of agent:version deployed in this deployment.
    :vartype agents: list[~azure.mgmt.cognitiveservices.models.VersionedAgentReference]
    :ivar provisioning_state: Gets or sets the provisioning state of the agent deployment. Known
     values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.AgentDeploymentProvisioningState
    :ivar deployment_type: Gets or sets the type of deployment for the agent. Required. The
     underlying infra is managed by the platform in the deployer's subscription.
    :vartype deployment_type: str or ~azure.mgmt.cognitiveservices.models.MANAGED
    """

    deployment_type: Literal[AgentDeploymentType.MANAGED] = rest_discriminator(name="deploymentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Gets or sets the type of deployment for the agent. Required. The underlying infra is managed by
     the platform in the deployer's subscription."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        tags: Optional[dict[str, str]] = None,
        display_name: Optional[str] = None,
        deployment_id: Optional[str] = None,
        state: Optional[Union[str, "_models.AgentDeploymentState"]] = None,
        protocols: Optional[list["_models.AgentProtocolVersion"]] = None,
        agents: Optional[list["_models.VersionedAgentReference"]] = None,
    ) -> None: ...

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


class ManagedIdentityAuthTypeConnectionProperties(
    ConnectionPropertiesV2, discriminator="ManagedIdentity"
):  # pylint: disable=name-too-long
    """ManagedIdentityAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionManagedIdentity
    :ivar auth_type: Authentication type of the connection target. Required. MANAGED_IDENTITY.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.MANAGED_IDENTITY
    """

    credentials: Optional["_models.ConnectionManagedIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.MANAGED_IDENTITY] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. MANAGED_IDENTITY."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionManagedIdentity"] = None,
    ) -> None: ...

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


class ManagedNetworkProvisionOptions(_Model):
    """Managed Network Provisioning options for managed network of a cognitive services account."""


class ManagedNetworkProvisionStatus(_Model):
    """Status of the Provisioning for the managed network of a cognitive services account.

    :ivar status: Status for the managed network of a cognitive services account. Known values are:
     "Inactive" and "Active".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.ManagedNetworkStatus
    """

    status: Optional[Union[str, "_models.ManagedNetworkStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status for the managed network of a cognitive services account. Known values are: \"Inactive\"
     and \"Active\"."""

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

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

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


class ManagedNetworkSettings(_Model):
    """Managed Network settings for a cognitive services account.

    :ivar isolation_mode: Isolation mode for the managed network of a cognitive services account.
     Known values are: "Disabled", "AllowInternetOutbound", and "AllowOnlyApprovedOutbound".
    :vartype isolation_mode: str or ~azure.mgmt.cognitiveservices.models.IsolationMode
    :ivar network_id:
    :vartype network_id: str
    :ivar outbound_rules: Dictionary of <OutboundRule>.
    :vartype outbound_rules: dict[str, ~azure.mgmt.cognitiveservices.models.OutboundRule]
    :ivar status: Status of the Provisioning for the managed network of a cognitive services
     account.
    :vartype status: ~azure.mgmt.cognitiveservices.models.ManagedNetworkProvisionStatus
    :ivar firewall_sku: Firewall Sku used for FQDN Rules. Known values are: "Standard" and "Basic".
    :vartype firewall_sku: str or ~azure.mgmt.cognitiveservices.models.FirewallSku
    :ivar managed_network_kind: The Kind of the managed network. Users can switch from V1 to V2 for
     granular access controls, but cannot switch back to V1 once V2 is enabled. Known values are:
     "V1" and "V2".
    :vartype managed_network_kind: str or ~azure.mgmt.cognitiveservices.models.ManagedNetworkKind
    :ivar firewall_public_ip_address: Public IP address assigned to the Azure Firewall.
    :vartype firewall_public_ip_address: str
    :ivar provisioning_state: The provisioning state of the managed network settings. Known values
     are: "Deferred", "Updating", "Succeeded", "Failed", "Deleting", and "Deleted".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.ManagedNetworkProvisioningState
    """

    isolation_mode: Optional[Union[str, "_models.IsolationMode"]] = rest_field(
        name="isolationMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Isolation mode for the managed network of a cognitive services account. Known values are:
     \"Disabled\", \"AllowInternetOutbound\", and \"AllowOnlyApprovedOutbound\"."""
    network_id: Optional[str] = rest_field(name="networkId", visibility=["read"])
    outbound_rules: Optional[dict[str, "_models.OutboundRule"]] = rest_field(
        name="outboundRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dictionary of <OutboundRule>."""
    status: Optional["_models.ManagedNetworkProvisionStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status of the Provisioning for the managed network of a cognitive services account."""
    firewall_sku: Optional[Union[str, "_models.FirewallSku"]] = rest_field(
        name="firewallSku", visibility=["read", "create", "update", "delete", "query"]
    )
    """Firewall Sku used for FQDN Rules. Known values are: \"Standard\" and \"Basic\"."""
    managed_network_kind: Optional[Union[str, "_models.ManagedNetworkKind"]] = rest_field(
        name="managedNetworkKind", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Kind of the managed network. Users can switch from V1 to V2 for granular access controls,
     but cannot switch back to V1 once V2 is enabled. Known values are: \"V1\" and \"V2\"."""
    firewall_public_ip_address: Optional[str] = rest_field(name="firewallPublicIpAddress", visibility=["read"])
    """Public IP address assigned to the Azure Firewall."""
    provisioning_state: Optional[Union[str, "_models.ManagedNetworkProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the managed network settings. Known values are: \"Deferred\",
     \"Updating\", \"Succeeded\", \"Failed\", \"Deleting\", and \"Deleted\"."""

    @overload
    def __init__(
        self,
        *,
        isolation_mode: Optional[Union[str, "_models.IsolationMode"]] = None,
        outbound_rules: Optional[dict[str, "_models.OutboundRule"]] = None,
        status: Optional["_models.ManagedNetworkProvisionStatus"] = None,
        firewall_sku: Optional[Union[str, "_models.FirewallSku"]] = None,
        managed_network_kind: Optional[Union[str, "_models.ManagedNetworkKind"]] = None,
    ) -> None: ...

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

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


class ManagedNetworkSettingsBasicResource(Resource):
    """ManagedNetworkSettingsBasicResource.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Managed Network settings for a cognitive services account.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ManagedNetworkSettings
    """

    properties: Optional["_models.ManagedNetworkSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed Network settings for a cognitive services account."""

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

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

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


class ManagedNetworkSettingsEx(ManagedNetworkSettings):
    """ManagedNetworkSettingsEx.

    :ivar isolation_mode: Isolation mode for the managed network of a cognitive services account.
     Known values are: "Disabled", "AllowInternetOutbound", and "AllowOnlyApprovedOutbound".
    :vartype isolation_mode: str or ~azure.mgmt.cognitiveservices.models.IsolationMode
    :ivar network_id:
    :vartype network_id: str
    :ivar outbound_rules: Dictionary of <OutboundRule>.
    :vartype outbound_rules: dict[str, ~azure.mgmt.cognitiveservices.models.OutboundRule]
    :ivar status: Status of the Provisioning for the managed network of a cognitive services
     account.
    :vartype status: ~azure.mgmt.cognitiveservices.models.ManagedNetworkProvisionStatus
    :ivar firewall_sku: Firewall Sku used for FQDN Rules. Known values are: "Standard" and "Basic".
    :vartype firewall_sku: str or ~azure.mgmt.cognitiveservices.models.FirewallSku
    :ivar managed_network_kind: The Kind of the managed network. Users can switch from V1 to V2 for
     granular access controls, but cannot switch back to V1 once V2 is enabled. Known values are:
     "V1" and "V2".
    :vartype managed_network_kind: str or ~azure.mgmt.cognitiveservices.models.ManagedNetworkKind
    :ivar firewall_public_ip_address: Public IP address assigned to the Azure Firewall.
    :vartype firewall_public_ip_address: str
    :ivar provisioning_state: The provisioning state of the managed network settings. Known values
     are: "Deferred", "Updating", "Succeeded", "Failed", "Deleting", and "Deleted".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.ManagedNetworkProvisioningState
    :ivar changeable_isolation_modes:
    :vartype changeable_isolation_modes: list[str or
     ~azure.mgmt.cognitiveservices.models.IsolationMode]
    """

    changeable_isolation_modes: Optional[list[Union[str, "_models.IsolationMode"]]] = rest_field(
        name="changeableIsolationModes", visibility=["read"]
    )

    @overload
    def __init__(
        self,
        *,
        isolation_mode: Optional[Union[str, "_models.IsolationMode"]] = None,
        outbound_rules: Optional[dict[str, "_models.OutboundRule"]] = None,
        status: Optional["_models.ManagedNetworkProvisionStatus"] = None,
        firewall_sku: Optional[Union[str, "_models.FirewallSku"]] = None,
        managed_network_kind: Optional[Union[str, "_models.ManagedNetworkKind"]] = None,
    ) -> None: ...

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

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


class ManagedNetworkSettingsProperties(_Model):
    """The properties of the managed network settings of a cognitive services account.

    :ivar managed_network: Managed Network settings for a cognitive services account.
    :vartype managed_network: ~azure.mgmt.cognitiveservices.models.ManagedNetworkSettingsEx
    :ivar provisioning_state: The current deployment state of the managed network resource. The
     provisioningState is to indicate states for resource provisioning. Known values are:
     "Deferred", "Updating", "Succeeded", "Failed", "Deleting", and "Deleted".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.ManagedNetworkProvisioningState
    """

    managed_network: Optional["_models.ManagedNetworkSettingsEx"] = rest_field(
        name="managedNetwork", visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed Network settings for a cognitive services account."""
    provisioning_state: Optional[Union[str, "_models.ManagedNetworkProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The current deployment state of the managed network resource. The provisioningState is to
     indicate states for resource provisioning. Known values are: \"Deferred\", \"Updating\",
     \"Succeeded\", \"Failed\", \"Deleting\", and \"Deleted\"."""

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

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

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


class ManagedNetworkSettingsPropertiesBasicResource(ProxyResource):  # pylint: disable=name-too-long
    """Concrete proxy resource types can be created by aliasing this type using a specific property
    type.

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

    properties: Optional["_models.ManagedNetworkSettingsProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of the managed network settings of a cognitive services account."""

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

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

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


class MetricName(_Model):
    """A metric name.

    :ivar value: The name of the metric.
    :vartype value: str
    :ivar localized_value: The friendly name of the metric.
    :vartype localized_value: str
    """

    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the metric."""
    localized_value: Optional[str] = rest_field(
        name="localizedValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The friendly name of the metric."""

    @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 Model(_Model):
    """Cognitive Services Model.

    :ivar model: Cognitive Services account Model.
    :vartype model: ~azure.mgmt.cognitiveservices.models.AccountModel
    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    :ivar sku_name: The name of SKU.
    :vartype sku_name: str
    :ivar description: The description of the model.
    :vartype description: str
    """

    model: Optional["_models.AccountModel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Cognitive Services account Model."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    """The name of SKU."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the model."""

    @overload
    def __init__(
        self,
        *,
        model: Optional["_models.AccountModel"] = None,
        kind: Optional[str] = None,
        sku_name: 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 ModelCapacityCalculatorWorkload(_Model):
    """Model Capacity Calculator Workload.

    :ivar request_per_minute: Request per minute.
    :vartype request_per_minute: int
    :ivar request_parameters: Dictionary, Model Capacity Calculator Workload Parameters.
    :vartype request_parameters:
     ~azure.mgmt.cognitiveservices.models.ModelCapacityCalculatorWorkloadRequestParam
    """

    request_per_minute: Optional[int] = rest_field(
        name="requestPerMinute", visibility=["read", "create", "update", "delete", "query"]
    )
    """Request per minute."""
    request_parameters: Optional["_models.ModelCapacityCalculatorWorkloadRequestParam"] = rest_field(
        name="requestParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dictionary, Model Capacity Calculator Workload Parameters."""

    @overload
    def __init__(
        self,
        *,
        request_per_minute: Optional[int] = None,
        request_parameters: Optional["_models.ModelCapacityCalculatorWorkloadRequestParam"] = None,
    ) -> None: ...

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

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


class ModelCapacityCalculatorWorkloadRequestParam(_Model):  # pylint: disable=name-too-long
    """Dictionary, Model Capacity Calculator Workload Parameters.

    :ivar avg_prompt_tokens: Average prompt tokens.
    :vartype avg_prompt_tokens: int
    :ivar avg_generated_tokens: Average generated tokens.
    :vartype avg_generated_tokens: int
    """

    avg_prompt_tokens: Optional[int] = rest_field(
        name="avgPromptTokens", visibility=["read", "create", "update", "delete", "query"]
    )
    """Average prompt tokens."""
    avg_generated_tokens: Optional[int] = rest_field(
        name="avgGeneratedTokens", visibility=["read", "create", "update", "delete", "query"]
    )
    """Average generated tokens."""

    @overload
    def __init__(
        self,
        *,
        avg_prompt_tokens: Optional[int] = None,
        avg_generated_tokens: 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 ModelCapacityListResultValueItem(ProxyResource):
    """ModelCapacityListResultValueItem.

    :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.cognitiveservices.models.SystemData
    :ivar location: The location of the Model Sku Capacity.
    :vartype location: str
    :ivar properties: Cognitive Services account ModelSkuCapacity.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ModelSkuCapacityProperties
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location of the Model Sku Capacity."""
    properties: Optional["_models.ModelSkuCapacityProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Cognitive Services account ModelSkuCapacity."""

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

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

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


class ModelDeprecationInfo(_Model):
    """Cognitive Services account ModelDeprecationInfo.

    :ivar fine_tune: The datetime of deprecation of the fineTune Model.
    :vartype fine_tune: str
    :ivar inference: The datetime of deprecation of the inference Model.
    :vartype inference: str
    :ivar deprecation_status: Indicates whether the deprecation date is a confirmed planned
     end-of-life date or an estimated deprecation date. When 'Planned', the deprecation date
     represents a confirmed and communicated model end-of-life date. When 'Tentative', the
     deprecation date is an estimated timeline that may be subject to change. Known values are:
     "Planned" and "Tentative".
    :vartype deprecation_status: str or ~azure.mgmt.cognitiveservices.models.DeprecationStatus
    """

    fine_tune: Optional[str] = rest_field(name="fineTune", visibility=["read", "create", "update", "delete", "query"])
    """The datetime of deprecation of the fineTune Model."""
    inference: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The datetime of deprecation of the inference Model."""
    deprecation_status: Optional[Union[str, "_models.DeprecationStatus"]] = rest_field(
        name="deprecationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the deprecation date is a confirmed planned end-of-life date or an estimated
     deprecation date. When 'Planned', the deprecation date represents a confirmed and communicated
     model end-of-life date. When 'Tentative', the deprecation date is an estimated timeline that
     may be subject to change. Known values are: \"Planned\" and \"Tentative\"."""

    @overload
    def __init__(
        self,
        *,
        fine_tune: Optional[str] = None,
        inference: Optional[str] = None,
        deprecation_status: Optional[Union[str, "_models.DeprecationStatus"]] = None,
    ) -> None: ...

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

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


class ModelSku(_Model):
    """Describes an available Cognitive Services Model SKU.

    :ivar name: The name of the model SKU.
    :vartype name: str
    :ivar usage_name: The usage name of the model SKU.
    :vartype usage_name: str
    :ivar deprecation_date: The datetime of deprecation of the model SKU.
    :vartype deprecation_date: ~datetime.datetime
    :ivar capacity: The capacity configuration.
    :vartype capacity: ~azure.mgmt.cognitiveservices.models.CapacityConfig
    :ivar rate_limits: The list of rateLimit.
    :vartype rate_limits: list[~azure.mgmt.cognitiveservices.models.CallRateLimit]
    :ivar cost: The list of billing meter info.
    :vartype cost: list[~azure.mgmt.cognitiveservices.models.BillingMeterInfo]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the model SKU."""
    usage_name: Optional[str] = rest_field(name="usageName", visibility=["read", "create", "update", "delete", "query"])
    """The usage name of the model SKU."""
    deprecation_date: Optional[datetime.datetime] = rest_field(
        name="deprecationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The datetime of deprecation of the model SKU."""
    capacity: Optional["_models.CapacityConfig"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The capacity configuration."""
    rate_limits: Optional[list["_models.CallRateLimit"]] = rest_field(
        name="rateLimits", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of rateLimit."""
    cost: Optional[list["_models.BillingMeterInfo"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of billing meter info."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        usage_name: Optional[str] = None,
        deprecation_date: Optional[datetime.datetime] = None,
        capacity: Optional["_models.CapacityConfig"] = None,
        rate_limits: Optional[list["_models.CallRateLimit"]] = None,
        cost: Optional[list["_models.BillingMeterInfo"]] = None,
    ) -> None: ...

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

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


class ModelSkuCapacityProperties(_Model):
    """Cognitive Services account ModelSkuCapacity.

    :ivar model: Properties of Cognitive Services account deployment model.
    :vartype model: ~azure.mgmt.cognitiveservices.models.DeploymentModel
    :ivar sku_name:
    :vartype sku_name: str
    :ivar available_capacity: The available capacity for deployment with this model and sku.
    :vartype available_capacity: float
    :ivar available_finetune_capacity: The available capacity for deployment with a fine-tune
     version of this model and sku.
    :vartype available_finetune_capacity: float
    :ivar scope_id: The scope identifier for model SKU capacity.
    :vartype scope_id: str
    :ivar scope_type: The scope type for model SKU capacity. Known values are: "Regional",
     "Global", "DataZone", and "Classic".
    :vartype scope_type: str or ~azure.mgmt.cognitiveservices.models.QuotaScopeType
    """

    model: Optional["_models.DeploymentModel"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties of Cognitive Services account deployment model."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    available_capacity: Optional[float] = rest_field(
        name="availableCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The available capacity for deployment with this model and sku."""
    available_finetune_capacity: Optional[float] = rest_field(
        name="availableFinetuneCapacity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The available capacity for deployment with a fine-tune version of this model and sku."""
    scope_id: Optional[str] = rest_field(name="scopeId", visibility=["read", "create", "update", "delete", "query"])
    """The scope identifier for model SKU capacity."""
    scope_type: Optional[Union[str, "_models.QuotaScopeType"]] = rest_field(
        name="scopeType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scope type for model SKU capacity. Known values are: \"Regional\", \"Global\",
     \"DataZone\", and \"Classic\"."""

    @overload
    def __init__(
        self,
        *,
        model: Optional["_models.DeploymentModel"] = None,
        sku_name: Optional[str] = None,
        available_capacity: Optional[float] = None,
        available_finetune_capacity: Optional[float] = None,
        scope_id: Optional[str] = None,
        scope_type: Optional[Union[str, "_models.QuotaScopeType"]] = None,
    ) -> None: ...

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

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


class MultiRegionSettings(_Model):
    """The multiregion settings Cognitive Services account.

    :ivar routing_method: Multiregion routing methods. Known values are: "Priority", "Weighted",
     and "Performance".
    :vartype routing_method: str or ~azure.mgmt.cognitiveservices.models.RoutingMethods
    :ivar regions:
    :vartype regions: list[~azure.mgmt.cognitiveservices.models.RegionSetting]
    """

    routing_method: Optional[Union[str, "_models.RoutingMethods"]] = rest_field(
        name="routingMethod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Multiregion routing methods. Known values are: \"Priority\", \"Weighted\", and \"Performance\"."""
    regions: Optional[list["_models.RegionSetting"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        routing_method: Optional[Union[str, "_models.RoutingMethods"]] = None,
        regions: Optional[list["_models.RegionSetting"]] = None,
    ) -> None: ...

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

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


class NetworkInjection(_Model):
    """Specifies in AI Foundry where virtual network injection occurs to secure scenarios like Agents
    entirely within the user's private network, eliminating public internet exposure while
    maintaining control over network configurations and resources.

    :ivar scenario: Specifies what features in AI Foundry network injection applies to. Currently
     only supports 'agent' for agent scenarios. 'none' means no network injection. Known values are:
     "none" and "agent".
    :vartype scenario: str or ~azure.mgmt.cognitiveservices.models.ScenarioType
    :ivar subnet_arm_id: Specify the subnet for which your Agent Client is injected into.
    :vartype subnet_arm_id: str
    :ivar use_microsoft_managed_network: Boolean to enable Microsoft Managed Network for subnet
     delegation.
    :vartype use_microsoft_managed_network: bool
    """

    scenario: Optional[Union[str, "_models.ScenarioType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies what features in AI Foundry network injection applies to. Currently only supports
     'agent' for agent scenarios. 'none' means no network injection. Known values are: \"none\" and
     \"agent\"."""
    subnet_arm_id: Optional[str] = rest_field(
        name="subnetArmId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specify the subnet for which your Agent Client is injected into."""
    use_microsoft_managed_network: Optional[bool] = rest_field(
        name="useMicrosoftManagedNetwork", visibility=["read", "create", "update", "delete", "query"]
    )
    """Boolean to enable Microsoft Managed Network for subnet delegation."""

    @overload
    def __init__(
        self,
        *,
        scenario: Optional[Union[str, "_models.ScenarioType"]] = None,
        subnet_arm_id: Optional[str] = None,
        use_microsoft_managed_network: Optional[bool] = None,
    ) -> None: ...

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

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


class NetworkRuleSet(_Model):
    """A set of rules governing the network accessibility.

    :ivar default_action: The default action when no rule from ipRules and from virtualNetworkRules
     match. This is only used after the bypass property has been evaluated. Known values are:
     "Allow" and "Deny".
    :vartype default_action: str or ~azure.mgmt.cognitiveservices.models.NetworkRuleAction
    :ivar bypass: Setting for trusted services. Known values are: "None" and "AzureServices".
    :vartype bypass: str or ~azure.mgmt.cognitiveservices.models.ByPassSelection
    :ivar ip_rules: The list of IP address rules.
    :vartype ip_rules: list[~azure.mgmt.cognitiveservices.models.IpRule]
    :ivar virtual_network_rules: The list of virtual network rules.
    :vartype virtual_network_rules: list[~azure.mgmt.cognitiveservices.models.VirtualNetworkRule]
    """

    default_action: Optional[Union[str, "_models.NetworkRuleAction"]] = rest_field(
        name="defaultAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """The default action when no rule from ipRules and from virtualNetworkRules match. This is only
     used after the bypass property has been evaluated. Known values are: \"Allow\" and \"Deny\"."""
    bypass: Optional[Union[str, "_models.ByPassSelection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Setting for trusted services. Known values are: \"None\" and \"AzureServices\"."""
    ip_rules: Optional[list["_models.IpRule"]] = rest_field(
        name="ipRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of IP address rules."""
    virtual_network_rules: Optional[list["_models.VirtualNetworkRule"]] = rest_field(
        name="virtualNetworkRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of virtual network rules."""

    @overload
    def __init__(
        self,
        *,
        default_action: Optional[Union[str, "_models.NetworkRuleAction"]] = None,
        bypass: Optional[Union[str, "_models.ByPassSelection"]] = None,
        ip_rules: Optional[list["_models.IpRule"]] = None,
        virtual_network_rules: Optional[list["_models.VirtualNetworkRule"]] = None,
    ) -> None: ...

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

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


class NetworkSecurityPerimeter(_Model):
    """Information about a linked Network Security Perimeter.

    :ivar id: Fully qualified identifier of the resource.
    :vartype id: str
    :ivar perimeter_guid: Guid of the resource.
    :vartype perimeter_guid: str
    :ivar location: Location of the resource.
    :vartype location: str
    """

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

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

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

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


class NetworkSecurityPerimeterAccessRule(_Model):
    """Network Security Perimeter Access Rule.

    :ivar name: Network Security Perimeter Access Rule Name.
    :vartype name: str
    :ivar properties: Properties of Network Security Perimeter Access Rule.
    :vartype properties:
     ~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterAccessRuleProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Network Security Perimeter Access Rule Name."""
    properties: Optional["_models.NetworkSecurityPerimeterAccessRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Network Security Perimeter Access Rule."""

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

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

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


class NetworkSecurityPerimeterAccessRuleProperties(_Model):  # pylint: disable=name-too-long
    """The Properties of Network Security Perimeter Rule.

    :ivar direction: Direction of Access Rule. Known values are: "Inbound" and "Outbound".
    :vartype direction: str or ~azure.mgmt.cognitiveservices.models.NspAccessRuleDirection
    :ivar address_prefixes: Address prefixes for inbound rules.
    :vartype address_prefixes: list[str]
    :ivar subscriptions: Subscriptions for inbound rules.
    :vartype subscriptions:
     list[~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem]
    :ivar network_security_perimeters: NetworkSecurityPerimeters for inbound rules.
    :vartype network_security_perimeters:
     list[~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeter]
    :ivar fully_qualified_domain_names: Fully qualified domain name for outbound rules.
    :vartype fully_qualified_domain_names: list[str]
    """

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

    @overload
    def __init__(
        self,
        *,
        direction: Optional[Union[str, "_models.NspAccessRuleDirection"]] = None,
        address_prefixes: Optional[list[str]] = None,
        subscriptions: Optional[list["_models.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem"]] = None,
        network_security_perimeters: Optional[list["_models.NetworkSecurityPerimeter"]] = None,
        fully_qualified_domain_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 NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem(_Model):  # pylint: disable=name-too-long
    """Subscription for inbound rule.

    :ivar id: Fully qualified identifier of subscription.
    :vartype id: str
    """

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

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

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

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


class NetworkSecurityPerimeterConfiguration(ProxyResource):
    """NSP Configuration for an Cognitive Services account.

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

    properties: Optional["_models.NetworkSecurityPerimeterConfigurationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """NSP Configuration properties."""

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

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

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


class NetworkSecurityPerimeterConfigurationAssociationInfo(_Model):  # pylint: disable=name-too-long
    """Network Security Perimeter Configuration Association Information.

    :ivar name: Name of the resource association.
    :vartype name: str
    :ivar access_mode: Access Mode of the resource association.
    :vartype access_mode: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource association."""
    access_mode: Optional[str] = rest_field(
        name="accessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access Mode of the resource association."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        access_mode: 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 NetworkSecurityPerimeterConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """The properties of an NSP Configuration.

    :ivar provisioning_state: Provisioning state of NetworkSecurityPerimeter configuration.
    :vartype provisioning_state: str
    :ivar provisioning_issues: List of Provisioning Issues.
    :vartype provisioning_issues: list[~azure.mgmt.cognitiveservices.models.ProvisioningIssue]
    :ivar network_security_perimeter: Information about a linked Network Security Perimeter.
    :vartype network_security_perimeter:
     ~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeter
    :ivar resource_association: Network Security Perimeter Configuration Association Information.
    :vartype resource_association:
     ~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterConfigurationAssociationInfo
    :ivar profile: Network Security Perimeter Profile Information.
    :vartype profile: ~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterProfileInfo
    """

    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Provisioning state of NetworkSecurityPerimeter configuration."""
    provisioning_issues: Optional[list["_models.ProvisioningIssue"]] = rest_field(
        name="provisioningIssues", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Provisioning Issues."""
    network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = rest_field(
        name="networkSecurityPerimeter", visibility=["read", "create", "update", "delete", "query"]
    )
    """Information about a linked Network Security Perimeter."""
    resource_association: Optional["_models.NetworkSecurityPerimeterConfigurationAssociationInfo"] = rest_field(
        name="resourceAssociation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Network Security Perimeter Configuration Association Information."""
    profile: Optional["_models.NetworkSecurityPerimeterProfileInfo"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Network Security Perimeter Profile Information."""

    @overload
    def __init__(
        self,
        *,
        provisioning_issues: Optional[list["_models.ProvisioningIssue"]] = None,
        network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = None,
        resource_association: Optional["_models.NetworkSecurityPerimeterConfigurationAssociationInfo"] = None,
        profile: Optional["_models.NetworkSecurityPerimeterProfileInfo"] = None,
    ) -> None: ...

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

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


class NetworkSecurityPerimeterProfileInfo(_Model):
    """Network Security Perimeter Profile Information.

    :ivar name: Name of the resource profile.
    :vartype name: str
    :ivar access_rules_version: Access rules version of the resource profile.
    :vartype access_rules_version: int
    :ivar access_rules:
    :vartype access_rules:
     list[~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterAccessRule]
    :ivar diagnostic_settings_version: Current diagnostic settings version.
    :vartype diagnostic_settings_version: int
    :ivar enabled_log_categories: List of enabled log categories.
    :vartype enabled_log_categories: list[str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource profile."""
    access_rules_version: Optional[int] = rest_field(
        name="accessRulesVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access rules version of the resource profile."""
    access_rules: Optional[list["_models.NetworkSecurityPerimeterAccessRule"]] = rest_field(
        name="accessRules", visibility=["read", "create", "update", "delete", "query"]
    )
    diagnostic_settings_version: Optional[int] = rest_field(
        name="diagnosticSettingsVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Current diagnostic settings version."""
    enabled_log_categories: Optional[list[str]] = rest_field(
        name="enabledLogCategories", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of enabled log categories."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        access_rules_version: Optional[int] = None,
        access_rules: Optional[list["_models.NetworkSecurityPerimeterAccessRule"]] = None,
        diagnostic_settings_version: Optional[int] = None,
        enabled_log_categories: Optional[list[str]] = None,
    ) -> None: ...

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

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


class NoneAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="None"):
    """NoneAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar auth_type: Authentication type of the connection target. Required. NONE.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.NONE
    """

    auth_type: Literal[ConnectionAuthType.NONE] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. NONE."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: 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)
        self.auth_type = ConnectionAuthType.NONE  # type: ignore


class OAuth2AuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="OAuth2"):
    """OAuth2AuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials: ClientId and ClientSecret are required. Other properties are optional
     depending on each OAuth2 provider's implementation.
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionOAuth2
    :ivar auth_type: Authentication type of the connection target. Required. O_AUTH2.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.O_AUTH2
    """

    credentials: Optional["_models.ConnectionOAuth2"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2
     provider's implementation."""
    auth_type: Literal[ConnectionAuthType.O_AUTH2] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. O_AUTH2."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionOAuth2"] = None,
    ) -> None: ...

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


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

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

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

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

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

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


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

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

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


class OrganizationSharedBuiltInAuthorizationPolicy(
    ApplicationAuthorizationPolicy, discriminator="OrganizationScope"
):  # pylint: disable=name-too-long
    """Built-in authorization policy scoped to organization/tenant.

    :ivar type: Authorization scheme type. Required. Claim-based, requires membership in the
     tenant.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.ORGANIZATION_SCOPE
    """

    type: Literal[BuiltInAuthorizationScheme.ORGANIZATION_SCOPE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authorization scheme type. Required. Claim-based, requires membership in the tenant."""

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = BuiltInAuthorizationScheme.ORGANIZATION_SCOPE  # type: ignore


class OutboundRuleBasicResource(ProxyResource):
    """Concrete proxy resource types can be created by aliasing this type using a specific property
    type.

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

    properties: "_models.OutboundRule" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Outbound Rule for the managed network of a cognitive services account. Required."""

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

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

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


class OutboundRuleListResult(_Model):
    """List of outbound rules for the managed network of a cognitive services account.

    :ivar next_link: The link to the next page constructed using the continuationToken.  If null,
     there are no additional pages.
    :vartype next_link: str
    :ivar value: The list of cognitive services accounts. Since this list may be incomplete, the
     nextLink field should be used to request the next list of cognitive services accounts.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.OutboundRuleBasicResource]
    """

    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The link to the next page constructed using the continuationToken.  If null, there are no
     additional pages."""
    value: Optional[list["_models.OutboundRuleBasicResource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of cognitive services accounts. Since this list may be incomplete, the nextLink field
     should be used to request the next list of cognitive services accounts."""

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

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

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


class PATAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="PAT"):
    """PATAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionPersonalAccessToken
    :ivar auth_type: Authentication type of the connection target. Required. PAT.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.PAT
    """

    credentials: Optional["_models.ConnectionPersonalAccessToken"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.PAT] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. PAT."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionPersonalAccessToken"] = None,
    ) -> None: ...

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


class PatchResourceTags(_Model):
    """The object being used to update tags of a resource, in general used for PATCH operations.

    :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 PatchResourceTagsAndSku(PatchResourceTags):
    """The object being used to update tags and sku of a resource, in general used for PATCH
    operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar sku: The resource model definition representing SKU.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    """

    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource model definition representing SKU."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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 resource identifier of the private endpoint.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The resource identifier of the 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.cognitiveservices.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.PrivateEndpointConnectionProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar location: The location of the private endpoint connection.
    :vartype location: str
    """

    properties: Optional["_models.PrivateEndpointConnectionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource properties."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The location of the private endpoint connection."""

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

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

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


class PrivateEndpointConnectionListResult(_Model):
    """A list of private endpoint connections.

    :ivar value: Array of private endpoint connections.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.PrivateEndpointConnection]
    """

    value: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Array of private endpoint connections."""

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

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

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


class PrivateEndpointConnectionProperties(_Model):
    """Properties of the PrivateEndpointConnectProperties.

    :ivar private_endpoint: The resource of private end point.
    :vartype private_endpoint: ~azure.mgmt.cognitiveservices.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.cognitiveservices.models.PrivateLinkServiceConnectionState
    :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
     Known values are: "Succeeded", "Creating", "Deleting", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.PrivateEndpointConnectionProvisioningState
    :ivar group_ids: The private link resource group ids.
    :vartype group_ids: list[str]
    """

    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(
        name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource of private end point."""
    private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field(
        name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of information about the state of the connection between service consumer and
     provider. Required."""
    provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the private endpoint connection resource. Known values are:
     \"Succeeded\", \"Creating\", \"Deleting\", and \"Failed\"."""
    group_ids: Optional[list[str]] = rest_field(
        name="groupIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private link resource group ids."""

    @overload
    def __init__(
        self,
        *,
        private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState",
        private_endpoint: Optional["_models.PrivateEndpoint"] = None,
        group_ids: 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 PrivateEndpointOutboundRule(OutboundRule, discriminator="PrivateEndpoint"):
    """Private Endpoint outbound rule for the managed network of a cognitive services account.

    :ivar category: Category of a managed network Outbound Rule of a cognitive services account.
     Known values are: "Required", "Recommended", "UserDefined", and "Dependency".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.RuleCategory
    :ivar status: Type of a managed network Outbound Rule of a cognitive services account. Known
     values are: "Inactive", "Active", "Provisioning", "Deleting", and "Failed".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.RuleStatus
    :ivar error_information: Error information about an outbound rule of a cognitive services
     account if RuleStatus is failed.
    :vartype error_information: str
    :ivar parent_rule_names:
    :vartype parent_rule_names: list[str]
    :ivar destination: Private Endpoint destination.
    :vartype destination:
     ~azure.mgmt.cognitiveservices.models.PrivateEndpointOutboundRuleDestination
    :ivar fqdns: List of FQDNs associated with the private endpoint outbound rule.
    :vartype fqdns: list[str]
    :ivar type: Type of a managed network Outbound Rule of a cognitive services account. Required.
     PRIVATE_ENDPOINT.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.PRIVATE_ENDPOINT
    """

    destination: Optional["_models.PrivateEndpointOutboundRuleDestination"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Private Endpoint destination."""
    fqdns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of FQDNs associated with the private endpoint outbound rule."""
    type: Literal[RuleType.PRIVATE_ENDPOINT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of a managed network Outbound Rule of a cognitive services account. Required.
     PRIVATE_ENDPOINT."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.RuleCategory"]] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
        destination: Optional["_models.PrivateEndpointOutboundRuleDestination"] = None,
        fqdns: 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)
        self.type = RuleType.PRIVATE_ENDPOINT  # type: ignore


class PrivateEndpointOutboundRuleDestination(_Model):
    """Private Endpoint destination for an outbound rule.

    :ivar service_resource_id: The Azure resource ID of the target private endpoint service.
    :vartype service_resource_id: str
    :ivar subresource_target: The subresource of the target service to connect to.
    :vartype subresource_target: str
    """

    service_resource_id: Optional[str] = rest_field(
        name="serviceResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Azure resource ID of the target private endpoint service."""
    subresource_target: Optional[str] = rest_field(
        name="subresourceTarget", visibility=["read", "create", "update", "delete", "query"]
    )
    """The subresource of the target service to connect to."""

    @overload
    def __init__(
        self,
        *,
        service_resource_id: Optional[str] = None,
        subresource_target: 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 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.cognitiveservices.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.PrivateLinkResourceProperties
    """

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

    @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:
        super().__init__(*args, **kwargs)


class PrivateLinkResourceListResult(_Model):
    """A list of private link resources.

    :ivar value: Array of private link resources.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.PrivateLinkResource]
    """

    value: Optional[list["_models.PrivateLinkResource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Array of private link resources."""

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

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

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


class PrivateLinkResourceProperties(_Model):
    """Properties of a private link resource.

    :ivar group_id: The private link resource group id.
    :vartype group_id: str
    :ivar required_members: The private link resource required member names.
    :vartype required_members: list[str]
    :ivar required_zone_names: The private link resource Private link DNS zone name.
    :vartype required_zone_names: list[str]
    :ivar display_name: The private link resource display name.
    :vartype display_name: 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."""
    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """The private link resource display name."""

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

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

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


class PrivateLinkServiceConnectionState(_Model):
    """A collection of information about the state of the connection between service consumer and
    provider.

    :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
     of the service. Known values are: "Pending", "Approved", and "Rejected".
    :vartype status: str or
     ~azure.mgmt.cognitiveservices.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\", and \"Rejected\"."""
    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 Project(Resource):
    """Cognitive Services project is an Azure resource representing the provisioned account's project,
    it's type, location and SKU.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services project.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ProjectProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar identity: Identity for the resource.
    :vartype identity: ~azure.mgmt.cognitiveservices.models.Identity
    """

    properties: Optional["_models.ProjectProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services project."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Identity for the resource."""

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

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

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


class ProjectCapabilityHost(ProxyResource):
    """Azure Resource Manager resource envelope for Project CapabilityHost.

    :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.cognitiveservices.models.SystemData
    :ivar properties: [Required] Additional attributes of the entity. Required.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ProjectCapabilityHostProperties
    """

    properties: "_models.ProjectCapabilityHostProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """[Required] Additional attributes of the entity. Required."""

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

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

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


class ProjectCapabilityHostProperties(_Model):
    """ProjectCapabilityHostProperties.

    :ivar ai_services_connections: List of AI services connections.
    :vartype ai_services_connections: list[str]
    :ivar vector_store_connections: List of connection names from those available in the account or
     project to be used for vector database (e.g. CosmosDB).
    :vartype vector_store_connections: list[str]
    :ivar storage_connections: List of connection names from those available in the account or
     project to be used as a storage resource.
    :vartype storage_connections: list[str]
    :ivar thread_storage_connections: List of connection names from those available in the account
     or project to be used for Thread storage.
    :vartype thread_storage_connections: list[str]
    :ivar provisioning_state: Provisioning state for the CapabilityHost. Known values are:
     "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
    :vartype provisioning_state: str or
     ~azure.mgmt.cognitiveservices.models.CapabilityHostProvisioningState
    """

    ai_services_connections: Optional[list[str]] = rest_field(
        name="aiServicesConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of AI services connections."""
    vector_store_connections: Optional[list[str]] = rest_field(
        name="vectorStoreConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used for vector
     database (e.g. CosmosDB)."""
    storage_connections: Optional[list[str]] = rest_field(
        name="storageConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used as a storage
     resource."""
    thread_storage_connections: Optional[list[str]] = rest_field(
        name="threadStorageConnections", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of connection names from those available in the account or project to be used for Thread
     storage."""
    provisioning_state: Optional[Union[str, "_models.CapabilityHostProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Provisioning state for the CapabilityHost. Known values are: \"Succeeded\", \"Failed\",
     \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\"."""

    @overload
    def __init__(
        self,
        *,
        ai_services_connections: Optional[list[str]] = None,
        vector_store_connections: Optional[list[str]] = None,
        storage_connections: Optional[list[str]] = None,
        thread_storage_connections: 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 ProjectProperties(_Model):
    """Properties of Cognitive Services Project'.

    :ivar provisioning_state: Gets the status of the cognitive services project at the time the
     operation was called. Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed",
     "Succeeded", "Canceled", and "ResolvingDNS".
    :vartype provisioning_state: str or ~azure.mgmt.cognitiveservices.models.ProvisioningState
    :ivar display_name: The display name of the Cognitive Services Project.
    :vartype display_name: str
    :ivar description: The description of the Cognitive Services Project.
    :vartype description: str
    :ivar endpoints: The list of endpoint for this Cognitive Services Project.
    :vartype endpoints: dict[str, str]
    :ivar is_default: Indicates whether the project is the default project for the account.
    :vartype is_default: bool
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the status of the cognitive services project at the time the operation was called. Known
     values are: \"Accepted\", \"Creating\", \"Deleting\", \"Moving\", \"Failed\", \"Succeeded\",
     \"Canceled\", and \"ResolvingDNS\"."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The display name of the Cognitive Services Project."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the Cognitive Services Project."""
    endpoints: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """The list of endpoint for this Cognitive Services Project."""
    is_default: Optional[bool] = rest_field(name="isDefault", visibility=["read"])
    """Indicates whether the project is the default project for the account."""

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

    :ivar name: Name of the NSP provisioning issue.
    :vartype name: str
    :ivar properties: Properties of Provisioning Issue.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.ProvisioningIssueProperties
    """

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

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

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

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


class ProvisioningIssueProperties(_Model):
    """Properties of Provisioning Issue.

    :ivar issue_type: Type of Issue.
    :vartype issue_type: str
    :ivar severity: Severity of the issue.
    :vartype severity: str
    :ivar description: Description of the issue.
    :vartype description: str
    :ivar suggested_resource_ids: IDs of resources that can be associated to the same perimeter to
     remediate the issue.
    :vartype suggested_resource_ids: list[str]
    :ivar suggested_access_rules: Optional array, suggested access rules.
    :vartype suggested_access_rules:
     list[~azure.mgmt.cognitiveservices.models.NetworkSecurityPerimeterAccessRule]
    """

    issue_type: Optional[str] = rest_field(name="issueType", visibility=["read", "create", "update", "delete", "query"])
    """Type of Issue."""
    severity: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Severity of the issue."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the issue."""
    suggested_resource_ids: Optional[list[str]] = rest_field(
        name="suggestedResourceIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """IDs of resources that can be associated to the same perimeter to remediate the issue."""
    suggested_access_rules: Optional[list["_models.NetworkSecurityPerimeterAccessRule"]] = rest_field(
        name="suggestedAccessRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional array, suggested access rules."""

    @overload
    def __init__(
        self,
        *,
        issue_type: Optional[str] = None,
        severity: Optional[str] = None,
        description: Optional[str] = None,
        suggested_resource_ids: Optional[list[str]] = None,
        suggested_access_rules: Optional[list["_models.NetworkSecurityPerimeterAccessRule"]] = None,
    ) -> None: ...

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

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


class QuotaLimit(_Model):
    """QuotaLimit.

    :ivar count:
    :vartype count: float
    :ivar renewal_period:
    :vartype renewal_period: float
    :ivar rules:
    :vartype rules: list[~azure.mgmt.cognitiveservices.models.ThrottlingRule]
    """

    count: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    renewal_period: Optional[float] = rest_field(
        name="renewalPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    rules: Optional[list["_models.ThrottlingRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        count: Optional[float] = None,
        renewal_period: Optional[float] = None,
        rules: Optional[list["_models.ThrottlingRule"]] = None,
    ) -> None: ...

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

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


class QuotaTier(ProxyResource):
    """The quota tier information for the subscription.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of quota tier resource.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.QuotaTierProperties
    """

    properties: Optional["_models.QuotaTierProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of quota tier resource."""

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

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

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


class QuotaTierProperties(_Model):
    """Properties of Quota Tier resource'.

    :ivar current_tier_name: Name of the current quota tier for the subscription.
    :vartype current_tier_name: str
    :ivar tier_upgrade_policy: Gets the tier upgrade policy for the subscription. Known values are:
     "OnceUpgradeIsAvailable" and "NoAutoUpgrade".
    :vartype tier_upgrade_policy: str or ~azure.mgmt.cognitiveservices.models.TierUpgradePolicy
    :ivar assignment_date: The date on which the current tier was assigned to the subscription
     (UTC).
    :vartype assignment_date: ~datetime.datetime
    :ivar tier_upgrade_eligibility_info: Information about the quota tier upgrade eligibility for
     the subscription.
    :vartype tier_upgrade_eligibility_info:
     ~azure.mgmt.cognitiveservices.models.QuotaTierUpgradeEligibilityInfo
    """

    current_tier_name: Optional[str] = rest_field(name="currentTierName", visibility=["read"])
    """Name of the current quota tier for the subscription."""
    tier_upgrade_policy: Optional[Union[str, "_models.TierUpgradePolicy"]] = rest_field(
        name="tierUpgradePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the tier upgrade policy for the subscription. Known values are: \"OnceUpgradeIsAvailable\"
     and \"NoAutoUpgrade\"."""
    assignment_date: Optional[datetime.datetime] = rest_field(
        name="assignmentDate", visibility=["read"], format="rfc3339"
    )
    """The date on which the current tier was assigned to the subscription (UTC)."""
    tier_upgrade_eligibility_info: Optional["_models.QuotaTierUpgradeEligibilityInfo"] = rest_field(
        name="tierUpgradeEligibilityInfo", visibility=["read"]
    )
    """Information about the quota tier upgrade eligibility for the subscription."""

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

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

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


class QuotaTierUpgradeEligibilityInfo(_Model):
    """Information about the quota tier upgrade eligibility for the subscription.

    :ivar next_tier_name: Name of the next quota tier for the subscription.
    :vartype next_tier_name: str
    :ivar upgrade_availability_status: Specifies whether an upgrade to the next quota tier is
     available. Known values are: "Available" and "NotAvailable".
    :vartype upgrade_availability_status: str or
     ~azure.mgmt.cognitiveservices.models.UpgradeAvailabilityStatus
    :ivar upgrade_applicable_date: The date after which the current tier will be upgraded to the
     next tier if the TierUpgradePolicy is "OnceUpgradeIsAvailable" (UTC).
    :vartype upgrade_applicable_date: ~datetime.datetime
    :ivar upgrade_unavailability_reason: Reason in case the subscription is not eligible for
     upgrade to the next tier.
    :vartype upgrade_unavailability_reason: str
    """

    next_tier_name: Optional[str] = rest_field(
        name="nextTierName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the next quota tier for the subscription."""
    upgrade_availability_status: Optional[Union[str, "_models.UpgradeAvailabilityStatus"]] = rest_field(
        name="upgradeAvailabilityStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether an upgrade to the next quota tier is available. Known values are:
     \"Available\" and \"NotAvailable\"."""
    upgrade_applicable_date: Optional[datetime.datetime] = rest_field(
        name="upgradeApplicableDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The date after which the current tier will be upgraded to the next tier if the
     TierUpgradePolicy is \"OnceUpgradeIsAvailable\" (UTC)."""
    upgrade_unavailability_reason: Optional[str] = rest_field(
        name="upgradeUnavailabilityReason", visibility=["read", "create", "update", "delete", "query"]
    )
    """Reason in case the subscription is not eligible for upgrade to the next tier."""

    @overload
    def __init__(
        self,
        *,
        next_tier_name: Optional[str] = None,
        upgrade_availability_status: Optional[Union[str, "_models.UpgradeAvailabilityStatus"]] = None,
        upgrade_applicable_date: Optional[datetime.datetime] = None,
        upgrade_unavailability_reason: 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 RaiBlocklist(ProxyResource):
    """Cognitive Services RaiBlocklist.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services RaiBlocklist.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiBlocklistProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiBlocklistProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services RaiBlocklist."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class RaiBlocklistItem(ProxyResource):
    """Cognitive Services RaiBlocklist Item.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services RaiBlocklist Item.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiBlocklistItemProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiBlocklistItemProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services RaiBlocklist Item."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class RaiBlocklistItemBulkRequest(_Model):
    """The Cognitive Services RaiBlocklist Item request body.

    :ivar name:
    :vartype name: str
    :ivar properties: Properties of Cognitive Services RaiBlocklist Item.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiBlocklistItemProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    properties: Optional["_models.RaiBlocklistItemProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services RaiBlocklist Item."""

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

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

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


class RaiBlocklistItemProperties(_Model):
    """RAI Custom Blocklist Item properties.

    :ivar pattern: Pattern to match against.
    :vartype pattern: str
    :ivar is_regex: If the pattern is a regex pattern.
    :vartype is_regex: bool
    """

    pattern: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Pattern to match against."""
    is_regex: Optional[bool] = rest_field(name="isRegex", visibility=["read", "create", "update", "delete", "query"])
    """If the pattern is a regex pattern."""

    @overload
    def __init__(
        self,
        *,
        pattern: Optional[str] = None,
        is_regex: 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 RaiBlocklistProperties(_Model):
    """RAI Custom Blocklist properties.

    :ivar description: Description of the block list.
    :vartype description: str
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the block list."""

    @overload
    def __init__(
        self,
        *,
        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 RaiContentFilter(ProxyResource):
    """Azure OpenAI Content Filter.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Azure OpenAI Content Filter Properties.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiContentFilterProperties
    """

    properties: Optional["_models.RaiContentFilterProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure OpenAI Content Filter Properties."""

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

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

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


class RaiContentFilterProperties(_Model):
    """Azure OpenAI Content Filter Properties.

    :ivar name: Name of Content Filter.
    :vartype name: str
    :ivar is_multi_level_filter: If the Content Filter has multi severity levels(Low, Medium, or
     High).
    :vartype is_multi_level_filter: bool
    :ivar source: Content source to apply the Content Filters. Known values are: "Prompt",
     "Completion", "PreToolCall", "PostToolCall", "PreRun", and "PostRun".
    :vartype source: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyContentSource
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of Content Filter."""
    is_multi_level_filter: Optional[bool] = rest_field(
        name="isMultiLevelFilter", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the Content Filter has multi severity levels(Low, Medium, or High)."""
    source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Content source to apply the Content Filters. Known values are: \"Prompt\", \"Completion\",
     \"PreToolCall\", \"PostToolCall\", \"PreRun\", and \"PostRun\"."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        is_multi_level_filter: Optional[bool] = None,
        source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = None,
    ) -> None: ...

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

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


class RaiExternalSafetyProvider(ProxyResource):
    """Cognitive Services Rai External Safety provider.

    :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.cognitiveservices.models.SystemData
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Properties of Cognitive Services Rai External Safety provider.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiExternalSafetyProviderProperties
    """

    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """Resource tags."""
    properties: Optional["_models.RaiExternalSafetyProviderProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services Rai External Safety provider."""

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

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

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


class RaiExternalSafetyProviderProperties(_Model):
    """RAI External SafetyProvider properties.

    :ivar provider_id: The unique identifier of the safety provider.
    :vartype provider_id: str
    :ivar provider_name: Name of the safety provider.
    :vartype provider_name: str
    :ivar mode: Safety provider mode sync/async.
    :vartype mode: str
    :ivar url: Webhook URL for the safety provider.
    :vartype url: str
    :ivar created_at: Creation time of the safety provider.
    :vartype created_at: ~datetime.datetime
    :ivar last_modified_at: Last modified time of the safety provider.
    :vartype last_modified_at: ~datetime.datetime
    """

    provider_id: Optional[str] = rest_field(
        name="providerId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unique identifier of the safety provider."""
    provider_name: Optional[str] = rest_field(
        name="providerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the safety provider."""
    mode: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Safety provider mode sync/async."""
    url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Webhook URL for the safety provider."""
    created_at: Optional[datetime.datetime] = rest_field(
        name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Creation time of the safety provider."""
    last_modified_at: Optional[datetime.datetime] = rest_field(
        name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Last modified time of the safety provider."""

    @overload
    def __init__(
        self,
        *,
        provider_id: Optional[str] = None,
        provider_name: Optional[str] = None,
        mode: Optional[str] = None,
        url: Optional[str] = None,
        created_at: Optional[datetime.datetime] = 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 RaiExternalSafetyProviderSchema(ProxyResource):
    """Cognitive Services Rai External Safety provider Schema.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services Rai External Safety provider.
    :vartype properties:
     ~azure.mgmt.cognitiveservices.models.RaiExternalSafetyProviderSchemaProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiExternalSafetyProviderSchemaProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services Rai External Safety provider."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """Resource tags."""

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

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

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


class RaiExternalSafetyProviderSchemaProperties(_Model):  # pylint: disable=name-too-long
    """RAI External SafetyProvider schema properties.

    :ivar provider_id: The unique identifier of the safety provider.
    :vartype provider_id: str
    :ivar provider_name: Name of the safety provider.
    :vartype provider_name: str
    :ivar mode: Safety provider mode sync/async.
    :vartype mode: str
    :ivar url: Webhook URL for the safety provider.
    :vartype url: str
    :ivar secret_name: The name of the secret in Key Vault that contains the api key to access the
     webhook.
    :vartype secret_name: str
    :ivar managed_identity: The managed identity to access the Key Vault.
    :vartype managed_identity: str
    :ivar key_vault_uri: The Key Vault URI that contains the api key for safety provider urls.
    :vartype key_vault_uri: str
    :ivar created_at: Creation time of the safety provider.
    :vartype created_at: ~datetime.datetime
    :ivar last_modified_at: Last modified time of the safety provider.
    :vartype last_modified_at: ~datetime.datetime
    """

    provider_id: Optional[str] = rest_field(
        name="providerId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unique identifier of the safety provider."""
    provider_name: Optional[str] = rest_field(
        name="providerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the safety provider."""
    mode: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Safety provider mode sync/async."""
    url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Webhook URL for the safety provider."""
    secret_name: Optional[str] = rest_field(
        name="secretName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the secret in Key Vault that contains the api key to access the webhook."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed identity to access the Key Vault."""
    key_vault_uri: Optional[str] = rest_field(
        name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Key Vault URI that contains the api key for safety provider urls."""
    created_at: Optional[datetime.datetime] = rest_field(name="createdAt", visibility=["read"], format="rfc3339")
    """Creation time of the safety provider."""
    last_modified_at: Optional[datetime.datetime] = rest_field(
        name="lastModifiedAt", visibility=["read"], format="rfc3339"
    )
    """Last modified time of the safety provider."""

    @overload
    def __init__(
        self,
        *,
        provider_id: Optional[str] = None,
        provider_name: Optional[str] = None,
        mode: Optional[str] = None,
        url: Optional[str] = None,
        secret_name: Optional[str] = None,
        managed_identity: Optional[str] = None,
        key_vault_uri: Optional[str] = None,
    ) -> None: ...

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

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


class RaiMonitorConfig(_Model):
    """Cognitive Services Rai Monitor Config.

    :ivar adx_storage_resource_id: The storage resource Id.
    :vartype adx_storage_resource_id: str
    :ivar identity_client_id: The identity client Id to access the storage.
    :vartype identity_client_id: str
    """

    adx_storage_resource_id: Optional[str] = rest_field(
        name="adxStorageResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The storage resource Id."""
    identity_client_id: Optional[str] = rest_field(
        name="identityClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity client Id to access the storage."""

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

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

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


class RaiPolicy(ProxyResource):
    """Cognitive Services RaiPolicy.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services RaiPolicy.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiPolicyProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiPolicyProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services RaiPolicy."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class RaiPolicyContentFilter(_Model):
    """Azure OpenAI Content Filter.

    :ivar name: Name of ContentFilter.
    :vartype name: str
    :ivar enabled: If the ContentFilter is enabled.
    :vartype enabled: bool
    :ivar severity_threshold: Level at which content is filtered. Known values are: "Low",
     "Medium", and "High".
    :vartype severity_threshold: str or ~azure.mgmt.cognitiveservices.models.ContentLevel
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    :ivar source: Content source to apply the Content Filters. Known values are: "Prompt",
     "Completion", "PreToolCall", "PostToolCall", "PreRun", and "PostRun".
    :vartype source: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyContentSource
    :ivar action: The action types to apply to the content filters. Known values are: "None",
     "BLOCKING", "ANNOTATING", "HITL", and "RETRY".
    :vartype action: str or ~azure.mgmt.cognitiveservices.models.RaiActionType
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of ContentFilter."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If the ContentFilter is enabled."""
    severity_threshold: Optional[Union[str, "_models.ContentLevel"]] = rest_field(
        name="severityThreshold", visibility=["read", "create", "update", "delete", "query"]
    )
    """Level at which content is filtered. Known values are: \"Low\", \"Medium\", and \"High\"."""
    blocking: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If blocking would occur."""
    source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Content source to apply the Content Filters. Known values are: \"Prompt\", \"Completion\",
     \"PreToolCall\", \"PostToolCall\", \"PreRun\", and \"PostRun\"."""
    action: Optional[Union[str, "_models.RaiActionType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action types to apply to the content filters. Known values are: \"None\", \"BLOCKING\",
     \"ANNOTATING\", \"HITL\", and \"RETRY\"."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        enabled: Optional[bool] = None,
        severity_threshold: Optional[Union[str, "_models.ContentLevel"]] = None,
        blocking: Optional[bool] = None,
        source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = None,
        action: Optional[Union[str, "_models.RaiActionType"]] = None,
    ) -> None: ...

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

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


class RaiPolicyProperties(_Model):
    """Azure OpenAI Content Filters properties.

    :ivar type: Content Filters policy type. Known values are: "UserManaged" and "SystemManaged".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyType
    :ivar mode: Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1,
     Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is
     the same as 'Deferred' in previous version. Known values are: "Default", "Deferred",
     "Blocking", and "Asynchronous_filter".
    :vartype mode: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyMode
    :ivar base_policy_name: Name of Rai policy.
    :vartype base_policy_name: str
    :ivar content_filters: The list of Content Filters.
    :vartype content_filters: list[~azure.mgmt.cognitiveservices.models.RaiPolicyContentFilter]
    :ivar custom_blocklists: The list of custom Blocklist.
    :vartype custom_blocklists: list[~azure.mgmt.cognitiveservices.models.CustomBlocklistConfig]
    :ivar custom_topics: The list of custom rai topics.
    :vartype custom_topics: list[~azure.mgmt.cognitiveservices.models.CustomTopicConfig]
    :ivar safety_providers: The list of Safety Providers.
    :vartype safety_providers: list[~azure.mgmt.cognitiveservices.models.SafetyProviderConfig]
    """

    type: Optional[Union[str, "_models.RaiPolicyType"]] = rest_field(visibility=["read"])
    """Content Filters policy type. Known values are: \"UserManaged\" and \"SystemManaged\"."""
    mode: Optional[Union[str, "_models.RaiPolicyMode"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2,
     Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as
     'Deferred' in previous version. Known values are: \"Default\", \"Deferred\", \"Blocking\", and
     \"Asynchronous_filter\"."""
    base_policy_name: Optional[str] = rest_field(
        name="basePolicyName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of Rai policy."""
    content_filters: Optional[list["_models.RaiPolicyContentFilter"]] = rest_field(
        name="contentFilters", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Content Filters."""
    custom_blocklists: Optional[list["_models.CustomBlocklistConfig"]] = rest_field(
        name="customBlocklists", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of custom Blocklist."""
    custom_topics: Optional[list["_models.CustomTopicConfig"]] = rest_field(
        name="customTopics", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of custom rai topics."""
    safety_providers: Optional[list["_models.SafetyProviderConfig"]] = rest_field(
        name="safetyProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Safety Providers."""

    @overload
    def __init__(
        self,
        *,
        mode: Optional[Union[str, "_models.RaiPolicyMode"]] = None,
        base_policy_name: Optional[str] = None,
        content_filters: Optional[list["_models.RaiPolicyContentFilter"]] = None,
        custom_blocklists: Optional[list["_models.CustomBlocklistConfig"]] = None,
        custom_topics: Optional[list["_models.CustomTopicConfig"]] = None,
        safety_providers: Optional[list["_models.SafetyProviderConfig"]] = None,
    ) -> None: ...

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

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


class RaiSafetyProviderConfig(_Model):
    """Azure OpenAI RAI safety provider config.

    :ivar safety_provider_name: Name of RAI Safety Provider.
    :vartype safety_provider_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    """

    safety_provider_name: Optional[str] = rest_field(
        name="safetyProviderName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of RAI Safety Provider."""
    blocking: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If blocking would occur."""

    @overload
    def __init__(
        self,
        *,
        safety_provider_name: Optional[str] = None,
        blocking: 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 RaiToolLabel(ProxyResource):
    """Cognitive Services RAI Tool Label 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.cognitiveservices.models.SystemData
    :ivar properties: Properties of the RAI Tool Label.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiToolLabelProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiToolLabelProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the RAI Tool Label."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create"])
    """Resource tags."""

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

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

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


class RaiToolLabelProperties(_Model):
    """RAI Tool Label properties.

    :ivar tool_connection_name: The unique tool connection name, e.g., 'Web_Search'. Required.
    :vartype tool_connection_name: str
    :ivar account_scope: Account-level tool label definition.
    :vartype account_scope: ~azure.mgmt.cognitiveservices.models.RaiToolLabelPropertiesAccountScope
    :ivar project_scopes: List of project-level tool label definitions.
    :vartype project_scopes:
     list[~azure.mgmt.cognitiveservices.models.RaiToolLabelPropertiesProjectScopesItem]
    """

    tool_connection_name: str = rest_field(
        name="toolConnectionName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unique tool connection name, e.g., 'Web_Search'. Required."""
    account_scope: Optional["_models.RaiToolLabelPropertiesAccountScope"] = rest_field(
        name="accountScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Account-level tool label definition."""
    project_scopes: Optional[list["_models.RaiToolLabelPropertiesProjectScopesItem"]] = rest_field(
        name="projectScopes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of project-level tool label definitions."""

    @overload
    def __init__(
        self,
        *,
        tool_connection_name: str,
        account_scope: Optional["_models.RaiToolLabelPropertiesAccountScope"] = None,
        project_scopes: Optional[list["_models.RaiToolLabelPropertiesProjectScopesItem"]] = None,
    ) -> None: ...

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

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


class RaiToolLabelPropertiesAccountScope(_Model):
    """Account-level tool label definition.

    :ivar label_values: Dictionary of label key-value pairs for the account scope.
    :vartype label_values: dict[str, str]
    """

    label_values: Optional[dict[str, str]] = rest_field(
        name="labelValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dictionary of label key-value pairs for the account scope."""

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

    :ivar project: Project name to which this scope applies. Required.
    :vartype project: str
    :ivar label_values: Dictionary of label key-value pairs for the project scope. Required.
    :vartype label_values: dict[str, str]
    """

    project: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Project name to which this scope applies. Required."""
    label_values: dict[str, str] = rest_field(
        name="labelValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """Dictionary of label key-value pairs for the project scope. Required."""

    @overload
    def __init__(
        self,
        *,
        project: str,
        label_values: dict[str, 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 RaiTopic(ProxyResource):
    """Cognitive Services Rai Topic.

    :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.cognitiveservices.models.SystemData
    :ivar properties: Properties of Cognitive Services Rai Topic.
    :vartype properties: ~azure.mgmt.cognitiveservices.models.RaiTopicProperties
    :ivar etag: Resource Etag.
    :vartype etag: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.RaiTopicProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Cognitive Services Rai Topic."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource Etag."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""

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

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

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


class RaiTopicProperties(_Model):
    """RAI Custom Topic properties.

    :ivar topic_id: The unique identifier of the custom topic.
    :vartype topic_id: str
    :ivar topic_name: The name of the custom topic.
    :vartype topic_name: str
    :ivar description: Description of the custom topic.
    :vartype description: str
    :ivar sample_blob_url: Sample blob url for the custom topic.
    :vartype sample_blob_url: str
    :ivar status: Status of the custom topic.
    :vartype status: str
    :ivar failed_reason: Failed reason if the status is Failed.
    :vartype failed_reason: str
    :ivar created_at: Creation time of the custom topic.
    :vartype created_at: ~datetime.datetime
    :ivar last_modified_at: Last modified time of the custom topic.
    :vartype last_modified_at: ~datetime.datetime
    """

    topic_id: Optional[str] = rest_field(name="topicId", visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the custom topic."""
    topic_name: Optional[str] = rest_field(name="topicName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom topic."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the custom topic."""
    sample_blob_url: Optional[str] = rest_field(
        name="sampleBlobUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sample blob url for the custom topic."""
    status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Status of the custom topic."""
    failed_reason: Optional[str] = rest_field(
        name="failedReason", visibility=["read", "create", "update", "delete", "query"]
    )
    """Failed reason if the status is Failed."""
    created_at: Optional[datetime.datetime] = rest_field(
        name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Creation time of the custom topic."""
    last_modified_at: Optional[datetime.datetime] = rest_field(
        name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Last modified time of the custom topic."""

    @overload
    def __init__(
        self,
        *,
        topic_id: Optional[str] = None,
        topic_name: Optional[str] = None,
        description: Optional[str] = None,
        sample_blob_url: Optional[str] = None,
        status: Optional[str] = None,
        failed_reason: Optional[str] = None,
        created_at: Optional[datetime.datetime] = 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 RegenerateKeyParameters(_Model):
    """Regenerate key parameters.

    :ivar key_name: key name to generate (Key1|Key2). Required. Known values are: "Key1" and
     "Key2".
    :vartype key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName
    """

    key_name: Union[str, "_models.KeyName"] = rest_field(
        name="keyName", visibility=["read", "create", "update", "delete", "query"]
    )
    """key name to generate (Key1|Key2). Required. Known values are: \"Key1\" and \"Key2\"."""

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

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

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


class RegionSetting(_Model):
    """The call rate limit Cognitive Services account.

    :ivar name: Name of the region.
    :vartype name: str
    :ivar value: A value for priority or weighted routing methods.
    :vartype value: float
    :ivar customsubdomain: Maps the region to the regional custom subdomain.
    :vartype customsubdomain: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the region."""
    value: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A value for priority or weighted routing methods."""
    customsubdomain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Maps the region to the regional custom subdomain."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        value: Optional[float] = None,
        customsubdomain: 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 ReplacementConfig(_Model):
    """Configuration for model replacement.

    :ivar target_model_name: The name of the replacement model.
    :vartype target_model_name: str
    :ivar target_model_version: The version of the replacement model.
    :vartype target_model_version: str
    :ivar auto_upgrade_start_date: The date when automatic upgrade should start. This applies to
     deployments with the OnceNewDefaultVersionAvailable upgrade option.
    :vartype auto_upgrade_start_date: ~datetime.datetime
    :ivar upgrade_on_expiry_lead_time_days: The number of days before deprecation date to trigger
     upgrade. This applies to deployments with the OnceCurrentVersionExpired upgrade option.
    :vartype upgrade_on_expiry_lead_time_days: int
    """

    target_model_name: Optional[str] = rest_field(
        name="targetModelName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the replacement model."""
    target_model_version: Optional[str] = rest_field(
        name="targetModelVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The version of the replacement model."""
    auto_upgrade_start_date: Optional[datetime.datetime] = rest_field(
        name="autoUpgradeStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The date when automatic upgrade should start. This applies to deployments with the
     OnceNewDefaultVersionAvailable upgrade option."""
    upgrade_on_expiry_lead_time_days: Optional[int] = rest_field(
        name="upgradeOnExpiryLeadTimeDays", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of days before deprecation date to trigger upgrade. This applies to deployments with
     the OnceCurrentVersionExpired upgrade option."""

    @overload
    def __init__(
        self,
        *,
        target_model_name: Optional[str] = None,
        target_model_version: Optional[str] = None,
        auto_upgrade_start_date: Optional[datetime.datetime] = None,
        upgrade_on_expiry_lead_time_days: Optional[int] = None,
    ) -> None: ...

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

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


class RequestMatchPattern(_Model):
    """RequestMatchPattern.

    :ivar path:
    :vartype path: str
    :ivar method:
    :vartype method: str
    """

    path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    method: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        path: Optional[str] = None,
        method: 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 ResourceSku(_Model):
    """Describes an available Cognitive Services SKU.

    :ivar resource_type: The type of resource the SKU applies to.
    :vartype resource_type: str
    :ivar name: The name of SKU.
    :vartype name: str
    :ivar tier: Specifies the tier of Cognitive Services account.
    :vartype tier: str
    :ivar kind: The Kind of resources that are supported in this SKU.
    :vartype kind: str
    :ivar locations: The set of locations that the SKU is available.
    :vartype locations: list[str]
    :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if
     there are no restrictions.
    :vartype restrictions: list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions]
    """

    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of resource the SKU applies to."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of SKU."""
    tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the tier of Cognitive Services account."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Kind of resources that are supported in this SKU."""
    locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The set of locations that the SKU is available."""
    restrictions: Optional[list["_models.ResourceSkuRestrictions"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The restrictions because of which SKU cannot be used. This is empty if there are no
     restrictions."""

    @overload
    def __init__(
        self,
        *,
        resource_type: Optional[str] = None,
        name: Optional[str] = None,
        tier: Optional[str] = None,
        kind: Optional[str] = None,
        locations: Optional[list[str]] = None,
        restrictions: Optional[list["_models.ResourceSkuRestrictions"]] = None,
    ) -> None: ...

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

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


class ResourceSkuRestrictionInfo(_Model):
    """ResourceSkuRestrictionInfo.

    :ivar locations: Locations where the SKU is restricted.
    :vartype locations: list[str]
    :ivar zones: List of availability zones where the SKU is restricted.
    :vartype zones: list[str]
    """

    locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Locations where the SKU is restricted."""
    zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of availability zones where the SKU is restricted."""

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

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

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


class ResourceSkuRestrictions(_Model):
    """Describes restrictions of a SKU.

    :ivar type: The type of restrictions. Known values are: "Location" and "Zone".
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType
    :ivar values_property: The value of restrictions. If the restriction type is set to location.
     This would be different locations where the SKU is restricted.
    :vartype values_property: list[str]
    :ivar restriction_info: The information about the restriction where the SKU cannot be used.
    :vartype restriction_info: ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo
    :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and
     "NotAvailableForSubscription".
    :vartype reason_code: str or
     ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode
    """

    type: Optional[Union[str, "_models.ResourceSkuRestrictionsType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of restrictions. Known values are: \"Location\" and \"Zone\"."""
    values_property: Optional[list[str]] = rest_field(
        name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values"
    )
    """The value of restrictions. If the restriction type is set to location. This would be different
     locations where the SKU is restricted."""
    restriction_info: Optional["_models.ResourceSkuRestrictionInfo"] = rest_field(
        name="restrictionInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """The information about the restriction where the SKU cannot be used."""
    reason_code: Optional[Union[str, "_models.ResourceSkuRestrictionsReasonCode"]] = rest_field(
        name="reasonCode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The reason for restriction. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\"."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.ResourceSkuRestrictionsType"]] = None,
        values_property: Optional[list[str]] = None,
        restriction_info: Optional["_models.ResourceSkuRestrictionInfo"] = None,
        reason_code: Optional[Union[str, "_models.ResourceSkuRestrictionsReasonCode"]] = None,
    ) -> None: ...

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

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


class RoleBasedBuiltInAuthorizationPolicy(ApplicationAuthorizationPolicy, discriminator="Default"):
    """Built-in role-based authorization policy.

    :ivar type: Authorization scheme type. Required. Standard AzureML RBAC.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.DEFAULT
    """

    type: Literal[BuiltInAuthorizationScheme.DEFAULT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authorization scheme type. Required. Standard AzureML RBAC."""

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = BuiltInAuthorizationScheme.DEFAULT  # type: ignore


class SafetyProviderConfig(RaiSafetyProviderConfig):
    """Gets or sets the source to which safety providers applies.

    :ivar safety_provider_name: Name of RAI Safety Provider.
    :vartype safety_provider_name: str
    :ivar blocking: If blocking would occur.
    :vartype blocking: bool
    :ivar source: Content source to apply the Content Filters. Known values are: "Prompt",
     "Completion", "PreToolCall", "PostToolCall", "PreRun", and "PostRun".
    :vartype source: str or ~azure.mgmt.cognitiveservices.models.RaiPolicyContentSource
    """

    source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Content source to apply the Content Filters. Known values are: \"Prompt\", \"Completion\",
     \"PreToolCall\", \"PostToolCall\", \"PreRun\", and \"PostRun\"."""

    @overload
    def __init__(
        self,
        *,
        safety_provider_name: Optional[str] = None,
        blocking: Optional[bool] = None,
        source: Optional[Union[str, "_models.RaiPolicyContentSource"]] = None,
    ) -> None: ...

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

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


class SASAuthTypeConnectionProperties(ConnectionPropertiesV2, discriminator="SAS"):
    """SASAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionSharedAccessSignature
    :ivar auth_type: Authentication type of the connection target. Required. SAS.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.SAS
    """

    credentials: Optional["_models.ConnectionSharedAccessSignature"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.SAS] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. SAS."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionSharedAccessSignature"] = None,
    ) -> None: ...

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


class ServicePrincipalAuthTypeConnectionProperties(
    ConnectionPropertiesV2, discriminator="ServicePrincipal"
):  # pylint: disable=name-too-long
    """ServicePrincipalAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionServicePrincipal
    :ivar auth_type: Authentication type of the connection target. Required. SERVICE_PRINCIPAL.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.SERVICE_PRINCIPAL
    """

    credentials: Optional["_models.ConnectionServicePrincipal"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.SERVICE_PRINCIPAL] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. SERVICE_PRINCIPAL."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionServicePrincipal"] = None,
    ) -> None: ...

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


class ServiceTagOutboundRule(OutboundRule, discriminator="ServiceTag"):
    """Service Tag outbound rule for the managed network of a cognitive services account.

    :ivar category: Category of a managed network Outbound Rule of a cognitive services account.
     Known values are: "Required", "Recommended", "UserDefined", and "Dependency".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.RuleCategory
    :ivar status: Type of a managed network Outbound Rule of a cognitive services account. Known
     values are: "Inactive", "Active", "Provisioning", "Deleting", and "Failed".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.RuleStatus
    :ivar error_information: Error information about an outbound rule of a cognitive services
     account if RuleStatus is failed.
    :vartype error_information: str
    :ivar parent_rule_names:
    :vartype parent_rule_names: list[str]
    :ivar destination: Service Tag destination.
    :vartype destination: ~azure.mgmt.cognitiveservices.models.ServiceTagOutboundRuleDestination
    :ivar type: Type of a managed network Outbound Rule of a cognitive services account. Required.
     SERVICE_TAG.
    :vartype type: str or ~azure.mgmt.cognitiveservices.models.SERVICE_TAG
    """

    destination: Optional["_models.ServiceTagOutboundRuleDestination"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Service Tag destination."""
    type: Literal[RuleType.SERVICE_TAG] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Type of a managed network Outbound Rule of a cognitive services account. Required. SERVICE_TAG."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.RuleCategory"]] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
        destination: Optional["_models.ServiceTagOutboundRuleDestination"] = None,
    ) -> None: ...

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = RuleType.SERVICE_TAG  # type: ignore


class ServiceTagOutboundRuleDestination(_Model):
    """Service Tag destination for an outbound rule.

    :ivar service_tag: Name of the Azure service tag to target.
    :vartype service_tag: str
    :ivar protocol: Network protocol used by the service tag rule.
    :vartype protocol: str
    :ivar port_ranges: Destination port ranges.
    :vartype port_ranges: str
    :ivar action: The action for the service tag outbound rule. Known values are: "Allow" and
     "Deny".
    :vartype action: str or ~azure.mgmt.cognitiveservices.models.RuleAction
    :ivar address_prefixes: Optional address prefixes. If provided, the serviceTag property will be
     ignored.
    :vartype address_prefixes: list[str]
    """

    service_tag: Optional[str] = rest_field(
        name="serviceTag", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the Azure service tag to target."""
    protocol: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Network protocol used by the service tag rule."""
    port_ranges: Optional[str] = rest_field(
        name="portRanges", visibility=["read", "create", "update", "delete", "query"]
    )
    """Destination port ranges."""
    action: Optional[Union[str, "_models.RuleAction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action for the service tag outbound rule. Known values are: \"Allow\" and \"Deny\"."""
    address_prefixes: Optional[list[str]] = rest_field(
        name="addressPrefixes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional address prefixes. If provided, the serviceTag property will be ignored."""

    @overload
    def __init__(
        self,
        *,
        service_tag: Optional[str] = None,
        protocol: Optional[str] = None,
        port_ranges: Optional[str] = None,
        action: Optional[Union[str, "_models.RuleAction"]] = None,
        address_prefixes: Optional[list[str]] = None,
    ) -> None: ...

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

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


class Sku(_Model):
    """The resource model definition representing SKU.

    :ivar name: The name of the SKU. Ex - P3. It is typically a letter+number code. Required.
    :vartype name: str
    :ivar tier: This field is required to be implemented by the Resource Provider if the service
     has more than one tier, but is not required on a PUT. Known values are: "Free", "Basic",
     "Standard", "Premium", and "Enterprise".
    :vartype tier: str or ~azure.mgmt.cognitiveservices.models.SkuTier
    :ivar size: The SKU size. When the name field is the combination of tier and some other value,
     this would be the standalone code.
    :vartype size: str
    :ivar family: If the service has different generations of hardware, for the same SKU, then that
     can be captured here.
    :vartype family: str
    :ivar capacity: If the SKU supports scale out/in then the capacity integer should be included.
     If scale out/in is not possible for the resource this may be omitted.
    :vartype capacity: int
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the SKU. Ex - P3. It is typically a letter+number code. Required."""
    tier: Optional[Union[str, "_models.SkuTier"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """This field is required to be implemented by the Resource Provider if the service has more than
     one tier, but is not required on a PUT. Known values are: \"Free\", \"Basic\", \"Standard\",
     \"Premium\", and \"Enterprise\"."""
    size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The SKU size. When the name field is the combination of tier and some other value, this would
     be the standalone code."""
    family: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If the service has different generations of hardware, for the same SKU, then that can be
     captured here."""
    capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If the SKU supports scale out/in then the capacity integer should be included. If scale out/in
     is not possible for the resource this may be omitted."""

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

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

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


class SkuAvailability(_Model):
    """SKU availability.

    :ivar kind: The kind (type) of cognitive service account.
    :vartype kind: str
    :ivar type: The Type of the resource.
    :vartype type: str
    :ivar sku_name: The name of SKU.
    :vartype sku_name: str
    :ivar sku_available: Indicates the given SKU is available or not.
    :vartype sku_available: bool
    :ivar reason: Reason why the SKU is not available.
    :vartype reason: str
    :ivar message: Additional error message.
    :vartype message: str
    """

    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind (type) of cognitive service account."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Type of the resource."""
    sku_name: Optional[str] = rest_field(name="skuName", visibility=["read", "create", "update", "delete", "query"])
    """The name of SKU."""
    sku_available: Optional[bool] = rest_field(
        name="skuAvailable", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the given SKU is available or not."""
    reason: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Reason why the SKU is not available."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Additional error message."""

    @overload
    def __init__(
        self,
        *,
        kind: Optional[str] = None,
        type: Optional[str] = None,
        sku_name: Optional[str] = None,
        sku_available: Optional[bool] = None,
        reason: 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 SkuAvailabilityListResult(_Model):
    """Check SKU availability result list.

    :ivar value: Check SKU availability result list.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.SkuAvailability]
    """

    value: Optional[list["_models.SkuAvailability"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Check SKU availability result list."""

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

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

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


class SkuCapability(_Model):
    """SkuCapability indicates the capability of a certain feature.

    :ivar name: The name of the SkuCapability.
    :vartype name: str
    :ivar value: The value of the SkuCapability.
    :vartype value: str
    """

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

    @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 SkuChangeInfo(_Model):
    """Sku change info of account.

    :ivar count_of_downgrades: Gets the count of downgrades.
    :vartype count_of_downgrades: float
    :ivar count_of_upgrades_after_downgrades: Gets the count of upgrades after downgrades.
    :vartype count_of_upgrades_after_downgrades: float
    :ivar last_change_date: Gets the last change date.
    :vartype last_change_date: str
    """

    count_of_downgrades: Optional[float] = rest_field(
        name="countOfDowngrades", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the count of downgrades."""
    count_of_upgrades_after_downgrades: Optional[float] = rest_field(
        name="countOfUpgradesAfterDowngrades", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the count of upgrades after downgrades."""
    last_change_date: Optional[str] = rest_field(
        name="lastChangeDate", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the last change date."""

    @overload
    def __init__(
        self,
        *,
        count_of_downgrades: Optional[float] = None,
        count_of_upgrades_after_downgrades: Optional[float] = None,
        last_change_date: 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 SkuResource(_Model):
    """Properties of Cognitive Services account resource sku resource properties.

    :ivar resource_type: The resource type name.
    :vartype resource_type: str
    :ivar sku: The resource model definition representing SKU.
    :vartype sku: ~azure.mgmt.cognitiveservices.models.Sku
    :ivar capacity: The capacity configuration.
    :vartype capacity: ~azure.mgmt.cognitiveservices.models.CapacityConfig
    """

    resource_type: Optional[str] = rest_field(
        name="resourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource type name."""
    sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource model definition representing SKU."""
    capacity: Optional["_models.CapacityConfig"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The capacity configuration."""

    @overload
    def __init__(
        self,
        *,
        resource_type: Optional[str] = None,
        sku: Optional["_models.Sku"] = None,
        capacity: Optional["_models.CapacityConfig"] = None,
    ) -> None: ...

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

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


class SystemData(_Model):
    """Metadata pertaining to creation and last modification of the resource.

    :ivar created_by: The identity that created the resource.
    :vartype created_by: str
    :ivar created_by_type: The type of identity that created the resource. Known values are:
     "User", "Application", "ManagedIdentity", and "Key".
    :vartype created_by_type: str or ~azure.mgmt.cognitiveservices.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.cognitiveservices.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 ThrottlingRule(_Model):
    """ThrottlingRule.

    :ivar key:
    :vartype key: str
    :ivar renewal_period:
    :vartype renewal_period: float
    :ivar count:
    :vartype count: float
    :ivar min_count:
    :vartype min_count: float
    :ivar dynamic_throttling_enabled:
    :vartype dynamic_throttling_enabled: bool
    :ivar match_patterns:
    :vartype match_patterns: list[~azure.mgmt.cognitiveservices.models.RequestMatchPattern]
    """

    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    renewal_period: Optional[float] = rest_field(
        name="renewalPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    count: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    min_count: Optional[float] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"])
    dynamic_throttling_enabled: Optional[bool] = rest_field(
        name="dynamicThrottlingEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    match_patterns: Optional[list["_models.RequestMatchPattern"]] = rest_field(
        name="matchPatterns", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        key: Optional[str] = None,
        renewal_period: Optional[float] = None,
        count: Optional[float] = None,
        min_count: Optional[float] = None,
        dynamic_throttling_enabled: Optional[bool] = None,
        match_patterns: Optional[list["_models.RequestMatchPattern"]] = None,
    ) -> None: ...

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

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


class TrafficRoutingRule(_Model):
    """Represents a rule for routing traffic to a specific deployment.

    :ivar rule_id: The identifier of this traffic routing rule.
    :vartype rule_id: str
    :ivar description: A user-provided description for this traffic routing rule.
    :vartype description: str
    :ivar deployment_id: The unique identifier of the deployment to which traffic is routed by this
     rule.
    :vartype deployment_id: str
    :ivar traffic_percentage: Gets or sets the percentage of traffic allocated to this instance.
    :vartype traffic_percentage: int
    """

    rule_id: Optional[str] = rest_field(name="ruleId", visibility=["read", "create", "update", "delete", "query"])
    """The identifier of this traffic routing rule."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A user-provided description for this traffic routing rule."""
    deployment_id: Optional[str] = rest_field(
        name="deploymentId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unique identifier of the deployment to which traffic is routed by this rule."""
    traffic_percentage: Optional[int] = rest_field(
        name="trafficPercentage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the percentage of traffic allocated to this instance."""

    @overload
    def __init__(
        self,
        *,
        rule_id: Optional[str] = None,
        description: Optional[str] = None,
        deployment_id: Optional[str] = None,
        traffic_percentage: 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 Usage(_Model):
    """The usage data for a usage request.

    :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent",
     "CountPerSecond", "BytesPerSecond", and "Milliseconds".
    :vartype unit: str or ~azure.mgmt.cognitiveservices.models.UnitType
    :ivar name: The name information for the metric.
    :vartype name: ~azure.mgmt.cognitiveservices.models.MetricName
    :ivar quota_period: The quota period used to summarize the usage values.
    :vartype quota_period: str
    :ivar limit: Maximum value for this metric.
    :vartype limit: float
    :ivar current_value: Current value for this metric.
    :vartype current_value: float
    :ivar next_reset_time: Next reset time for current quota.
    :vartype next_reset_time: str
    :ivar status: Cognitive Services account quota usage status. Known values are: "Included",
     "Blocked", "InOverage", and "Unknown".
    :vartype status: str or ~azure.mgmt.cognitiveservices.models.QuotaUsageStatus
    :ivar scope_type: The scope type of the quota usage. Known values are: "Regional", "Global",
     "DataZone", and "Classic".
    :vartype scope_type: str or ~azure.mgmt.cognitiveservices.models.QuotaScopeType
    :ivar scope_id: The scope identifier of the quota usage.
    :vartype scope_id: str
    """

    unit: Optional[Union[str, "_models.UnitType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The unit of the metric. Known values are: \"Count\", \"Bytes\", \"Seconds\", \"Percent\",
     \"CountPerSecond\", \"BytesPerSecond\", and \"Milliseconds\"."""
    name: Optional["_models.MetricName"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name information for the metric."""
    quota_period: Optional[str] = rest_field(
        name="quotaPeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """The quota period used to summarize the usage values."""
    limit: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Maximum value for this metric."""
    current_value: Optional[float] = rest_field(
        name="currentValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """Current value for this metric."""
    next_reset_time: Optional[str] = rest_field(
        name="nextResetTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """Next reset time for current quota."""
    status: Optional[Union[str, "_models.QuotaUsageStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Cognitive Services account quota usage status. Known values are: \"Included\", \"Blocked\",
     \"InOverage\", and \"Unknown\"."""
    scope_type: Optional[Union[str, "_models.QuotaScopeType"]] = rest_field(
        name="scopeType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scope type of the quota usage. Known values are: \"Regional\", \"Global\", \"DataZone\",
     and \"Classic\"."""
    scope_id: Optional[str] = rest_field(name="scopeId", visibility=["read", "create", "update", "delete", "query"])
    """The scope identifier of the quota usage."""

    @overload
    def __init__(
        self,
        *,
        unit: Optional[Union[str, "_models.UnitType"]] = None,
        name: Optional["_models.MetricName"] = None,
        quota_period: Optional[str] = None,
        limit: Optional[float] = None,
        current_value: Optional[float] = None,
        next_reset_time: Optional[str] = None,
        status: Optional[Union[str, "_models.QuotaUsageStatus"]] = None,
        scope_type: Optional[Union[str, "_models.QuotaScopeType"]] = None,
        scope_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 UsageListResult(_Model):
    """The response to a list usage request.

    :ivar next_link: The link used to get the next page of Usages.
    :vartype next_link: str
    :ivar value: The list of usages for Cognitive Service account.
    :vartype value: list[~azure.mgmt.cognitiveservices.models.Usage]
    """

    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
    """The link used to get the next page of Usages."""
    value: Optional[list["_models.Usage"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of usages for Cognitive Service account."""

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

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

    :ivar principal_id: Azure Active Directory principal ID associated with this Identity.
    :vartype principal_id: str
    :ivar client_id: Client App Id associated with this identity.
    :vartype client_id: str
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """Azure Active Directory principal ID associated with this Identity."""
    client_id: Optional[str] = rest_field(name="clientId", visibility=["read"])
    """Client App Id associated with this identity."""


class UsernamePasswordAuthTypeConnectionProperties(
    ConnectionPropertiesV2, discriminator="UsernamePassword"
):  # pylint: disable=name-too-long
    """UsernamePasswordAuthTypeConnectionProperties.

    :ivar category: Category of the connection. Known values are: "PythonFeed",
     "ContainerRegistry", "Git", "S3", "Snowflake", "AzureKeyVault", "AzureSqlDb",
     "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2",
     "AzureContainerAppEnvironment", "Redis", "ApiKey", "AzureOpenAI", "AIServices",
     "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureStorageAccount",
     "AzureOneLake", "CosmosDb", "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb",
     "AzureDatabricksDeltaLake", "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle",
     "AmazonRdsForSqlServer", "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum",
     "Hbase", "Hive", "Impala", "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza",
     "Oracle", "Phoenix", "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable",
     "Spark", "SqlServer", "Sybase", "Teradata", "Vertica", "Pinecone", "Databricks", "Cassandra",
     "Couchbase", "MongoDbV2", "MongoDbAtlas", "AmazonS3Compatible", "FileServer", "FtpServer",
     "GoogleCloudStorage", "Hdfs", "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc",
     "GenericRest", "RemoteTool", "AmazonMws", "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm",
     "GoogleAdWords", "Hubspot", "Jira", "Magento", "Marketo", "Office365", "Eloqua", "Responsys",
     "OracleServiceCloud", "PayPal", "QuickBooks", "Salesforce", "SalesforceServiceCloud",
     "SalesforceMarketingCloud", "SapCloudForCustomer", "SapEcc", "ServiceNow",
     "SharePointOnlineList", "Shopify", "Square", "WebTable", "Xero", "Zoho",
     "GenericContainerRegistry", "Elasticsearch", "AppInsights", "AppConfig", "OpenAI", "Serp",
     "BingLLMSearch", "Serverless", "ManagedOnlineEndpoint", "ApiManagement", "ModelGateway",
     "GroundingWithBingSearch", "GroundingWithCustomSearch", "Sharepoint", "MicrosoftFabric",
     "PowerPlatformEnvironment", and "RemoteA2A".
    :vartype category: str or ~azure.mgmt.cognitiveservices.models.ConnectionCategory
    :ivar created_by_workspace_arm_id:
    :vartype created_by_workspace_arm_id: str
    :ivar error: Provides the error message if the connection fails.
    :vartype error: str
    :ivar expiry_time:
    :vartype expiry_time: ~datetime.datetime
    :ivar group: Group based on connection category. Known values are: "Azure", "AzureAI",
     "Database", "NoSQL", "File", "GenericProtocol", and "ServicesAndApps".
    :vartype group: str or ~azure.mgmt.cognitiveservices.models.ConnectionGroup
    :ivar is_shared_to_all:
    :vartype is_shared_to_all: bool
    :ivar metadata: Store user metadata for this connection.
    :vartype metadata: dict[str, str]
    :ivar pe_requirement: Specifies how private endpoints are used with this connection:
     'Required', 'NotRequired', or 'NotApplicable'. Known values are: "Required", "NotRequired", and
     "NotApplicable".
    :vartype pe_requirement: str or ~azure.mgmt.cognitiveservices.models.ManagedPERequirement
    :ivar pe_status: Specifies the status of private endpoints for this connection: 'Inactive',
     'Active', or 'NotApplicable'. Known values are: "Inactive", "Active", and "NotApplicable".
    :vartype pe_status: str or ~azure.mgmt.cognitiveservices.models.ManagedPEStatus
    :ivar shared_user_list:
    :vartype shared_user_list: list[str]
    :ivar target: The connection URL to be used.
    :vartype target: str
    :ivar use_workspace_managed_identity:
    :vartype use_workspace_managed_identity: bool
    :ivar credentials:
    :vartype credentials: ~azure.mgmt.cognitiveservices.models.ConnectionUsernamePassword
    :ivar auth_type: Authentication type of the connection target. Required. USERNAME_PASSWORD.
    :vartype auth_type: str or ~azure.mgmt.cognitiveservices.models.USERNAME_PASSWORD
    """

    credentials: Optional["_models.ConnectionUsernamePassword"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    auth_type: Literal[ConnectionAuthType.USERNAME_PASSWORD] = rest_discriminator(name="authType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Authentication type of the connection target. Required. USERNAME_PASSWORD."""

    @overload
    def __init__(
        self,
        *,
        category: Optional[Union[str, "_models.ConnectionCategory"]] = None,
        error: Optional[str] = None,
        expiry_time: Optional[datetime.datetime] = None,
        is_shared_to_all: Optional[bool] = None,
        metadata: Optional[dict[str, str]] = None,
        pe_requirement: Optional[Union[str, "_models.ManagedPERequirement"]] = None,
        pe_status: Optional[Union[str, "_models.ManagedPEStatus"]] = None,
        shared_user_list: Optional[list[str]] = None,
        target: Optional[str] = None,
        use_workspace_managed_identity: Optional[bool] = None,
        credentials: Optional["_models.ConnectionUsernamePassword"] = None,
    ) -> None: ...

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


class UserOwnedAmlWorkspace(_Model):
    """The user owned AML account for Cognitive Services account.

    :ivar resource_id: Full resource id of a AML account resource.
    :vartype resource_id: str
    :ivar identity_client_id: Identity Client id of a AML account resource.
    :vartype identity_client_id: str
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Full resource id of a AML account resource."""
    identity_client_id: Optional[str] = rest_field(
        name="identityClientId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Identity Client id of a AML account resource."""

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

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

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


class UserOwnedStorage(_Model):
    """The user owned storage for Cognitive Services account.

    :ivar resource_id: Full resource id of a Microsoft.Storage resource.
    :vartype resource_id: str
    :ivar identity_client_id:
    :vartype identity_client_id: str
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Full resource id of a Microsoft.Storage resource."""
    identity_client_id: Optional[str] = rest_field(
        name="identityClientId", visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class VersionedAgentReference(AgentReferenceProperties):
    """Type modeling a reference to a version of an agent definition.

    :ivar agent_id: Gets the agent's unique identifier within the organization (subscription).
    :vartype agent_id: str
    :ivar agent_name: Gets the agent's name (unique within the project/app).
    :vartype agent_name: str
    :ivar agent_version: Gets the agent's version (unique for each agent lineage).
    :vartype agent_version: str
    """

    agent_version: Optional[str] = rest_field(
        name="agentVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets the agent's version (unique for each agent lineage)."""

    @overload
    def __init__(
        self,
        *,
        agent_id: Optional[str] = None,
        agent_name: Optional[str] = None,
        agent_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 VirtualNetworkRule(_Model):
    """A rule governing the accessibility from a specific virtual network.

    :ivar id: Full resource id of a vnet subnet, such as
     '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
     Required.
    :vartype id: str
    :ivar state: Gets the state of virtual network rule.
    :vartype state: str
    :ivar ignore_missing_vnet_service_endpoint: Ignore missing vnet service endpoint or not.
    :vartype ignore_missing_vnet_service_endpoint: bool
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Full resource id of a vnet subnet, such as
     '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
     Required."""
    state: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets the state of virtual network rule."""
    ignore_missing_vnet_service_endpoint: Optional[bool] = rest_field(
        name="ignoreMissingVnetServiceEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """Ignore missing vnet service endpoint or not."""

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

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

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