# 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.
# --------------------------------------------------------------------------

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

from .models._enums import ClientConnectionCountRuleDiscriminator, ClientTrafficControlRuleDiscriminator

if TYPE_CHECKING:
    from .models import (
        ACLAction,
        CreatedByType,
        FeatureFlags,
        KeyType,
        ManagedIdentityType,
        PrivateLinkServiceConnectionStatus,
        ProvisioningState,
        ScaleType,
        ServiceKind,
        SharedPrivateLinkResourceStatus,
        SignalRRequestType,
        SignalRSkuTier,
        UpstreamAuthType,
    )


class ApplicationFirewallSettings(TypedDict, total=False):
    """Application firewall settings for the resource.

    :ivar client_connection_count_rules: Rules to control the client connection count.
    :vartype client_connection_count_rules: list["ClientConnectionCountRule"]
    :ivar client_traffic_control_rules: Rules to control the client traffic.
    :vartype client_traffic_control_rules: list["ClientTrafficControlRule"]
    :ivar max_client_connection_lifetime_in_seconds: Config to control the client connection
     lifetime in seconds, can be set to 0 to disable the config.
    :vartype max_client_connection_lifetime_in_seconds: int
    """

    clientConnectionCountRules: list["ClientConnectionCountRule"]
    """Rules to control the client connection count."""
    clientTrafficControlRules: list["ClientTrafficControlRule"]
    """Rules to control the client traffic."""
    maxClientConnectionLifetimeInSeconds: int
    """Config to control the client connection lifetime in seconds, can be set to 0 to disable the
     config."""


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

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


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

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


class CustomCertificate(ProxyResource):
    """A custom certificate.

    :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: "SystemData"
    :ivar properties: Custom certificate properties. Required.
    :vartype properties: "CustomCertificateProperties"
    """

    properties: Required["CustomCertificateProperties"]
    """Custom certificate properties. Required."""


class CustomCertificateProperties(TypedDict, total=False):
    """Custom certificate properties.

    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar key_vault_base_uri: Base uri of the KeyVault that stores certificate. Required.
    :vartype key_vault_base_uri: str
    :ivar key_vault_secret_name: Certificate secret name. Required.
    :vartype key_vault_secret_name: str
    :ivar key_vault_secret_version: Certificate secret version.
    :vartype key_vault_secret_version: str
    """

    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    keyVaultBaseUri: Required[str]
    """Base uri of the KeyVault that stores certificate. Required."""
    keyVaultSecretName: Required[str]
    """Certificate secret name. Required."""
    keyVaultSecretVersion: str
    """Certificate secret version."""


class CustomDomain(ProxyResource):
    """A custom domain.

    :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: "SystemData"
    :ivar properties: Properties of a custom domain. Required.
    :vartype properties: "CustomDomainProperties"
    """

    properties: Required["CustomDomainProperties"]
    """Properties of a custom domain. Required."""


class CustomDomainProperties(TypedDict, total=False):
    """Properties of a custom domain.

    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar domain_name: The custom domain name. Required.
    :vartype domain_name: str
    :ivar custom_certificate: Reference to a resource. Required.
    :vartype custom_certificate: "ResourceReference"
    """

    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    domainName: Required[str]
    """The custom domain name. Required."""
    customCertificate: Required["ResourceReference"]
    """Reference to a resource. Required."""


class Dimension(TypedDict, total=False):
    """Specifications of the Dimension of metrics.

    :ivar name: The public facing name of the dimension.
    :vartype name: str
    :ivar display_name: Localized friendly display name of the dimension.
    :vartype display_name: str
    :ivar internal_name: Name of the dimension as it appears in MDM.
    :vartype internal_name: str
    :ivar to_be_exported_for_shoebox: A Boolean flag indicating whether this dimension should be
     included for the shoebox export scenario.
    :vartype to_be_exported_for_shoebox: bool
    """

    name: str
    """The public facing name of the dimension."""
    displayName: str
    """Localized friendly display name of the dimension."""
    internalName: str
    """Name of the dimension as it appears in MDM."""
    toBeExportedForShoebox: bool
    """A Boolean flag indicating whether this dimension should be included for the shoebox export
     scenario."""


class ErrorAdditionalInfo(TypedDict, total=False):
    """The resource management error additional info.

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

    type: str
    """The additional info type."""
    info: Any
    """The additional info."""


class ErrorDetail(TypedDict, total=False):
    """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["ErrorDetail"]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list["ErrorAdditionalInfo"]
    """

    code: str
    """The error code."""
    message: str
    """The error message."""
    target: str
    """The error target."""
    details: list["ErrorDetail"]
    """The error details."""
    additionalInfo: list["ErrorAdditionalInfo"]
    """The error additional info."""


class ErrorResponse(TypedDict, total=False):
    """Error response.

    :ivar error: The error object.
    :vartype error: "ErrorDetail"
    """

    error: "ErrorDetail"
    """The error object."""


class IPRule(TypedDict, total=False):
    """An IP rule.

    :ivar value: An IP or CIDR or ServiceTag.
    :vartype value: str
    :ivar action: Azure Networking ACL Action. Known values are: "Allow" and "Deny".
    :vartype action: Union[str, "ACLAction"]
    """

    value: str
    """An IP or CIDR or ServiceTag."""
    action: Union[str, "ACLAction"]
    """Azure Networking ACL Action. Known values are: \"Allow\" and \"Deny\"."""


class LiveTraceCategory(TypedDict, total=False):
    """Live trace category configuration of a Microsoft.SignalRService resource.

    :ivar name: Gets or sets the live trace category's name. Available values: ConnectivityLogs,
     MessagingLogs. Case insensitive.
    :vartype name: str
    :ivar enabled: Indicates whether or the live trace category is enabled. Available values: true,
     false. Case insensitive.
    :vartype enabled: str
    """

    name: str
    """Gets or sets the live trace category's name. Available values: ConnectivityLogs, MessagingLogs.
     Case insensitive."""
    enabled: str
    """Indicates whether or the live trace category is enabled. Available values: true, false. Case
     insensitive."""


class LiveTraceConfiguration(TypedDict, total=False):
    """Live trace configuration of a Microsoft.SignalRService resource.

    :ivar enabled: Indicates whether or not enable live trace. When it's set to true, live trace
     client can connect to the service. Otherwise, live trace client can't connect to the service,
     so that you are unable to receive any log, no matter what you configure in "categories".
     Available values: true, false. Case insensitive.
    :vartype enabled: str
    :ivar categories: Gets or sets the list of category configurations.
    :vartype categories: list["LiveTraceCategory"]
    """

    enabled: str
    """Indicates whether or not enable live trace. When it's set to true, live trace client can
     connect to the service. Otherwise, live trace client can't connect to the service, so that you
     are unable to receive any log, no matter what you configure in \"categories\". Available
     values: true, false. Case insensitive."""
    categories: list["LiveTraceCategory"]
    """Gets or sets the list of category configurations."""


class LogSpecification(TypedDict, total=False):
    """Specifications of the Logs for Azure Monitoring.

    :ivar name: Name of the log.
    :vartype name: str
    :ivar display_name: Localized friendly display name of the log.
    :vartype display_name: str
    """

    name: str
    """Name of the log."""
    displayName: str
    """Localized friendly display name of the log."""


class ManagedIdentity(TypedDict, total=False):
    """A class represent managed identities used for request and response.

    :ivar type: Represents the identity type: systemAssigned, userAssigned, None. Known values are:
     "None", "SystemAssigned", and "UserAssigned".
    :vartype type: Union[str, "ManagedIdentityType"]
    :ivar user_assigned_identities: Get or set the user assigned identities.
    :vartype user_assigned_identities: dict[str, "UserAssignedIdentityProperty"]
    :ivar principal_id: Get the principal id for the system assigned identity. Only be used in
     response.
    :vartype principal_id: str
    :ivar tenant_id: Get the tenant id for the system assigned identity. Only be used in response.
    :vartype tenant_id: str
    """

    type: Union[str, "ManagedIdentityType"]
    """Represents the identity type: systemAssigned, userAssigned, None. Known values are: \"None\",
     \"SystemAssigned\", and \"UserAssigned\"."""
    userAssignedIdentities: dict[str, "UserAssignedIdentityProperty"]
    """Get or set the user assigned identities."""
    principalId: str
    """Get the principal id for the system assigned identity. Only be used in response."""
    tenantId: str
    """Get the tenant id for the system assigned identity. Only be used in response."""


class ManagedIdentitySettings(TypedDict, total=False):
    """Managed identity settings for upstream.

    :ivar resource: The Resource indicating the App ID URI of the target resource. It also appears
     in the aud (audience) claim of the issued token.
    :vartype resource: str
    """

    resource: str
    """The Resource indicating the App ID URI of the target resource. It also appears in the aud
     (audience) claim of the issued token."""


class MetricSpecification(TypedDict, total=False):
    """Specifications of the Metrics for Azure Monitoring.

    :ivar name: Name of the metric.
    :vartype name: str
    :ivar display_name: Localized friendly display name of the metric.
    :vartype display_name: str
    :ivar display_description: Localized friendly description of the metric.
    :vartype display_description: str
    :ivar unit: The unit that makes sense for the metric.
    :vartype unit: str
    :ivar aggregation_type: Only provide one value for this field. Valid values: Average, Minimum,
     Maximum, Total, Count.
    :vartype aggregation_type: str
    :ivar fill_gap_with_zero: Optional. If set to true, then zero will be returned for time
     duration where no metric is emitted/published. Ex. a metric that returns the number of times a
     particular error code was emitted. The error code may not appear often, instead of the RP
     publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted.
    :vartype fill_gap_with_zero: str
    :ivar category: The name of the metric category that the metric belongs to. A metric can only
     belong to a single category.
    :vartype category: str
    :ivar dimensions: The dimensions of the metrics.
    :vartype dimensions: list["Dimension"]
    """

    name: str
    """Name of the metric."""
    displayName: str
    """Localized friendly display name of the metric."""
    displayDescription: str
    """Localized friendly description of the metric."""
    unit: str
    """The unit that makes sense for the metric."""
    aggregationType: str
    """Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count."""
    fillGapWithZero: str
    """Optional. If set to true, then zero will be returned for time duration where no metric is
     emitted/published. Ex. a metric that returns the number of times a particular error code was
     emitted. The error code may not appear often, instead of the RP publishing 0, Shoebox can auto
     fill in 0s for time periods where nothing was emitted."""
    category: str
    """The name of the metric category that the metric belongs to. A metric can only belong to a
     single category."""
    dimensions: list["Dimension"]
    """The dimensions of the metrics."""


class NameAvailability(TypedDict, total=False):
    """Result of the request to check name availability. It contains a flag and possible reason of
    failure.

    :ivar name_available: Indicates whether the name is available or not.
    :vartype name_available: bool
    :ivar reason: The reason of the availability. Required if name is not available.
    :vartype reason: str
    :ivar message: The message of the operation.
    :vartype message: str
    """

    nameAvailable: bool
    """Indicates whether the name is available or not."""
    reason: str
    """The reason of the availability. Required if name is not available."""
    message: str
    """The message of the operation."""


class NameAvailabilityParameters(TypedDict, total=False):
    """Data POST-ed to the nameAvailability action.

    :ivar type: The resource type. Can be "Microsoft.SignalRService/SignalR",
     "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas" or
     "Microsoft.SignalRService/WebPubSub/replicas". Required.
    :vartype type: str
    :ivar name: The resource name to validate. e.g."my-resource-name". Required.
    :vartype name: str
    """

    type: Required[str]
    """The resource type. Can be \"Microsoft.SignalRService/SignalR\",
     \"Microsoft.SignalRService/WebPubSub\", \"Microsoft.SignalRService/SignalR/replicas\" or
     \"Microsoft.SignalRService/WebPubSub/replicas\". Required."""
    name: Required[str]
    """The resource name to validate. e.g.\"my-resource-name\". Required."""


class NetworkACL(TypedDict, total=False):
    """Network ACL.

    :ivar allow: Allowed request types. The value can be one or more of: ClientConnection,
     ServerConnection, RESTAPI.
    :vartype allow: list[Union[str, "SignalRRequestType"]]
    :ivar deny: Denied request types. The value can be one or more of: ClientConnection,
     ServerConnection, RESTAPI.
    :vartype deny: list[Union[str, "SignalRRequestType"]]
    """

    allow: list[Union[str, "SignalRRequestType"]]
    """Allowed request types. The value can be one or more of: ClientConnection, ServerConnection,
     RESTAPI."""
    deny: list[Union[str, "SignalRRequestType"]]
    """Denied request types. The value can be one or more of: ClientConnection, ServerConnection,
     RESTAPI."""


class Operation(TypedDict, total=False):
    """REST API operation supported by resource provider.

    :ivar name: Name of the operation with format: {provider}/{resource}/{operation}.
    :vartype name: str
    :ivar is_data_action: If the operation is a data action. (for data plane rbac).
    :vartype is_data_action: bool
    :ivar display: The object that describes a operation.
    :vartype display: "OperationDisplay"
    :ivar origin: Optional. The intended executor of the operation; governs the display of the
     operation in the RBAC UX and the audit logs UX.
    :vartype origin: str
    :ivar properties: Extra Operation properties.
    :vartype properties: "OperationProperties"
    """

    name: str
    """Name of the operation with format: {provider}/{resource}/{operation}."""
    isDataAction: bool
    """If the operation is a data action. (for data plane rbac)."""
    display: "OperationDisplay"
    """The object that describes a operation."""
    origin: str
    """Optional. The intended executor of the operation; governs the display of the operation in the
     RBAC UX and the audit logs UX."""
    properties: "OperationProperties"
    """Extra Operation properties."""


class OperationDisplay(TypedDict, total=False):
    """The object that describes a operation.

    :ivar provider: Friendly name of the resource provider.
    :vartype provider: str
    :ivar resource: Resource type on which the operation is performed.
    :vartype resource: str
    :ivar operation: The localized friendly name for the operation.
    :vartype operation: str
    :ivar description: The localized friendly description for the operation.
    :vartype description: str
    """

    provider: str
    """Friendly name of the resource provider."""
    resource: str
    """Resource type on which the operation is performed."""
    operation: str
    """The localized friendly name for the operation."""
    description: str
    """The localized friendly description for the operation."""


class OperationProperties(TypedDict, total=False):
    """Extra Operation properties.

    :ivar service_specification: An object that describes a specification.
    :vartype service_specification: "ServiceSpecification"
    """

    serviceSpecification: "ServiceSpecification"
    """An object that describes a specification."""


class PrivateEndpoint(TypedDict, total=False):
    """Private endpoint.

    :ivar id: Full qualified Id of the private endpoint.
    :vartype id: str
    """

    id: str
    """Full qualified Id of the private endpoint."""


class PrivateEndpointACL(NetworkACL):
    """ACL for a private endpoint.

    :ivar allow: Allowed request types. The value can be one or more of: ClientConnection,
     ServerConnection, RESTAPI.
    :vartype allow: list[Union[str, "SignalRRequestType"]]
    :ivar deny: Denied request types. The value can be one or more of: ClientConnection,
     ServerConnection, RESTAPI.
    :vartype deny: list[Union[str, "SignalRRequestType"]]
    :ivar name: Name of the private endpoint connection. Required.
    :vartype name: str
    """

    name: Required[str]
    """Name of the private endpoint connection. Required."""


class PrivateEndpointConnection(ProxyResource):
    """A private endpoint connection to an azure 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: "SystemData"
    :ivar properties: Private endpoint connection properties.
    :vartype properties: "PrivateEndpointConnectionProperties"
    """

    properties: "PrivateEndpointConnectionProperties"
    """Private endpoint connection properties."""


class PrivateEndpointConnectionProperties(TypedDict, total=False):
    """Private endpoint connection properties.

    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar private_endpoint: Private endpoint.
    :vartype private_endpoint: "PrivateEndpoint"
    :ivar group_ids: Group IDs.
    :vartype group_ids: list[str]
    :ivar private_link_service_connection_state: Connection state of the private endpoint
     connection.
    :vartype private_link_service_connection_state: "PrivateLinkServiceConnectionState"
    """

    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    privateEndpoint: "PrivateEndpoint"
    """Private endpoint."""
    groupIds: list[str]
    """Group IDs."""
    privateLinkServiceConnectionState: "PrivateLinkServiceConnectionState"
    """Connection state of the private endpoint connection."""


class PrivateLinkResource(ProxyResource):
    """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: "SystemData"
    :ivar properties: Private link resource properties.
    :vartype properties: "PrivateLinkResourceProperties"
    """

    properties: "PrivateLinkResourceProperties"
    """Private link resource properties."""


class PrivateLinkResourceProperties(TypedDict, total=False):
    """Private link resource properties.

    :ivar group_id: Group Id of the private link resource.
    :vartype group_id: str
    :ivar required_members: Required members of the private link resource.
    :vartype required_members: list[str]
    :ivar required_zone_names: Required private DNS zone names.
    :vartype required_zone_names: list[str]
    :ivar shareable_private_link_resource_types: The list of resources that are onboarded to
     private link service.
    :vartype shareable_private_link_resource_types: list["ShareablePrivateLinkResourceType"]
    """

    groupId: str
    """Group Id of the private link resource."""
    requiredMembers: list[str]
    """Required members of the private link resource."""
    requiredZoneNames: list[str]
    """Required private DNS zone names."""
    shareablePrivateLinkResourceTypes: list["ShareablePrivateLinkResourceType"]
    """The list of resources that are onboarded to private link service."""


class PrivateLinkServiceConnectionState(TypedDict, total=False):
    """Connection state of the private endpoint connection.

    :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
     of the service. Known values are: "Pending", "Approved", "Rejected", and "Disconnected".
    :vartype status: Union[str, "PrivateLinkServiceConnectionStatus"]
    :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: Union[str, "PrivateLinkServiceConnectionStatus"]
    """Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
     service. Known values are: \"Pending\", \"Approved\", \"Rejected\", and \"Disconnected\"."""
    description: str
    """The reason for approval/rejection of the connection."""
    actionsRequired: str
    """A message indicating if changes on the service provider require any updates on the consumer."""


class RegenerateKeyParameters(TypedDict, total=False):
    """Parameters describes the request to regenerate access keys.

    :ivar key_type: The type of access key. Known values are: "Primary", "Secondary", and "Salt".
    :vartype key_type: Union[str, "KeyType"]
    """

    keyType: Union[str, "KeyType"]
    """The type of access key. Known values are: \"Primary\", \"Secondary\", and \"Salt\"."""


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

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

    tags: dict[str, str]
    """Resource tags."""
    location: Required[str]
    """The geo-location where the resource lives. Required."""


class Replica(TrackedResource):
    """A class represent a replica 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: "SystemData"
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties:
    :vartype properties: "ReplicaProperties"
    :ivar sku: The billing information of the resource.
    :vartype sku: "ResourceSku"
    """

    properties: "ReplicaProperties"
    sku: "ResourceSku"
    """The billing information of the resource."""


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

    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar region_endpoint_enabled: Enable or disable the regional endpoint. Default to "Enabled".
     When it's Disabled, new connections will not be routed to this endpoint, however existing
     connections will not be affected.
    :vartype region_endpoint_enabled: str
    :ivar resource_stopped: Stop or start the resource.  Default to "false". When it's true, the
     data plane of the resource is shutdown. When it's false, the data plane of the resource is
     started.
    :vartype resource_stopped: str
    """

    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    regionEndpointEnabled: str
    """Enable or disable the regional endpoint. Default to \"Enabled\". When it's Disabled, new
     connections will not be routed to this endpoint, however existing connections will not be
     affected."""
    resourceStopped: str
    """Stop or start the resource.  Default to \"false\". When it's true, the data plane of the
     resource is shutdown. When it's false, the data plane of the resource is started."""


class ResourceLogCategory(TypedDict, total=False):
    """Resource log category configuration of a Microsoft.SignalRService resource.

    :ivar name: Gets or sets the resource log category's name. Available values: ConnectivityLogs,
     MessagingLogs. Case insensitive.
    :vartype name: str
    :ivar enabled: Indicates whether or the resource log category is enabled. Available values:
     true, false. Case insensitive.
    :vartype enabled: str
    """

    name: str
    """Gets or sets the resource log category's name. Available values: ConnectivityLogs,
     MessagingLogs. Case insensitive."""
    enabled: str
    """Indicates whether or the resource log category is enabled. Available values: true, false. Case
     insensitive."""


class ResourceLogConfiguration(TypedDict, total=False):
    """Resource log configuration of a Microsoft.SignalRService resource.

    :ivar categories: Gets or sets the list of category configurations.
    :vartype categories: list["ResourceLogCategory"]
    """

    categories: list["ResourceLogCategory"]
    """Gets or sets the list of category configurations."""


class ResourceReference(TypedDict, total=False):
    """Reference to a resource.

    :ivar id: Resource ID.
    :vartype id: str
    """

    id: str
    """Resource ID."""


class ResourceSku(TypedDict, total=False):
    """The billing information of the resource.

    :ivar name: The name of the SKU. Required.

     Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2. Required.
    :vartype name: str
    :ivar tier: Optional tier of this particular SKU. 'Standard' or 'Free'.

     ``Basic`` is deprecated, use ``Standard`` instead. Known values are: "Free", "Basic",
     "Standard", and "Premium".
    :vartype tier: Union[str, "SignalRSkuTier"]
    :ivar size: Not used. Retained for future use.
    :vartype size: str
    :ivar family: Not used. Retained for future use.
    :vartype family: str
    :ivar capacity: Optional, integer. The unit count of the resource.
     1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default.

     If present, following values are allowed:
     Free_F1: 1;
     Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
     Premium_P1:  1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
     Premium_P2:  100,200,300,400,500,600,700,800,900,1000;.
    :vartype capacity: int
    """

    name: Required[str]
    """The name of the SKU. Required.
     
     Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2. Required."""
    tier: Union[str, "SignalRSkuTier"]
    """Optional tier of this particular SKU. 'Standard' or 'Free'.
     
     ``Basic`` is deprecated, use ``Standard`` instead. Known values are: \"Free\", \"Basic\",
     \"Standard\", and \"Premium\"."""
    size: str
    """Not used. Retained for future use."""
    family: str
    """Not used. Retained for future use."""
    capacity: int
    """Optional, integer. The unit count of the resource.
     1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default.
     
     If present, following values are allowed:
     Free_F1: 1;
     Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
     Premium_P1:  1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
     Premium_P2:  100,200,300,400,500,600,700,800,900,1000;."""


class RouteSettings(TypedDict, total=False):
    """Route settings for the resource.

    :ivar server_balance_weight: Gets or sets the server balance weight. A higher value means a
     greater balance of client connections across different app server instances. A value of 0
     distributes connections randomly, while a value of 255 ensures maximum balancing. The default
     value is 255. Recommended ``255`` for multiple app servers in same size.
    :vartype server_balance_weight: int
    :ivar connection_balance_weight: Gets or sets the connection balance weight. A higher value
     means a greater balance of client connections across different server connections. A value of 0
     distributes connections randomly, while a value of 255 ensures maximum balancing. The default
     value is 255. Recommended ``255`` for all of the cases.
    :vartype connection_balance_weight: int
    :ivar latency_weight: Gets or sets the weight for latency-based routing. A higher value
     increases the influence of latency-based routing. A value of 0 disables latency-based routing
     entirely, while a value of 255 enables it fully. The default value is 0. Recommended ``255``
     for replicas or app servers in different regions for disaster recovery.
    :vartype latency_weight: int
    """

    serverBalanceWeight: int
    """Gets or sets the server balance weight. A higher value means a greater balance of client
     connections across different app server instances. A value of 0 distributes connections
     randomly, while a value of 255 ensures maximum balancing. The default value is 255. Recommended
     ``255`` for multiple app servers in same size."""
    connectionBalanceWeight: int
    """Gets or sets the connection balance weight. A higher value means a greater balance of client
     connections across different server connections. A value of 0 distributes connections randomly,
     while a value of 255 ensures maximum balancing. The default value is 255. Recommended ``255``
     for all of the cases."""
    latencyWeight: int
    """Gets or sets the weight for latency-based routing. A higher value increases the influence of
     latency-based routing. A value of 0 disables latency-based routing entirely, while a value of
     255 enables it fully. The default value is 0. Recommended ``255`` for replicas or app servers
     in different regions for disaster recovery."""


class ServerlessSettings(TypedDict, total=False):
    """Serverless settings.

    :ivar connection_timeout_in_seconds: Gets or sets Client Connection Timeout. Optional to be
     set. Value in seconds. Default value is 30 seconds. Customer should set the timeout to a
     shorter period if messages are expected to be sent in shorter intervals, and want the client to
     disconnect more quickly after the last message is sent. You can set the timeout to a longer
     period if messages are expected to be sent in longer intervals, and they want to keep the same
     client connection alive during this session. The service considers the client disconnected if
     it hasn't received a message (including keep-alive) in this interval.
    :vartype connection_timeout_in_seconds: int
    :ivar keep_alive_interval_in_seconds: Gets or sets the Keep-Alive Interval. Optional to set.
     Value is in seconds. The default value is 15 seconds. Customers should set this value to a
     shorter period if they want the service to send keep-alive messages more frequently, ensuring
     timely checks of the connection status. Conversely, customers can set this value to a longer
     period if they want the service to send keep-alive messages less frequently, reducing network
     traffic, but note that it may take longer to detect a disconnection. This interval ensures that
     the connection is maintained by sending periodic keep-alive messages to the client.
    :vartype keep_alive_interval_in_seconds: int
    """

    connectionTimeoutInSeconds: int
    """Gets or sets Client Connection Timeout. Optional to be set. Value in seconds. Default value is
     30 seconds. Customer should set the timeout to a shorter period if messages are expected to be
     sent in shorter intervals, and want the client to disconnect more quickly after the last
     message is sent. You can set the timeout to a longer period if messages are expected to be sent
     in longer intervals, and they want to keep the same client connection alive during this
     session. The service considers the client disconnected if it hasn't received a message
     (including keep-alive) in this interval."""
    keepAliveIntervalInSeconds: int
    """Gets or sets the Keep-Alive Interval. Optional to set. Value is in seconds. The default value
     is 15 seconds. Customers should set this value to a shorter period if they want the service to
     send keep-alive messages more frequently, ensuring timely checks of the connection status.
     Conversely, customers can set this value to a longer period if they want the service to send
     keep-alive messages less frequently, reducing network traffic, but note that it may take longer
     to detect a disconnection. This interval ensures that the connection is maintained by sending
     periodic keep-alive messages to the client."""


class ServerlessUpstreamSettings(TypedDict, total=False):
    """The settings for the Upstream when the service is in server-less mode.

    :ivar templates: Gets or sets the list of Upstream URL templates. Order matters, and the first
     matching template takes effects.
    :vartype templates: list["UpstreamTemplate"]
    """

    templates: list["UpstreamTemplate"]
    """Gets or sets the list of Upstream URL templates. Order matters, and the first matching template
     takes effects."""


class ServiceSpecification(TypedDict, total=False):
    """An object that describes a specification.

    :ivar metric_specifications: Specifications of the Metrics for Azure Monitoring.
    :vartype metric_specifications: list["MetricSpecification"]
    :ivar log_specifications: Specifications of the Logs for Azure Monitoring.
    :vartype log_specifications: list["LogSpecification"]
    """

    metricSpecifications: list["MetricSpecification"]
    """Specifications of the Metrics for Azure Monitoring."""
    logSpecifications: list["LogSpecification"]
    """Specifications of the Logs for Azure Monitoring."""


class ShareablePrivateLinkResourceProperties(TypedDict, total=False):
    """Describes the properties of a resource type that has been onboarded to private link service.

    :ivar description: The description of the resource type that has been onboarded to private link
     service.
    :vartype description: str
    :ivar group_id: The resource provider group id for the resource that has been onboarded to
     private link service.
    :vartype group_id: str
    :ivar type: The resource provider type for the resource that has been onboarded to private link
     service.
    :vartype type: str
    """

    description: str
    """The description of the resource type that has been onboarded to private link service."""
    groupId: str
    """The resource provider group id for the resource that has been onboarded to private link
     service."""
    type: str
    """The resource provider type for the resource that has been onboarded to private link service."""


class ShareablePrivateLinkResourceType(TypedDict, total=False):
    """Describes a  resource type that has been onboarded to private link service.

    :ivar name: The name of the resource type that has been onboarded to private link service.
    :vartype name: str
    :ivar properties: Describes the properties of a resource type that has been onboarded to
     private link service.
    :vartype properties: "ShareablePrivateLinkResourceProperties"
    """

    name: str
    """The name of the resource type that has been onboarded to private link service."""
    properties: "ShareablePrivateLinkResourceProperties"
    """Describes the properties of a resource type that has been onboarded to private link service."""


class SharedPrivateLinkResource(ProxyResource):
    """Describes a Shared 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: "SystemData"
    :ivar properties: Describes the properties of an existing Shared Private Link Resource.
    :vartype properties: "SharedPrivateLinkResourceProperties"
    """

    properties: "SharedPrivateLinkResourceProperties"
    """Describes the properties of an existing Shared Private Link Resource."""


class SharedPrivateLinkResourceProperties(TypedDict, total=False):
    """Describes the properties of an existing Shared Private Link Resource.

    :ivar group_id: The group id from the provider of resource the shared private link resource is
     for. Required.
    :vartype group_id: str
    :ivar private_link_resource_id: The resource id of the resource the shared private link
     resource is for. Required.
    :vartype private_link_resource_id: str
    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar request_message: The request message for requesting approval of the shared private link
     resource.
    :vartype request_message: str
    :ivar fqdns: A list of FQDNs for third party private link service.
    :vartype fqdns: list[str]
    :ivar status: Status of the shared private link resource. Known values are: "Pending",
     "Approved", "Rejected", "Disconnected", and "Timeout".
    :vartype status: Union[str, "SharedPrivateLinkResourceStatus"]
    """

    groupId: Required[str]
    """The group id from the provider of resource the shared private link resource is for. Required."""
    privateLinkResourceId: Required[str]
    """The resource id of the resource the shared private link resource is for. Required."""
    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    requestMessage: str
    """The request message for requesting approval of the shared private link resource."""
    fqdns: list[str]
    """A list of FQDNs for third party private link service."""
    status: Union[str, "SharedPrivateLinkResourceStatus"]
    """Status of the shared private link resource. Known values are: \"Pending\", \"Approved\",
     \"Rejected\", \"Disconnected\", and \"Timeout\"."""


class SignalRCorsSettings(TypedDict, total=False):
    """Cross-Origin Resource Sharing (CORS) settings.

    :ivar allowed_origins: Gets or sets the list of origins that should be allowed to make
     cross-origin calls (for example: `http://example.com:12345 <http://example.com:12345>`_). Use
     "*" to allow all. If omitted, allow all by default.
    :vartype allowed_origins: list[str]
    """

    allowedOrigins: list[str]
    """Gets or sets the list of origins that should be allowed to make cross-origin calls (for
     example: `http://example.com:12345 <http://example.com:12345>`_). Use \"*\" to allow all. If
     omitted, allow all by default."""


class SignalRFeature(TypedDict, total=False):
    """Feature of a resource, which controls the runtime behavior.

    :ivar flag: FeatureFlags is the supported features of Azure SignalR service.

     * ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default":
       have your own backend server; "Serverless": your application doesn't have a backend server;
       "Classic": for backward compatibility. Support both Default and Serverless mode but not
       recommended; "PredefinedOnly": for future use.
     * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category
       respectively.
     * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category
       respectively.
     * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR
       service, it will give you live traces in real time, it will be helpful when you developing your
       own Azure SignalR based web application or self-troubleshooting some issues. Please note that
       live traces are counted as outbound messages that will be charged. Values allowed:
       "true"/"false", to enable/disable live trace feature. Required. Known values are:
       "ServiceMode", "EnableConnectivityLogs", "EnableMessagingLogs", and "EnableLiveTrace".
    :vartype flag: Union[str, "FeatureFlags"]
    :ivar value: Value of the feature flag. See Azure SignalR service document
     `https://docs.microsoft.com/azure/azure-signalr/
     <https://docs.microsoft.com/azure/azure-signalr/>`_ for allowed values. Required.
    :vartype value: str
    :ivar properties: Optional properties related to this feature.
    :vartype properties: dict[str, str]
    """

    flag: Required[Union[str, "FeatureFlags"]]
    """FeatureFlags is the supported features of Azure SignalR service.
 
      * ServiceMode: Flag for backend server for SignalR service. Values allowed: \"Default\":
        have your own backend server; \"Serverless\": your application doesn't have a backend server;
        \"Classic\": for backward compatibility. Support both Default and Serverless mode but not
        recommended; \"PredefinedOnly\": for future use.
      * EnableConnectivityLogs: \"true\"/\"false\", to enable/disable the connectivity log
        category respectively.
      * EnableMessagingLogs: \"true\"/\"false\", to enable/disable the connectivity log category
        respectively.
      * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR
        service, it will give you live traces in real time, it will be helpful when you developing your
        own Azure SignalR based web application or self-troubleshooting some issues. Please note that
        live traces are counted as outbound messages that will be charged. Values allowed:
        \"true\"/\"false\", to enable/disable live trace feature. Required. Known values are:
        \"ServiceMode\", \"EnableConnectivityLogs\", \"EnableMessagingLogs\", and \"EnableLiveTrace\"."""
    value: Required[str]
    """Value of the feature flag. See Azure SignalR service document
     `https://docs.microsoft.com/azure/azure-signalr/
     <https://docs.microsoft.com/azure/azure-signalr/>`_ for allowed values. Required."""
    properties: dict[str, str]
    """Optional properties related to this feature."""


class SignalRKeys(TypedDict, total=False):
    """A class represents the access keys of the resource.

    :ivar primary_key: The primary access key.
    :vartype primary_key: str
    :ivar secondary_key: The secondary access key.
    :vartype secondary_key: str
    :ivar primary_connection_string: Connection string constructed via the primaryKey.
    :vartype primary_connection_string: str
    :ivar secondary_connection_string: Connection string constructed via the secondaryKey.
    :vartype secondary_connection_string: str
    """

    primaryKey: str
    """The primary access key."""
    secondaryKey: str
    """The secondary access key."""
    primaryConnectionString: str
    """Connection string constructed via the primaryKey."""
    secondaryConnectionString: str
    """Connection string constructed via the secondaryKey."""


class SignalRNetworkACLs(TypedDict, total=False):
    """Network ACLs for the resource.

    :ivar default_action: Azure Networking ACL Action. Known values are: "Allow" and "Deny".
    :vartype default_action: Union[str, "ACLAction"]
    :ivar public_network: Network ACL.
    :vartype public_network: "NetworkACL"
    :ivar private_endpoints: ACLs for requests from private endpoints.
    :vartype private_endpoints: list["PrivateEndpointACL"]
    :ivar ip_rules: IP rules for filtering public traffic.
    :vartype ip_rules: list["IPRule"]
    """

    defaultAction: Union[str, "ACLAction"]
    """Azure Networking ACL Action. Known values are: \"Allow\" and \"Deny\"."""
    publicNetwork: "NetworkACL"
    """Network ACL."""
    privateEndpoints: list["PrivateEndpointACL"]
    """ACLs for requests from private endpoints."""
    ipRules: list["IPRule"]
    """IP rules for filtering public traffic."""


class SignalRProperties(TypedDict, total=False):
    """A class that describes the properties of the resource.

    :ivar provisioning_state: Provisioning state of the resource. Known values are: "Unknown",
     "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving".
    :vartype provisioning_state: Union[str, "ProvisioningState"]
    :ivar external_ip: The publicly accessible IP of the resource.
    :vartype external_ip: str
    :ivar host_name: FQDN of the service instance.
    :vartype host_name: str
    :ivar public_port: The publicly accessible port of the resource which is designed for
     browser/client side usage.
    :vartype public_port: int
    :ivar server_port: The publicly accessible port of the resource which is designed for customer
     server side usage.
    :vartype server_port: int
    :ivar version: Version of the resource. Probably you need the same or higher version of client
     SDKs.
    :vartype version: str
    :ivar private_endpoint_connections: Private endpoint connections to the resource.
    :vartype private_endpoint_connections: list["PrivateEndpointConnection"]
    :ivar shared_private_link_resources: The list of shared private link resources.
    :vartype shared_private_link_resources: list["SharedPrivateLinkResource"]
    :ivar tls: TLS settings for the resource.
    :vartype tls: "SignalRTlsSettings"
    :ivar host_name_prefix: Deprecated.
    :vartype host_name_prefix: str
    :ivar features: List of the featureFlags.

     FeatureFlags that are not included in the parameters for the update operation will not be
     modified.
     And the response will only include featureFlags that are explicitly set.
     When a featureFlag is not explicitly set, its globally default value will be used
     But keep in mind, the default value doesn't mean "false". It varies in terms of different
     FeatureFlags.
    :vartype features: list["SignalRFeature"]
    :ivar live_trace_configuration: Live trace configuration of a Microsoft.SignalRService
     resource.
    :vartype live_trace_configuration: "LiveTraceConfiguration"
    :ivar resource_log_configuration: Resource log configuration of a Microsoft.SignalRService
     resource.
    :vartype resource_log_configuration: "ResourceLogConfiguration"
    :ivar cors: Cross-Origin Resource Sharing (CORS) settings.
    :vartype cors: "SignalRCorsSettings"
    :ivar serverless: Serverless settings.
    :vartype serverless: "ServerlessSettings"
    :ivar upstream: The settings for the Upstream when the service is in server-less mode.
    :vartype upstream: "ServerlessUpstreamSettings"
    :ivar network_ac_ls: Network ACLs for the resource.
    :vartype network_ac_ls: "SignalRNetworkACLs"
    :ivar application_firewall: Application firewall settings for the resource.
    :vartype application_firewall: "ApplicationFirewallSettings"
    :ivar public_network_access: Enable or disable public network access. Default to "Enabled".
     When it's Enabled, network ACLs still apply. When it's Disabled, public network access is
     always disabled no matter what you set in network ACLs.
    :vartype public_network_access: str
    :ivar disable_local_auth: DisableLocalAuth Enable or disable local auth with AccessKey When set
     as true, connection with AccessKey=xxx won't work.
    :vartype disable_local_auth: bool
    :ivar disable_aad_auth: DisableLocalAuth Enable or disable aad auth When set as true,
     connection with AuthType=aad won't work.
    :vartype disable_aad_auth: bool
    :ivar region_endpoint_enabled: Enable or disable the regional endpoint. Default to "Enabled".
     When it's Disabled, new connections will not be routed to this endpoint, however existing
     connections will not be affected. This property is replica specific. Disable the regional
     endpoint without replica is not allowed.
    :vartype region_endpoint_enabled: str
    :ivar resource_stopped: Stop or start the resource.  Default to "False". When it's true, the
     data plane of the resource is shutdown. When it's false, the data plane of the resource is
     started.
    :vartype resource_stopped: str
    :ivar route_settings: Route settings for the resource.
    :vartype route_settings: "RouteSettings"
    """

    provisioningState: Union[str, "ProvisioningState"]
    """Provisioning state of the resource. Known values are: \"Unknown\", \"Succeeded\", \"Failed\",
     \"Canceled\", \"Running\", \"Creating\", \"Updating\", \"Deleting\", and \"Moving\"."""
    externalIP: str
    """The publicly accessible IP of the resource."""
    hostName: str
    """FQDN of the service instance."""
    publicPort: int
    """The publicly accessible port of the resource which is designed for browser/client side usage."""
    serverPort: int
    """The publicly accessible port of the resource which is designed for customer server side usage."""
    version: str
    """Version of the resource. Probably you need the same or higher version of client SDKs."""
    privateEndpointConnections: list["PrivateEndpointConnection"]
    """Private endpoint connections to the resource."""
    sharedPrivateLinkResources: list["SharedPrivateLinkResource"]
    """The list of shared private link resources."""
    tls: "SignalRTlsSettings"
    """TLS settings for the resource."""
    hostNamePrefix: str
    """Deprecated."""
    features: list["SignalRFeature"]
    """List of the featureFlags.
     
     FeatureFlags that are not included in the parameters for the update operation will not be
     modified.
     And the response will only include featureFlags that are explicitly set.
     When a featureFlag is not explicitly set, its globally default value will be used
     But keep in mind, the default value doesn't mean \"false\". It varies in terms of different
     FeatureFlags."""
    liveTraceConfiguration: "LiveTraceConfiguration"
    """Live trace configuration of a Microsoft.SignalRService resource."""
    resourceLogConfiguration: "ResourceLogConfiguration"
    """Resource log configuration of a Microsoft.SignalRService resource."""
    cors: "SignalRCorsSettings"
    """Cross-Origin Resource Sharing (CORS) settings."""
    serverless: "ServerlessSettings"
    """Serverless settings."""
    upstream: "ServerlessUpstreamSettings"
    """The settings for the Upstream when the service is in server-less mode."""
    networkACLs: "SignalRNetworkACLs"
    """Network ACLs for the resource."""
    applicationFirewall: "ApplicationFirewallSettings"
    """Application firewall settings for the resource."""
    publicNetworkAccess: str
    """Enable or disable public network access. Default to \"Enabled\". When it's Enabled, network
     ACLs still apply. When it's Disabled, public network access is always disabled no matter what
     you set in network ACLs."""
    disableLocalAuth: bool
    """DisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with
     AccessKey=xxx won't work."""
    disableAadAuth: bool
    """DisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad
     won't work."""
    regionEndpointEnabled: str
    """Enable or disable the regional endpoint. Default to \"Enabled\". When it's Disabled, new
     connections will not be routed to this endpoint, however existing connections will not be
     affected. This property is replica specific. Disable the regional endpoint without replica is
     not allowed."""
    resourceStopped: str
    """Stop or start the resource.  Default to \"False\". When it's true, the data plane of the
     resource is shutdown. When it's false, the data plane of the resource is started."""
    routeSettings: "RouteSettings"
    """Route settings for the resource."""


class SignalRResource(TrackedResource):
    """A class representing a resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: "SystemData"
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: A class that describes the properties of the resource.
    :vartype properties: "SignalRProperties"
    :ivar sku: The billing information of the resource.
    :vartype sku: "ResourceSku"
    :ivar kind: The kind of the service. Known values are: "SignalR" and "RawWebSockets".
    :vartype kind: Union[str, "ServiceKind"]
    :ivar identity: A class represent managed identities used for request and response.
    :vartype identity: "ManagedIdentity"
    """

    properties: "SignalRProperties"
    """A class that describes the properties of the resource."""
    sku: "ResourceSku"
    """The billing information of the resource."""
    kind: Union[str, "ServiceKind"]
    """The kind of the service. Known values are: \"SignalR\" and \"RawWebSockets\"."""
    identity: "ManagedIdentity"
    """A class represent managed identities used for request and response."""


class SignalRTlsSettings(TypedDict, total=False):
    """TLS settings for the resource.

    :ivar client_cert_enabled: Request client certificate during TLS handshake if enabled. Not
     supported for free tier. Any input will be ignored for free tier.
    :vartype client_cert_enabled: bool
    """

    clientCertEnabled: bool
    """Request client certificate during TLS handshake if enabled. Not supported for free tier. Any
     input will be ignored for free tier."""


class SignalRUsage(TypedDict, total=False):
    """Object that describes a specific usage of the resources.

    :ivar id: Fully qualified ARM resource id.
    :vartype id: str
    :ivar current_value: Current value for the usage quota.
    :vartype current_value: int
    :ivar limit: The maximum permitted value for the usage quota. If there is no limit, this value
     will be -1.
    :vartype limit: int
    :ivar name: Localizable String object containing the name and a localized value.
    :vartype name: "SignalRUsageName"
    :ivar unit: Representing the units of the usage quota. Possible values are: Count, Bytes,
     Seconds, Percent, CountPerSecond, BytesPerSecond.
    :vartype unit: str
    """

    id: str
    """Fully qualified ARM resource id."""
    currentValue: int
    """Current value for the usage quota."""
    limit: int
    """The maximum permitted value for the usage quota. If there is no limit, this value will be -1."""
    name: "SignalRUsageName"
    """Localizable String object containing the name and a localized value."""
    unit: str
    """Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent,
     CountPerSecond, BytesPerSecond."""


class SignalRUsageName(TypedDict, total=False):
    """Localizable String object containing the name and a localized value.

    :ivar value: The identifier of the usage.
    :vartype value: str
    :ivar localized_value: Localized name of the usage.
    :vartype localized_value: str
    """

    value: str
    """The identifier of the usage."""
    localizedValue: str
    """Localized name of the usage."""


class Sku(TypedDict, total=False):
    """Describes an available sku.".

    :ivar resource_type: The resource type that this object applies to.
    :vartype resource_type: str
    :ivar sku: The billing information of the resource.
    :vartype sku: "ResourceSku"
    :ivar capacity: Describes scaling information of a sku.
    :vartype capacity: "SkuCapacity"
    """

    resourceType: str
    """The resource type that this object applies to."""
    sku: "ResourceSku"
    """The billing information of the resource."""
    capacity: "SkuCapacity"
    """Describes scaling information of a sku."""


class SkuCapacity(TypedDict, total=False):
    """Describes scaling information of a sku.

    :ivar minimum: The lowest permitted capacity for this resource.
    :vartype minimum: int
    :ivar maximum: The highest permitted capacity for this resource.
    :vartype maximum: int
    :ivar default: The default capacity.
    :vartype default: int
    :ivar allowed_values: Allows capacity value list.
    :vartype allowed_values: list[int]
    :ivar scale_type: The scale type applicable to the sku. Known values are: "None", "Manual", and
     "Automatic".
    :vartype scale_type: Union[str, "ScaleType"]
    """

    minimum: int
    """The lowest permitted capacity for this resource."""
    maximum: int
    """The highest permitted capacity for this resource."""
    default: int
    """The default capacity."""
    allowedValues: list[int]
    """Allows capacity value list."""
    scaleType: Union[str, "ScaleType"]
    """The scale type applicable to the sku. Known values are: \"None\", \"Manual\", and
     \"Automatic\"."""


class SkuList(TypedDict, total=False):
    """The list skus operation response.

    :ivar value: The list of skus available for the resource.
    :vartype value: list["Sku"]
    :ivar next_link: The URL the client should use to fetch the next page (per server side paging).
     It's null for now, added for future use.
    :vartype next_link: str
    """

    value: list["Sku"]
    """The list of skus available for the resource."""
    nextLink: str
    """The URL the client should use to fetch the next page (per server side paging). It's null for
     now, added for future use."""


class SystemData(TypedDict, total=False):
    """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: Union[str, "CreatedByType"]
    :ivar created_at: The timestamp of resource creation (UTC).
    :vartype created_at: str
    :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: Union[str, "CreatedByType"]
    :ivar last_modified_at: The timestamp of resource last modification (UTC).
    :vartype last_modified_at: str
    """

    createdBy: str
    """The identity that created the resource."""
    createdByType: Union[str, "CreatedByType"]
    """The type of identity that created the resource. Known values are: \"User\", \"Application\",
     \"ManagedIdentity\", and \"Key\"."""
    createdAt: str
    """The timestamp of resource creation (UTC)."""
    lastModifiedBy: str
    """The identity that last modified the resource."""
    lastModifiedByType: Union[str, "CreatedByType"]
    """The type of identity that last modified the resource. Known values are: \"User\",
     \"Application\", \"ManagedIdentity\", and \"Key\"."""
    lastModifiedAt: str
    """The timestamp of resource last modification (UTC)."""


class ThrottleByJwtCustomClaimRule(TypedDict, total=False):
    """Throttle the client connection by a custom JWT claim.

    :ivar claim_name: The name of the claim in the JWT token. The client connection with the same
     claim value will be aggregated. If the claim is not found in the token, the connection will be
     allowed. Required.
    :vartype claim_name: str
    :ivar max_count: Maximum connection count allowed for the same Jwt claim value. Clients with
     the same Jwt claim will get rejected if the connection count exceeds this value. Default value
     is 20.
    :vartype max_count: int
    :ivar type: Required. THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE.
    :vartype type:
     Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE]
    """

    claimName: Required[str]
    """The name of the claim in the JWT token. The client connection with the same claim value will be
     aggregated. If the claim is not found in the token, the connection will be allowed. Required."""
    maxCount: int
    """Maximum connection count allowed for the same Jwt claim value. Clients with the same Jwt claim
     will get rejected if the connection count exceeds this value. Default value is 20."""
    type: Required[Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE]]
    """Required. THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE."""


class ThrottleByJwtSignatureRule(TypedDict, total=False):
    """Throttle the client connection by the JWT signature.

    :ivar max_count: Maximum connection count allowed for the same JWT signature. Clients with the
     same JWT signature will get rejected if the connection count exceeds this value. Default value
     is 20.
    :vartype max_count: int
    :ivar type: Required. THROTTLE_BY_JWT_SIGNATURE_RULE.
    :vartype type: Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_JWT_SIGNATURE_RULE]
    """

    maxCount: int
    """Maximum connection count allowed for the same JWT signature. Clients with the same JWT
     signature will get rejected if the connection count exceeds this value. Default value is 20."""
    type: Required[Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_JWT_SIGNATURE_RULE]]
    """Required. THROTTLE_BY_JWT_SIGNATURE_RULE."""


class ThrottleByUserIdRule(TypedDict, total=False):
    """Throttle the client connection by the user ID.

    :ivar max_count: Maximum connection count allowed for the same user ID. Clients with the same
     user ID will get rejected if the connection count exceeds this value. Default value is 20.
    :vartype max_count: int
    :ivar type: Required. THROTTLE_BY_USER_ID_RULE.
    :vartype type: Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_USER_ID_RULE]
    """

    maxCount: int
    """Maximum connection count allowed for the same user ID. Clients with the same user ID will get
     rejected if the connection count exceeds this value. Default value is 20."""
    type: Required[Literal[ClientConnectionCountRuleDiscriminator.THROTTLE_BY_USER_ID_RULE]]
    """Required. THROTTLE_BY_USER_ID_RULE."""


class TrafficThrottleByJwtCustomClaimRule(TypedDict, total=False):
    """Throttle the client traffic by a custom JWT claim.

    :ivar claim_name: The name of the claim in the JWT token. The message bytes with the same claim
     value will be aggregated. If the claim is not found in the token, the rule will be skipped.
     Required.
    :vartype claim_name: str
    :ivar max_inbound_message_bytes: Maximum accumulated inbound message bytes allowed for the same
     JWT signature within a time window. Clients with the same JWT claim will get disconnected if
     the message bytes exceeds this value. Default value is 1GB.
    :vartype max_inbound_message_bytes: int
    :ivar aggregation_window_in_seconds: The aggregation window for the message bytes. The message
     bytes will be aggregated in this window and be reset after the window. Default value is 60
     seconds.
    :vartype aggregation_window_in_seconds: int
    :ivar type: Required. TRAFFIC_THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE.
    :vartype type:
     Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE]
    """

    claimName: Required[str]
    """The name of the claim in the JWT token. The message bytes with the same claim value will be
     aggregated. If the claim is not found in the token, the rule will be skipped. Required."""
    maxInboundMessageBytes: int
    """Maximum accumulated inbound message bytes allowed for the same JWT signature within a time
     window. Clients with the same JWT claim will get disconnected if the message bytes exceeds this
     value. Default value is 1GB."""
    aggregationWindowInSeconds: int
    """The aggregation window for the message bytes. The message bytes will be aggregated in this
     window and be reset after the window. Default value is 60 seconds."""
    type: Required[Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE]]
    """Required. TRAFFIC_THROTTLE_BY_JWT_CUSTOM_CLAIM_RULE."""


class TrafficThrottleByJwtSignatureRule(TypedDict, total=False):
    """Throttle the client traffic by the JWT signature.

    :ivar max_inbound_message_bytes: Maximum accumulated inbound message bytes allowed for the same
     JWT signature within a time window. Clients with the same JWT signature will get disconnected
     if the message bytes exceeds this value. Default value is 1GB.
    :vartype max_inbound_message_bytes: int
    :ivar aggregation_window_in_seconds: The aggregation window for the message bytes. The message
     bytes will be aggregated in this window and be reset after the window. Default value is 60
     seconds.
    :vartype aggregation_window_in_seconds: int
    :ivar type: Required. TRAFFIC_THROTTLE_BY_JWT_SIGNATURE_RULE.
    :vartype type:
     Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_JWT_SIGNATURE_RULE]
    """

    maxInboundMessageBytes: int
    """Maximum accumulated inbound message bytes allowed for the same JWT signature within a time
     window. Clients with the same JWT signature will get disconnected if the message bytes exceeds
     this value. Default value is 1GB."""
    aggregationWindowInSeconds: int
    """The aggregation window for the message bytes. The message bytes will be aggregated in this
     window and be reset after the window. Default value is 60 seconds."""
    type: Required[Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_JWT_SIGNATURE_RULE]]
    """Required. TRAFFIC_THROTTLE_BY_JWT_SIGNATURE_RULE."""


class TrafficThrottleByUserIdRule(TypedDict, total=False):
    """Throttle the client traffic by the user ID.

    :ivar max_inbound_message_bytes: Maximum accumulated inbound message bytes allowed for the same
     user ID within a time window. Clients with the same user ID will get disconnected if the
     message bytes exceeds this value. Default value is 1GB.
    :vartype max_inbound_message_bytes: int
    :ivar aggregation_window_in_seconds: The aggregation window for the message bytes. The message
     bytes will be aggregated in this window and be reset after the window. Default value is 60
     seconds.
    :vartype aggregation_window_in_seconds: int
    :ivar type: Required. TRAFFIC_THROTTLE_BY_USER_ID_RULE.
    :vartype type: Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_USER_ID_RULE]
    """

    maxInboundMessageBytes: int
    """Maximum accumulated inbound message bytes allowed for the same user ID within a time window.
     Clients with the same user ID will get disconnected if the message bytes exceeds this value.
     Default value is 1GB."""
    aggregationWindowInSeconds: int
    """The aggregation window for the message bytes. The message bytes will be aggregated in this
     window and be reset after the window. Default value is 60 seconds."""
    type: Required[Literal[ClientTrafficControlRuleDiscriminator.TRAFFIC_THROTTLE_BY_USER_ID_RULE]]
    """Required. TRAFFIC_THROTTLE_BY_USER_ID_RULE."""


class UpstreamAuthSettings(TypedDict, total=False):
    """Upstream auth settings. If not set, no auth is used for upstream messages.

    :ivar type: Upstream auth type enum. Known values are: "None" and "ManagedIdentity".
    :vartype type: Union[str, "UpstreamAuthType"]
    :ivar managed_identity: Managed identity settings for upstream.
    :vartype managed_identity: "ManagedIdentitySettings"
    """

    type: Union[str, "UpstreamAuthType"]
    """Upstream auth type enum. Known values are: \"None\" and \"ManagedIdentity\"."""
    managedIdentity: "ManagedIdentitySettings"
    """Managed identity settings for upstream."""


class UpstreamTemplate(TypedDict, total=False):
    """Upstream template item settings. It defines the Upstream URL of the incoming requests. The
    template defines the pattern of the event, the hub or the category of the incoming request that
    matches current URL template.

    :ivar hub_pattern: Gets or sets the matching pattern for hub names. If not set, it matches any
     hub.
     There are 3 kind of patterns supported:

     1. "*", it to matches any hub name.
     2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2".
     3. The single hub name, for example, "hub1", it matches "hub1".
    :vartype hub_pattern: str
    :ivar event_pattern: Gets or sets the matching pattern for event names. If not set, it matches
     any event.
     There are 3 kind of patterns supported:

     1. "*", it to matches any event name.
     2. Combine multiple events with ",", for example "connect,disconnect", it matches event
     "connect" and "disconnect".
     3. The single event name, for example, "connect", it matches "connect".
    :vartype event_pattern: str
    :ivar category_pattern: Gets or sets the matching pattern for category names. If not set, it
     matches any category.
     There are 3 kind of patterns supported:

     1. "*", it to matches any category name.
     2. Combine multiple categories with ",", for example "connections,messages", it matches
     category "connections" and "messages".
     3. The single category name, for example, "connections", it matches the category "connections".
    :vartype category_pattern: str
    :ivar url_template: Gets or sets the Upstream URL template. You can use 3 predefined parameters
     {hub}, {category} {event} inside the template, the value of the Upstream URL is dynamically
     calculated when the client request comes in. For example, if the urlTemplate is
     ``http://example.com/{hub}/api/{event}``, with a client request from hub ``chat`` connects, it
     will first POST to this URL: ``http://example.com/chat/api/connect``. Required.
    :vartype url_template: str
    :ivar auth: Upstream auth settings. If not set, no auth is used for upstream messages.
    :vartype auth: "UpstreamAuthSettings"
    """

    hubPattern: str
    """Gets or sets the matching pattern for hub names. If not set, it matches any hub.
     There are 3 kind of patterns supported:
     
     1. \"*\", it to matches any hub name.
     2. Combine multiple hubs with \",\", for example \"hub1,hub2\", it matches \"hub1\" and
     \"hub2\".
     3. The single hub name, for example, \"hub1\", it matches \"hub1\"."""
    eventPattern: str
    """Gets or sets the matching pattern for event names. If not set, it matches any event.
     There are 3 kind of patterns supported:
     
     1. \"*\", it to matches any event name.
     2. Combine multiple events with \",\", for example \"connect,disconnect\", it matches event
     \"connect\" and \"disconnect\".
     3. The single event name, for example, \"connect\", it matches \"connect\"."""
    categoryPattern: str
    """Gets or sets the matching pattern for category names. If not set, it matches any category.
     There are 3 kind of patterns supported:
     
     1. \"*\", it to matches any category name.
     2. Combine multiple categories with \",\", for example \"connections,messages\", it matches
     category \"connections\" and \"messages\".
     3. The single category name, for example, \"connections\", it matches the category
     \"connections\"."""
    urlTemplate: Required[str]
    """Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category}
     {event} inside the template, the value of the Upstream URL is dynamically calculated when the
     client request comes in. For example, if the urlTemplate is
     ``http://example.com/{hub}/api/{event}``, with a client request from hub ``chat`` connects, it
     will first POST to this URL: ``http://example.com/chat/api/connect``. Required."""
    auth: "UpstreamAuthSettings"
    """Upstream auth settings. If not set, no auth is used for upstream messages."""


class UserAssignedIdentityProperty(TypedDict, total=False):
    """Properties of user assigned identity.

    :ivar principal_id: Get the principal id for the user assigned identity.
    :vartype principal_id: str
    :ivar client_id: Get the client id for the user assigned identity.
    :vartype client_id: str
    """

    principalId: str
    """Get the principal id for the user assigned identity."""
    clientId: str
    """Get the client id for the user assigned identity."""


ClientConnectionCountRule = Union[ThrottleByJwtCustomClaimRule, ThrottleByJwtSignatureRule, ThrottleByUserIdRule]
ClientTrafficControlRule = Union[
    TrafficThrottleByJwtCustomClaimRule, TrafficThrottleByJwtSignatureRule, TrafficThrottleByUserIdRule
]
