# 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 CriterionType, Odatatype

if TYPE_CHECKING:
    from .. import models as _models


class AccessModeSettings(_Model):
    """Properties that define the scope private link mode settings.

    :ivar query_access_mode: Specifies the default access mode of queries through associated
     private endpoints in scope. If not specified default value is 'Open'. You can override this
     default setting for a specific private endpoint connection by adding an exclusion in the
     'exclusions' array. Required. Known values are: "Open" and "PrivateOnly".
    :vartype query_access_mode: str or ~azure.mgmt.monitor.models.AccessMode
    :ivar ingestion_access_mode: Specifies the default access mode of ingestion through associated
     private endpoints in scope. If not specified default value is 'Open'. You can override this
     default setting for a specific private endpoint connection by adding an exclusion in the
     'exclusions' array. Required. Known values are: "Open" and "PrivateOnly".
    :vartype ingestion_access_mode: str or ~azure.mgmt.monitor.models.AccessMode
    :ivar exclusions: List of exclusions that override the default access mode settings for
     specific private endpoint connections.
    :vartype exclusions: list[~azure.mgmt.monitor.models.AccessModeSettingsExclusion]
    """

    query_access_mode: Union[str, "_models.AccessMode"] = rest_field(
        name="queryAccessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the default access mode of queries through associated private endpoints in scope. If
     not specified default value is 'Open'. You can override this default setting for a specific
     private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known
     values are: \"Open\" and \"PrivateOnly\"."""
    ingestion_access_mode: Union[str, "_models.AccessMode"] = rest_field(
        name="ingestionAccessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the default access mode of ingestion through associated private endpoints in scope.
     If not specified default value is 'Open'. You can override this default setting for a specific
     private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known
     values are: \"Open\" and \"PrivateOnly\"."""
    exclusions: Optional[list["_models.AccessModeSettingsExclusion"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of exclusions that override the default access mode settings for specific private endpoint
     connections."""

    @overload
    def __init__(
        self,
        *,
        query_access_mode: Union[str, "_models.AccessMode"],
        ingestion_access_mode: Union[str, "_models.AccessMode"],
        exclusions: Optional[list["_models.AccessModeSettingsExclusion"]] = None,
    ) -> None: ...

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

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


class AccessModeSettingsExclusion(_Model):
    """Properties that define the scope private link mode settings exclusion item. This setting
    applies to a specific private endpoint connection and overrides the default settings for that
    private endpoint connection.

    :ivar private_endpoint_connection_name: The private endpoint connection name associated to the
     private endpoint on which we want to apply the specific access mode settings.
    :vartype private_endpoint_connection_name: str
    :ivar query_access_mode: Specifies the access mode of queries through the specified private
     endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly".
    :vartype query_access_mode: str or ~azure.mgmt.monitor.models.AccessMode
    :ivar ingestion_access_mode: Specifies the access mode of ingestion through the specified
     private endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly".
    :vartype ingestion_access_mode: str or ~azure.mgmt.monitor.models.AccessMode
    """

    private_endpoint_connection_name: Optional[str] = rest_field(
        name="privateEndpointConnectionName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private endpoint connection name associated to the private endpoint on which we want to
     apply the specific access mode settings."""
    query_access_mode: Optional[Union[str, "_models.AccessMode"]] = rest_field(
        name="queryAccessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the access mode of queries through the specified private endpoint connection in the
     exclusion. Known values are: \"Open\" and \"PrivateOnly\"."""
    ingestion_access_mode: Optional[Union[str, "_models.AccessMode"]] = rest_field(
        name="ingestionAccessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the access mode of ingestion through the specified private endpoint connection in the
     exclusion. Known values are: \"Open\" and \"PrivateOnly\"."""

    @overload
    def __init__(
        self,
        *,
        private_endpoint_connection_name: Optional[str] = None,
        query_access_mode: Optional[Union[str, "_models.AccessMode"]] = None,
        ingestion_access_mode: Optional[Union[str, "_models.AccessMode"]] = None,
    ) -> None: ...

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

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


class AccessRule(_Model):
    """Access rule in a network security perimeter configuration profile.

    :ivar name: Name of the access rule.
    :vartype name: str
    :ivar properties:
    :vartype properties: ~azure.mgmt.monitor.models.AccessRuleProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the access rule."""
    properties: Optional["_models.AccessRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class AccessRuleProperties(_Model):
    """Properties of Access Rule.

    :ivar direction: Known values are: "Inbound" and "Outbound".
    :vartype direction: str or ~azure.mgmt.monitor.models.AccessRuleDirection
    :ivar address_prefixes: Address prefixes in the CIDR format for inbound rules.
    :vartype address_prefixes: list[str]
    :ivar subscriptions: Subscriptions for inbound rules.
    :vartype subscriptions: list[~azure.mgmt.monitor.models.AccessRulePropertiesSubscription]
    :ivar network_security_perimeters: Network security perimeters for inbound rules.
    :vartype network_security_perimeters: list[~azure.mgmt.monitor.models.NetworkSecurityPerimeter]
    :ivar fully_qualified_domain_names: Fully qualified domain names (FQDN) for outbound rules.
    :vartype fully_qualified_domain_names: list[str]
    :ivar email_addresses: Email addresses for outbound rules.
    :vartype email_addresses: list[str]
    :ivar phone_numbers: Phone numbers for outbound rules.
    :vartype phone_numbers: list[str]
    """

    direction: Optional[Union[str, "_models.AccessRuleDirection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"Inbound\" and \"Outbound\"."""
    address_prefixes: Optional[list[str]] = rest_field(
        name="addressPrefixes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Address prefixes in the CIDR format for inbound rules."""
    subscriptions: Optional[list["_models.AccessRulePropertiesSubscription"]] = 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"]
    )
    """Network security perimeters for inbound rules."""
    fully_qualified_domain_names: Optional[list[str]] = rest_field(
        name="fullyQualifiedDomainNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """Fully qualified domain names (FQDN) for outbound rules."""
    email_addresses: Optional[list[str]] = rest_field(
        name="emailAddresses", visibility=["read", "create", "update", "delete", "query"]
    )
    """Email addresses for outbound rules."""
    phone_numbers: Optional[list[str]] = rest_field(
        name="phoneNumbers", visibility=["read", "create", "update", "delete", "query"]
    )
    """Phone numbers for outbound rules."""

    @overload
    def __init__(
        self,
        *,
        direction: Optional[Union[str, "_models.AccessRuleDirection"]] = None,
        address_prefixes: Optional[list[str]] = None,
        subscriptions: Optional[list["_models.AccessRulePropertiesSubscription"]] = None,
        network_security_perimeters: Optional[list["_models.NetworkSecurityPerimeter"]] = None,
        fully_qualified_domain_names: Optional[list[str]] = None,
        email_addresses: Optional[list[str]] = None,
        phone_numbers: 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 AccessRulePropertiesSubscription(_Model):
    """AccessRulePropertiesSubscription.

    :ivar id: The fully qualified Azure resource ID of the subscription e.g.
     ('/subscriptions/00000000-0000-0000-0000-000000000000').
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The fully qualified Azure resource ID of the subscription e.g.
     ('/subscriptions/00000000-0000-0000-0000-000000000000')."""

    @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 ActionDetail(_Model):
    """The action detail.

    :ivar mechanism_type: The mechanism type.
    :vartype mechanism_type: str
    :ivar name: The name of the action.
    :vartype name: str
    :ivar status: The status of the action.
    :vartype status: str
    :ivar sub_state: The substatus of the action.
    :vartype sub_state: str
    :ivar send_time: The send time.
    :vartype send_time: str
    :ivar detail: The detail of the friendly error message.
    :vartype detail: str
    """

    mechanism_type: Optional[str] = rest_field(
        name="MechanismType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The mechanism type."""
    name: Optional[str] = rest_field(name="Name", visibility=["read", "create", "update", "delete", "query"])
    """The name of the action."""
    status: Optional[str] = rest_field(name="Status", visibility=["read", "create", "update", "delete", "query"])
    """The status of the action."""
    sub_state: Optional[str] = rest_field(name="SubState", visibility=["read", "create", "update", "delete", "query"])
    """The substatus of the action."""
    send_time: Optional[str] = rest_field(name="SendTime", visibility=["read", "create", "update", "delete", "query"])
    """The send time."""
    detail: Optional[str] = rest_field(name="Detail", visibility=["read", "create", "update", "delete", "query"])
    """The detail of the friendly error message."""

    @overload
    def __init__(
        self,
        *,
        mechanism_type: Optional[str] = None,
        name: Optional[str] = None,
        status: Optional[str] = None,
        sub_state: Optional[str] = None,
        send_time: Optional[str] = None,
        detail: 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 ActionGroup(_Model):
    """A pointer to an Azure Action Group.

    :ivar action_group_id: The resource ID of the Action Group. This cannot be null or empty.
     Required.
    :vartype action_group_id: str
    :ivar webhook_properties: the dictionary of custom properties to include with the post
     operation. These data are appended to the webhook payload.
    :vartype webhook_properties: dict[str, str]
    :ivar action_properties: Predefined list of properties and configuration items for the action
     group.
    :vartype action_properties: dict[str, str]
    """

    action_group_id: str = rest_field(name="actionGroupId", visibility=["read", "create", "update", "delete", "query"])
    """The resource ID of the Action Group. This cannot be null or empty. Required."""
    webhook_properties: Optional[dict[str, str]] = rest_field(
        name="webhookProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """the dictionary of custom properties to include with the post operation. These data are appended
     to the webhook payload."""
    action_properties: Optional[dict[str, str]] = rest_field(
        name="actionProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Predefined list of properties and configuration items for the action group."""

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

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

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


class ActionGroupPatch(_Model):
    """An Azure action group for patch operations.

    :ivar enabled: Indicates whether this action group is enabled. If an action group is not
     enabled, then none of its actions will be activated.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this action group is enabled. If an action group is not enabled, then none of
     its actions will be activated."""

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

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

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


class ActionGroupPatchBody(_Model):
    """An action group object for the body of patch operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar identity: Managed service identity (system assigned and/or user assigned identities).
    :vartype identity: ~azure.mgmt.monitor.models.ManagedServiceIdentity
    :ivar properties: The action group settings for an update operation.
    :vartype properties: ~azure.mgmt.monitor.models.ActionGroupPatch
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed service identity (system assigned and/or user assigned identities)."""
    properties: Optional["_models.ActionGroupPatch"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action group settings for an update operation."""

    __flattened_items = ["enabled"]

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

    @overload
    def __init__(self, mapping: Mapping[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 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.monitor.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 TrackedResource(Resource):
    """Tracked Resource.

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

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

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

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

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


class ActionGroupResource(TrackedResource):
    """An action group 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: The action groups properties of the resource.
    :vartype properties: ~azure.mgmt.monitor.models.ActionGroupResourceProperties
    :ivar identity: The managed service identities assigned to this resource.
    :vartype identity: ~azure.mgmt.monitor.models.ManagedServiceIdentity
    """

    properties: Optional["_models.ActionGroupResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The action groups properties of the resource."""
    identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The managed service identities assigned to this resource."""

    __flattened_items = [
        "group_short_name",
        "enabled",
        "email_receivers",
        "sms_receivers",
        "webhook_receivers",
        "itsm_receivers",
        "azure_app_push_receivers",
        "automation_runbook_receivers",
        "voice_receivers",
        "logic_app_receivers",
        "azure_function_receivers",
        "arm_role_receivers",
        "event_hub_receivers",
        "incident_receivers",
    ]

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

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

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

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

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


class ActionGroupResourceProperties(_Model):
    """An Azure action group.

    :ivar group_short_name: The short name of the action group. This will be used in SMS messages.
     Required.
    :vartype group_short_name: str
    :ivar enabled: Indicates whether this action group is enabled. If an action group is not
     enabled, then none of its receivers will receive communications. Required.
    :vartype enabled: bool
    :ivar email_receivers: The list of email receivers that are part of this action group.
    :vartype email_receivers: list[~azure.mgmt.monitor.models.EmailReceiver]
    :ivar sms_receivers: The list of SMS receivers that are part of this action group.
    :vartype sms_receivers: list[~azure.mgmt.monitor.models.SmsReceiver]
    :ivar webhook_receivers: The list of webhook receivers that are part of this action group.
    :vartype webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver]
    :ivar itsm_receivers: The list of ITSM receivers that are part of this action group.
    :vartype itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver]
    :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action
     group.
    :vartype azure_app_push_receivers: list[~azure.mgmt.monitor.models.AzureAppPushReceiver]
    :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of
     this action group.
    :vartype automation_runbook_receivers:
     list[~azure.mgmt.monitor.models.AutomationRunbookReceiver]
    :ivar voice_receivers: The list of voice receivers that are part of this action group.
    :vartype voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver]
    :ivar logic_app_receivers: The list of logic app receivers that are part of this action group.
    :vartype logic_app_receivers: list[~azure.mgmt.monitor.models.LogicAppReceiver]
    :ivar azure_function_receivers: The list of azure function receivers that are part of this
     action group.
    :vartype azure_function_receivers: list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
    :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group.
     Roles are Azure RBAC roles and only built-in roles are supported.
    :vartype arm_role_receivers: list[~azure.mgmt.monitor.models.ArmRoleReceiver]
    :ivar event_hub_receivers: The list of event hub receivers that are part of this action group.
    :vartype event_hub_receivers: list[~azure.mgmt.monitor.models.EventHubReceiver]
    :ivar incident_receivers: The list of incident receivers that are part of this action group.
    :vartype incident_receivers: list[~azure.mgmt.monitor.models.IncidentReceiver]
    """

    group_short_name: str = rest_field(
        name="groupShortName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The short name of the action group. This will be used in SMS messages. Required."""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this action group is enabled. If an action group is not enabled, then none of
     its receivers will receive communications. Required."""
    email_receivers: Optional[list["_models.EmailReceiver"]] = rest_field(
        name="emailReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of email receivers that are part of this action group."""
    sms_receivers: Optional[list["_models.SmsReceiver"]] = rest_field(
        name="smsReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of SMS receivers that are part of this action group."""
    webhook_receivers: Optional[list["_models.WebhookReceiver"]] = rest_field(
        name="webhookReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of webhook receivers that are part of this action group."""
    itsm_receivers: Optional[list["_models.ItsmReceiver"]] = rest_field(
        name="itsmReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of ITSM receivers that are part of this action group."""
    azure_app_push_receivers: Optional[list["_models.AzureAppPushReceiver"]] = rest_field(
        name="azureAppPushReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of AzureAppPush receivers that are part of this action group."""
    automation_runbook_receivers: Optional[list["_models.AutomationRunbookReceiver"]] = rest_field(
        name="automationRunbookReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of AutomationRunbook receivers that are part of this action group."""
    voice_receivers: Optional[list["_models.VoiceReceiver"]] = rest_field(
        name="voiceReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of voice receivers that are part of this action group."""
    logic_app_receivers: Optional[list["_models.LogicAppReceiver"]] = rest_field(
        name="logicAppReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of logic app receivers that are part of this action group."""
    azure_function_receivers: Optional[list["_models.AzureFunctionReceiver"]] = rest_field(
        name="azureFunctionReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of azure function receivers that are part of this action group."""
    arm_role_receivers: Optional[list["_models.ArmRoleReceiver"]] = rest_field(
        name="armRoleReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles
     and only built-in roles are supported."""
    event_hub_receivers: Optional[list["_models.EventHubReceiver"]] = rest_field(
        name="eventHubReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of event hub receivers that are part of this action group."""
    incident_receivers: Optional[list["_models.IncidentReceiver"]] = rest_field(
        name="incidentReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of incident receivers that are part of this action group."""

    @overload
    def __init__(
        self,
        *,
        group_short_name: str,
        enabled: bool,
        email_receivers: Optional[list["_models.EmailReceiver"]] = None,
        sms_receivers: Optional[list["_models.SmsReceiver"]] = None,
        webhook_receivers: Optional[list["_models.WebhookReceiver"]] = None,
        itsm_receivers: Optional[list["_models.ItsmReceiver"]] = None,
        azure_app_push_receivers: Optional[list["_models.AzureAppPushReceiver"]] = None,
        automation_runbook_receivers: Optional[list["_models.AutomationRunbookReceiver"]] = None,
        voice_receivers: Optional[list["_models.VoiceReceiver"]] = None,
        logic_app_receivers: Optional[list["_models.LogicAppReceiver"]] = None,
        azure_function_receivers: Optional[list["_models.AzureFunctionReceiver"]] = None,
        arm_role_receivers: Optional[list["_models.ArmRoleReceiver"]] = None,
        event_hub_receivers: Optional[list["_models.EventHubReceiver"]] = None,
        incident_receivers: Optional[list["_models.IncidentReceiver"]] = None,
    ) -> None: ...

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

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


class ActionList(_Model):
    """A list of Activity Log Alert rule actions.

    :ivar action_groups: The list of the Action Groups.
    :vartype action_groups: list[~azure.mgmt.monitor.models.ActionGroup]
    """

    action_groups: Optional[list["_models.ActionGroup"]] = rest_field(
        name="actionGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of the Action Groups."""

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

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

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


class Actions(_Model):
    """Actions to invoke when the alert fires.

    :ivar action_groups: Action Group resource Ids to invoke when the alert fires.
    :vartype action_groups: list[str]
    :ivar custom_properties: The properties of an alert payload.
    :vartype custom_properties: dict[str, str]
    :ivar action_properties: The properties of an action properties.
    :vartype action_properties: dict[str, str]
    """

    action_groups: Optional[list[str]] = rest_field(
        name="actionGroups", visibility=["read", "create", "update", "delete", "query"]
    )
    """Action Group resource Ids to invoke when the alert fires."""
    custom_properties: Optional[dict[str, str]] = rest_field(
        name="customProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an alert payload."""
    action_properties: Optional[dict[str, str]] = rest_field(
        name="actionProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an action properties."""

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

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

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


class ActivityLogAlertErrorResponse(_Model):
    """The error response.

    :ivar code: The error code.
    :vartype code: str
    :ivar message: The error message indicating why the operation failed.
    :vartype message: str
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """The error code."""
    message: Optional[str] = rest_field(visibility=["read"])
    """The error message indicating why the operation failed."""


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


class ActivityLogAlertResource(ProxyResource):
    """An Activity Log Alert rule 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.monitor.models.SystemData
    :ivar properties: The Activity Log Alert rule properties of the resource.
    :vartype properties: ~azure.mgmt.monitor.models.AlertRuleProperties
    :ivar tags: The tags of the resource.
    :vartype tags: dict[str, str]
    :ivar location: The location of the resource. Azure Activity Log Alert rules are supported on
     Global, West Europe and North Europe regions.
    :vartype location: str
    """

    properties: Optional["_models.AlertRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Activity Log Alert rule properties of the resource."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tags of the resource."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The location of the resource. Azure Activity Log Alert rules are supported on Global, West
     Europe and North Europe regions."""

    __flattened_items = ["tenant_scope", "scopes", "condition", "actions", "enabled", "description"]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.AlertRuleProperties"] = None,
        tags: Optional[dict[str, 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:
        _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 AdxDestination(_Model):
    """Azure Data Explorer (Adx) destination.

    :ivar resource_id: The ARM resource id of the Adx resource.
    :vartype resource_id: str
    :ivar database_name: The name of the database to which data will be ingested.
    :vartype database_name: str
    :ivar ingestion_uri: The ingestion uri of the Adx resource.
    :vartype ingestion_uri: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ARM resource id of the Adx resource."""
    database_name: Optional[str] = rest_field(
        name="databaseName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the database to which data will be ingested."""
    ingestion_uri: Optional[str] = rest_field(name="ingestionUri", visibility=["read"])
    """The ingestion uri of the Adx resource."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class AgentSetting(_Model):
    """A setting used to control an agent behavior on a host machine.

    :ivar name: The name of the setting. Must be part of the list of supported settings. Known
     values are: "MaxDiskQuotaInMB", "UseTimeReceivedForForwardedEvents", and "Tags".
    :vartype name: str or ~azure.mgmt.monitor.models.KnownAgentSettingName
    :ivar value: The value of the setting.
    :vartype value: str
    """

    name: Optional[Union[str, "_models.KnownAgentSettingName"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the setting. Must be part of the list of supported settings. Known values are:
     \"MaxDiskQuotaInMB\", \"UseTimeReceivedForForwardedEvents\", and \"Tags\"."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the setting."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[Union[str, "_models.KnownAgentSettingName"]] = 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 AgentSettingsSpec(_Model):
    """An agent setting.

    :ivar logs: All the settings that are applicable to the logs agent (AMA).
    :vartype logs: list[~azure.mgmt.monitor.models.AgentSetting]
    """

    logs: Optional[list["_models.AgentSetting"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """All the settings that are applicable to the logs agent (AMA)."""

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

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

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


class AlertRuleAllOfCondition(_Model):
    """An Activity Log Alert rule condition that is met when all its member conditions are met.

    :ivar all_of: The list of Activity Log Alert rule conditions. Required.
    :vartype all_of: list[~azure.mgmt.monitor.models.AlertRuleAnyOfOrLeafCondition]
    """

    all_of: list["_models.AlertRuleAnyOfOrLeafCondition"] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Activity Log Alert rule conditions. Required."""

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

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

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


class AlertRuleLeafCondition(_Model):
    """An Activity Log Alert rule condition that is met by comparing the field and value of an
    Activity Log event. This condition must contain 'field' and either 'equals' or 'containsAny'.

    :ivar field: The name of the Activity Log event's field that this condition will examine. The
     possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller',
     'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus',
     'resourceType', or anything beginning with 'properties'.
    :vartype field: str
    :ivar equals: The value of the event's field will be compared to this value (case-insensitive)
     to determine if the condition is met.
    :vartype equals: str
    :ivar contains_any: The value of the event's field will be compared to the values in this array
     (case-insensitive) to determine if the condition is met.
    :vartype contains_any: list[str]
    """

    field: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Activity Log event's field that this condition will examine. The possible
     values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level',
     'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or
     anything beginning with 'properties'."""
    equals: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the event's field will be compared to this value (case-insensitive) to determine
     if the condition is met."""
    contains_any: Optional[list[str]] = rest_field(
        name="containsAny", visibility=["read", "create", "update", "delete", "query"]
    )
    """The value of the event's field will be compared to the values in this array (case-insensitive)
     to determine if the condition is met."""

    @overload
    def __init__(
        self,
        *,
        field: Optional[str] = None,
        equals: Optional[str] = None,
        contains_any: 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 AlertRuleAnyOfOrLeafCondition(AlertRuleLeafCondition):
    """An Activity Log Alert rule condition that is met when all its member conditions are met.
    Each condition can be of one of the following types:
    **Important**: Each type has its unique subset of properties. Properties from different types
    CANNOT exist in one condition.

    * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'.
    _Please note, 'anyOf' should __not__ be set in a Leaf Condition._
    * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions).
    _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf
    Condition._.

    :ivar field: The name of the Activity Log event's field that this condition will examine. The
     possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller',
     'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus',
     'resourceType', or anything beginning with 'properties'.
    :vartype field: str
    :ivar equals: The value of the event's field will be compared to this value (case-insensitive)
     to determine if the condition is met.
    :vartype equals: str
    :ivar contains_any: The value of the event's field will be compared to the values in this array
     (case-insensitive) to determine if the condition is met.
    :vartype contains_any: list[str]
    :ivar any_of: An Activity Log Alert rule condition that is met when at least one of its member
     leaf conditions are met.
    :vartype any_of: list[~azure.mgmt.monitor.models.AlertRuleLeafCondition]
    """

    any_of: Optional[list["_models.AlertRuleLeafCondition"]] = rest_field(
        name="anyOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """An Activity Log Alert rule condition that is met when at least one of its member leaf
     conditions are met."""

    @overload
    def __init__(
        self,
        *,
        field: Optional[str] = None,
        equals: Optional[str] = None,
        contains_any: Optional[list[str]] = None,
        any_of: Optional[list["_models.AlertRuleLeafCondition"]] = None,
    ) -> None: ...

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

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


class AlertRulePatchObject(_Model):
    """An Activity Log Alert rule object for the body of patch operations.

    :ivar tags: The resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The activity log alert settings for an update operation.
    :vartype properties: ~azure.mgmt.monitor.models.AlertRulePatchProperties
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource tags."""
    properties: Optional["_models.AlertRulePatchProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The activity log alert settings for an update operation."""

    __flattened_items = ["enabled"]

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

    @overload
    def __init__(self, mapping: Mapping[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 AlertRulePatchProperties(_Model):
    """An Activity Log Alert rule properties for patch operations.

    :ivar enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log
     Alert rule is not enabled, then none of its actions will be activated.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not
     enabled, then none of its actions will be activated."""

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

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

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


class AlertRuleProperties(_Model):
    """An Azure Activity Log Alert rule.

    :ivar tenant_scope: The tenant GUID. Must be provided for tenant-level and management group
     events rules.
    :vartype tenant_scope: str
    :ivar scopes: A list of resource IDs that will be used as prefixes. The alert will only apply
     to Activity Log events with resource IDs that fall under one of these prefixes. This list must
     include at least one item.
    :vartype scopes: list[str]
    :ivar condition: The condition that will cause this alert to activate. Required.
    :vartype condition: ~azure.mgmt.monitor.models.AlertRuleAllOfCondition
    :ivar actions: The actions that will activate when the condition is met. Required.
    :vartype actions: ~azure.mgmt.monitor.models.ActionList
    :ivar enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log
     Alert rule is not enabled, then none of its actions will be activated.
    :vartype enabled: bool
    :ivar description: A description of this Activity Log Alert rule.
    :vartype description: str
    """

    tenant_scope: Optional[str] = rest_field(
        name="tenantScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """The tenant GUID. Must be provided for tenant-level and management group events rules."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log
     events with resource IDs that fall under one of these prefixes. This list must include at least
     one item."""
    condition: "_models.AlertRuleAllOfCondition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The condition that will cause this alert to activate. Required."""
    actions: "_models.ActionList" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The actions that will activate when the condition is met. Required."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not
     enabled, then none of its actions will be activated."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of this Activity Log Alert rule."""

    @overload
    def __init__(
        self,
        *,
        condition: "_models.AlertRuleAllOfCondition",
        actions: "_models.ActionList",
        tenant_scope: Optional[str] = None,
        scopes: Optional[list[str]] = None,
        enabled: Optional[bool] = 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 ApplicationInsights(_Model):
    """ApplicationInsights.

    :ivar resource_id: Id of the application insights resource. Required.
    :vartype resource_id: str
    :ivar name: The name of the reference used as an alias when referencing this application
     insights in Otel data sources. Required.
    :vartype name: str
    """

    resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"])
    """Id of the application insights resource. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the reference used as an alias when referencing this application insights in Otel
     data sources. Required."""

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

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

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


class ArmRoleReceiver(_Model):
    """An arm role receiver.

    :ivar name: The name of the arm role receiver. Names must be unique across all receivers within
     an action group. Required.
    :vartype name: str
    :ivar role_id: The arm role id. Required.
    :vartype role_id: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the arm role receiver. Names must be unique across all receivers within an action
     group. Required."""
    role_id: str = rest_field(name="roleId", visibility=["read", "create", "update", "delete", "query"])
    """The arm role id. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        role_id: str,
        use_common_alert_schema: 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 AutomationRunbookReceiver(_Model):
    """The Azure Automation Runbook notification receiver.

    :ivar automation_account_id: The Azure automation account Id which holds this runbook and
     authenticate to Azure resource. Required.
    :vartype automation_account_id: str
    :ivar runbook_name: The name for this runbook. Required.
    :vartype runbook_name: str
    :ivar webhook_resource_id: The resource id for webhook linked to this runbook. Required.
    :vartype webhook_resource_id: str
    :ivar is_global_runbook: Indicates whether this instance is global runbook. Required.
    :vartype is_global_runbook: bool
    :ivar name: Indicates name of the webhook.
    :vartype name: str
    :ivar service_uri: The URI where webhooks should be sent.
    :vartype service_uri: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar managed_identity: The principal id of the managed identity. The value can be "None",
     "SystemAssigned".
    :vartype managed_identity: str
    """

    automation_account_id: str = rest_field(
        name="automationAccountId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Azure automation account Id which holds this runbook and authenticate to Azure resource.
     Required."""
    runbook_name: str = rest_field(name="runbookName", visibility=["read", "create", "update", "delete", "query"])
    """The name for this runbook. Required."""
    webhook_resource_id: str = rest_field(
        name="webhookResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource id for webhook linked to this runbook. Required."""
    is_global_runbook: bool = rest_field(
        name="isGlobalRunbook", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether this instance is global runbook. Required."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates name of the webhook."""
    service_uri: Optional[str] = rest_field(
        name="serviceUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The URI where webhooks should be sent."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The principal id of the managed identity. The value can be \"None\", \"SystemAssigned\"."""

    @overload
    def __init__(
        self,
        *,
        automation_account_id: str,
        runbook_name: str,
        webhook_resource_id: str,
        is_global_runbook: bool,
        name: Optional[str] = None,
        service_uri: Optional[str] = None,
        use_common_alert_schema: Optional[bool] = None,
        managed_identity: Optional[str] = None,
    ) -> None: ...

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

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


class AutoscaleErrorResponse(_Model):
    """Describes the format of Error response.

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.monitor.models.AutoscaleErrorResponseError
    :ivar system_data: The system metadata related to the response.
    :vartype system_data: ~azure.mgmt.monitor.models.SystemData
    """

    error: Optional["_models.AutoscaleErrorResponseError"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The error object."""
    system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"])
    """The system metadata related to the response."""

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

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

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


class AutoscaleErrorResponseError(_Model):
    """The error object.

    :ivar code: One of a server-defined set of error codes.
    :vartype code: str
    :ivar message: A human-readable representation of the error.
    :vartype message: str
    :ivar target: The target of the particular error.
    :vartype target: str
    :ivar details: A human-readable representation of the error's details.
    :vartype details: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """One of a server-defined set of error codes."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A human-readable representation of the error."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error."""
    details: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A human-readable representation of the error's details."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        target: Optional[str] = None,
        details: 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 AutoscaleNotification(_Model):
    """Autoscale notification.

    :ivar operation: the operation associated with the notification and its value must be "scale".
     Required. "Scale"
    :vartype operation: str or ~azure.mgmt.monitor.models.OperationType
    :ivar email: the email notification.
    :vartype email: ~azure.mgmt.monitor.models.EmailNotification
    :ivar webhooks: the collection of webhook notifications.
    :vartype webhooks: list[~azure.mgmt.monitor.models.WebhookNotification]
    """

    operation: Union[str, "_models.OperationType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the operation associated with the notification and its value must be \"scale\". Required.
     \"Scale\""""
    email: Optional["_models.EmailNotification"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the email notification."""
    webhooks: Optional[list["_models.WebhookNotification"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the collection of webhook notifications."""

    @overload
    def __init__(
        self,
        *,
        operation: Union[str, "_models.OperationType"],
        email: Optional["_models.EmailNotification"] = None,
        webhooks: Optional[list["_models.WebhookNotification"]] = None,
    ) -> None: ...

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

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


class AutoscaleProfile(_Model):
    """Autoscale profile.

    :ivar name: the name of the profile. Required.
    :vartype name: str
    :ivar capacity: the number of instances that can be used during this profile. Required.
    :vartype capacity: ~azure.mgmt.monitor.models.ScaleCapacity
    :ivar rules: the collection of rules that provide the triggers and parameters for the scaling
     action. A maximum of 10 rules can be specified. Required.
    :vartype rules: list[~azure.mgmt.monitor.models.ScaleRule]
    :ivar fixed_date: the specific date-time for the profile. This element is not used if the
     Recurrence element is used.
    :vartype fixed_date: ~azure.mgmt.monitor.models.TimeWindow
    :ivar recurrence: the repeating times at which this profile begins. This element is not used if
     the FixedDate element is used.
    :vartype recurrence: ~azure.mgmt.monitor.models.Recurrence
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the name of the profile. Required."""
    capacity: "_models.ScaleCapacity" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the number of instances that can be used during this profile. Required."""
    rules: list["_models.ScaleRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the collection of rules that provide the triggers and parameters for the scaling action. A
     maximum of 10 rules can be specified. Required."""
    fixed_date: Optional["_models.TimeWindow"] = rest_field(
        name="fixedDate", visibility=["read", "create", "update", "delete", "query"]
    )
    """the specific date-time for the profile. This element is not used if the Recurrence element is
     used."""
    recurrence: Optional["_models.Recurrence"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the repeating times at which this profile begins. This element is not used if the FixedDate
     element is used."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        capacity: "_models.ScaleCapacity",
        rules: list["_models.ScaleRule"],
        fixed_date: Optional["_models.TimeWindow"] = None,
        recurrence: Optional["_models.Recurrence"] = None,
    ) -> None: ...

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

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


class AutoscaleSetting(_Model):
    """A setting that contains all of the configuration for the automatic scaling of a resource.

    :ivar profiles: the collection of automatic scaling profiles that specify different scaling
     parameters for different time periods. A maximum of 20 profiles can be specified. Required.
    :vartype profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile]
    :ivar notifications: the collection of notifications.
    :vartype notifications: list[~azure.mgmt.monitor.models.AutoscaleNotification]
    :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the
     resource. The default value is 'false'.
    :vartype enabled: bool
    :ivar predictive_autoscale_policy: the predictive autoscale policy mode.
    :vartype predictive_autoscale_policy: ~azure.mgmt.monitor.models.PredictiveAutoscalePolicy
    :ivar name: the name of the autoscale setting.
    :vartype name: str
    :ivar target_resource_uri: the resource identifier of the resource that the autoscale setting
     should be added to.
    :vartype target_resource_uri: str
    :ivar target_resource_location: the location of the resource that the autoscale setting should
     be added to.
    :vartype target_resource_location: str
    """

    profiles: list["_models.AutoscaleProfile"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the collection of automatic scaling profiles that specify different scaling parameters for
     different time periods. A maximum of 20 profiles can be specified. Required."""
    notifications: Optional[list["_models.AutoscaleNotification"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the collection of notifications."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default
     value is 'false'."""
    predictive_autoscale_policy: Optional["_models.PredictiveAutoscalePolicy"] = rest_field(
        name="predictiveAutoscalePolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """the predictive autoscale policy mode."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the name of the autoscale setting."""
    target_resource_uri: Optional[str] = rest_field(
        name="targetResourceUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """the resource identifier of the resource that the autoscale setting should be added to."""
    target_resource_location: Optional[str] = rest_field(
        name="targetResourceLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """the location of the resource that the autoscale setting should be added to."""

    @overload
    def __init__(
        self,
        *,
        profiles: list["_models.AutoscaleProfile"],
        notifications: Optional[list["_models.AutoscaleNotification"]] = None,
        enabled: Optional[bool] = None,
        predictive_autoscale_policy: Optional["_models.PredictiveAutoscalePolicy"] = None,
        name: Optional[str] = None,
        target_resource_uri: Optional[str] = None,
        target_resource_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 AutoscaleSettingResource(TrackedResource):
    """The autoscale setting 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: The autoscale setting of the resource. Required.
    :vartype properties: ~azure.mgmt.monitor.models.AutoscaleSetting
    """

    properties: "_models.AutoscaleSetting" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The autoscale setting of the resource. Required."""

    __flattened_items = [
        "profiles",
        "notifications",
        "enabled",
        "predictive_autoscale_policy",
        "name",
        "target_resource_uri",
        "target_resource_location",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.AutoscaleSetting",
        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 AutoscaleSettingResourcePatch(_Model):
    """The autoscale setting object for patch operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The autoscale setting properties of the update operation.
    :vartype properties: ~azure.mgmt.monitor.models.AutoscaleSetting
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    properties: Optional["_models.AutoscaleSetting"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The autoscale setting properties of the update operation."""

    __flattened_items = [
        "profiles",
        "notifications",
        "enabled",
        "predictive_autoscale_policy",
        "name",
        "target_resource_uri",
        "target_resource_location",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 AzureAppPushReceiver(_Model):
    """The Azure mobile App push notification receiver.

    :ivar name: The name of the Azure mobile app push receiver. Names must be unique across all
     receivers within an action group. Required.
    :vartype name: str
    :ivar email_address: The email address registered for the Azure mobile app. Required.
    :vartype email_address: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Azure mobile app push receiver. Names must be unique across all receivers
     within an action group. Required."""
    email_address: str = rest_field(name="emailAddress", visibility=["read", "create", "update", "delete", "query"])
    """The email address registered for the Azure mobile app. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        email_address: 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 AzureFunctionReceiver(_Model):
    """An azure function receiver.

    :ivar name: The name of the azure function receiver. Names must be unique across all receivers
     within an action group. Required.
    :vartype name: str
    :ivar function_app_resource_id: The azure resource id of the function app. Required.
    :vartype function_app_resource_id: str
    :ivar function_name: The function name in the function app. Required.
    :vartype function_name: str
    :ivar http_trigger_url: The http trigger url where http request sent to. Required.
    :vartype http_trigger_url: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar managed_identity: The principal id of the managed identity. The value can be "None",
     "SystemAssigned".
    :vartype managed_identity: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the azure function receiver. Names must be unique across all receivers within an
     action group. Required."""
    function_app_resource_id: str = rest_field(
        name="functionAppResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The azure resource id of the function app. Required."""
    function_name: str = rest_field(name="functionName", visibility=["read", "create", "update", "delete", "query"])
    """The function name in the function app. Required."""
    http_trigger_url: str = rest_field(
        name="httpTriggerUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """The http trigger url where http request sent to. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The principal id of the managed identity. The value can be \"None\", \"SystemAssigned\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        function_app_resource_id: str,
        function_name: str,
        http_trigger_url: str,
        use_common_alert_schema: Optional[bool] = None,
        managed_identity: Optional[str] = None,
    ) -> None: ...

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

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


class AzureMonitorMetricsDestination(_Model):
    """Azure Monitor Metrics destination.

    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        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 AzureMonitorPrivateLinkScope(TrackedResource):
    """An Azure Monitor PrivateLinkScope definition.

    :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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: Properties that define a Azure Monitor PrivateLinkScope resource. Required.
    :vartype properties: ~azure.mgmt.monitor.models.AzureMonitorPrivateLinkScopeProperties
    """

    properties: "_models.AzureMonitorPrivateLinkScopeProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties that define a Azure Monitor PrivateLinkScope resource. Required."""

    __flattened_items = ["provisioning_state", "private_endpoint_connections", "access_mode_settings"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.AzureMonitorPrivateLinkScopeProperties",
        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 AzureMonitorPrivateLinkScopeProperties(_Model):
    """Properties that define a Azure Monitor PrivateLinkScope resource.

    :ivar provisioning_state: Current state of this PrivateLinkScope: whether or not is has been
     provisioned within the resource group it is defined. Users cannot change this value but are
     able to read from it. Known values are: "Succeeded", "Failed", "Deleting", and "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.PrivateLinkScopeProvisioningState
    :ivar private_endpoint_connections: List of private endpoint connections.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.monitor.models.PrivateEndpointConnection]
    :ivar access_mode_settings: Access mode settings. Required.
    :vartype access_mode_settings: ~azure.mgmt.monitor.models.AccessModeSettings
    """

    provisioning_state: Optional[Union[str, "_models.PrivateLinkScopeProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Current state of this PrivateLinkScope: whether or not is has been provisioned within the
     resource group it is defined. Users cannot change this value but are able to read from it.
     Known values are: \"Succeeded\", \"Failed\", \"Deleting\", and \"Canceled\"."""
    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """List of private endpoint connections."""
    access_mode_settings: "_models.AccessModeSettings" = rest_field(
        name="accessModeSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Access mode settings. Required."""

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

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

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


class BaselineMetadata(_Model):
    """Represents a baseline metadata value.

    :ivar name: Name of the baseline metadata. Required.
    :vartype name: str
    :ivar value: Value of the baseline metadata. Required.
    :vartype value: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the baseline metadata. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Value of the baseline metadata. Required."""

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

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

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


class ColumnDefinition(_Model):
    """Definition of custom data column.

    :ivar name: The name of the column.
    :vartype name: str
    :ivar type: The type of the column data. Known values are: "string", "int", "long", "real",
     "boolean", "datetime", and "dynamic".
    :vartype type: str or ~azure.mgmt.monitor.models.KnownColumnDefinitionType
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the column."""
    type: Optional[Union[str, "_models.KnownColumnDefinitionType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the column data. Known values are: \"string\", \"int\", \"long\", \"real\",
     \"boolean\", \"datetime\", and \"dynamic\"."""

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

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

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


class Condition(_Model):
    """A condition of the scheduled query rule.

    :ivar criterion_type: Specifies the type of threshold criteria. Known values are:
     "StaticThresholdCriterion" and "DynamicThresholdCriterion".
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.CriterionType
    :ivar query: Log query alert.
    :vartype query: str
    :ivar time_aggregation: Aggregation type. Relevant and required only for rules of the kind
     LogAlert. Known values are: "Count", "Average", "Minimum", "Maximum", and "Total".
    :vartype time_aggregation: str or ~azure.mgmt.monitor.models.TimeAggregation
    :ivar metric_measure_column: The column containing the metric measure number. Relevant only for
     rules of the kind LogAlert.
    :vartype metric_measure_column: str
    :ivar resource_id_column: The column containing the resource id. The content of the column must
     be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
    :vartype resource_id_column: str
    :ivar dimensions: List of Dimensions conditions.
    :vartype dimensions: list[~azure.mgmt.monitor.models.Dimension]
    :ivar operator: The criteria operator. Relevant and required only for rules of the kind
     LogAlert. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan",
     "LessThanOrEqual", and "GreaterOrLessThan".
    :vartype operator: str or ~azure.mgmt.monitor.models.ConditionOperator
    :ivar threshold: the criteria threshold value that activates the alert. Relevant and required
     only for static threshold rules of the kind LogAlert.
    :vartype threshold: float
    :ivar alert_sensitivity: The extent of deviation required to trigger an alert. Allowed values
     are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric
     series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
    :vartype alert_sensitivity: str
    :ivar ignore_data_before: Use this option to set the date from which to start learning the
     metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only
     for dynamic threshold rules of the kind LogAlert.
    :vartype ignore_data_before: ~datetime.datetime
    :ivar failing_periods: The minimum number of violations required within the selected lookback
     time window required to raise an alert. Relevant only for rules of the kind LogAlert.
    :vartype failing_periods: ~azure.mgmt.monitor.models.ConditionFailingPeriods
    :ivar metric_name: The name of the metric to be sent. Relevant and required only for rules of
     the kind LogToMetric.
    :vartype metric_name: str
    :ivar min_recurrence_count: The minimum results count that should be found for triggering an
     alert. Relevant only for rules of the kind SimpleLogAlert.
    :vartype min_recurrence_count: int
    """

    criterion_type: Optional[Union[str, "_models.CriterionType"]] = rest_field(
        name="criterionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of threshold criteria. Known values are: \"StaticThresholdCriterion\" and
     \"DynamicThresholdCriterion\"."""
    query: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Log query alert."""
    time_aggregation: Optional[Union[str, "_models.TimeAggregation"]] = rest_field(
        name="timeAggregation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Aggregation type. Relevant and required only for rules of the kind LogAlert. Known values are:
     \"Count\", \"Average\", \"Minimum\", \"Maximum\", and \"Total\"."""
    metric_measure_column: Optional[str] = rest_field(
        name="metricMeasureColumn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The column containing the metric measure number. Relevant only for rules of the kind LogAlert."""
    resource_id_column: Optional[str] = rest_field(
        name="resourceIdColumn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The column containing the resource id. The content of the column must be a uri formatted as
     resource id. Relevant only for rules of the kind LogAlert."""
    dimensions: Optional[list["_models.Dimension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Dimensions conditions."""
    operator: Optional[Union[str, "_models.ConditionOperator"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The criteria operator. Relevant and required only for rules of the kind LogAlert. Known values
     are: \"Equals\", \"GreaterThan\", \"GreaterThanOrEqual\", \"LessThan\", \"LessThanOrEqual\",
     and \"GreaterOrLessThan\"."""
    threshold: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the criteria threshold value that activates the alert. Relevant and required only for static
     threshold rules of the kind LogAlert."""
    alert_sensitivity: Optional[str] = rest_field(
        name="alertSensitivity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and
     'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only
     for dynamic threshold rules of the kind LogAlert."""
    ignore_data_before: Optional[datetime.datetime] = rest_field(
        name="ignoreDataBefore", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Use this option to set the date from which to start learning the metric historical data and
     calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules
     of the kind LogAlert."""
    failing_periods: Optional["_models.ConditionFailingPeriods"] = rest_field(
        name="failingPeriods", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum number of violations required within the selected lookback time window required to
     raise an alert. Relevant only for rules of the kind LogAlert."""
    metric_name: Optional[str] = rest_field(
        name="metricName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the metric to be sent. Relevant and required only for rules of the kind
     LogToMetric."""
    min_recurrence_count: Optional[int] = rest_field(
        name="minRecurrenceCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum results count that should be found for triggering an alert. Relevant only for rules
     of the kind SimpleLogAlert."""

    @overload
    def __init__(
        self,
        *,
        criterion_type: Optional[Union[str, "_models.CriterionType"]] = None,
        query: Optional[str] = None,
        time_aggregation: Optional[Union[str, "_models.TimeAggregation"]] = None,
        metric_measure_column: Optional[str] = None,
        resource_id_column: Optional[str] = None,
        dimensions: Optional[list["_models.Dimension"]] = None,
        operator: Optional[Union[str, "_models.ConditionOperator"]] = None,
        threshold: Optional[float] = None,
        alert_sensitivity: Optional[str] = None,
        ignore_data_before: Optional[datetime.datetime] = None,
        failing_periods: Optional["_models.ConditionFailingPeriods"] = None,
        metric_name: Optional[str] = None,
        min_recurrence_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 ConditionFailingPeriods(_Model):
    """The minimum number of violations required within the selected lookback time window required to
    raise an alert. Relevant only for rules of the kind LogAlert.

    :ivar number_of_evaluation_periods: The number of aggregated lookback points. The lookback time
     window is calculated based on the aggregation granularity (windowSize) and the selected number
     of aggregated points. Default value is 1.
    :vartype number_of_evaluation_periods: int
    :ivar min_failing_periods_to_alert: The number of violations to trigger an alert. Should be
     smaller or equal to numberOfEvaluationPeriods. Default value is 1.
    :vartype min_failing_periods_to_alert: int
    """

    number_of_evaluation_periods: Optional[int] = rest_field(
        name="numberOfEvaluationPeriods", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of aggregated lookback points. The lookback time window is calculated based on the
     aggregation granularity (windowSize) and the selected number of aggregated points. Default
     value is 1."""
    min_failing_periods_to_alert: Optional[int] = rest_field(
        name="minFailingPeriodsToAlert", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of violations to trigger an alert. Should be smaller or equal to
     numberOfEvaluationPeriods. Default value is 1."""

    @overload
    def __init__(
        self,
        *,
        number_of_evaluation_periods: Optional[int] = None,
        min_failing_periods_to_alert: 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 ConfigurationAccessEndpointSpec(_Model):
    """Definition of the endpoint used for accessing configuration.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """

    endpoint: Optional[str] = rest_field(visibility=["read"])
    """The endpoint. This property is READ-ONLY."""


class Context(_Model):
    """The context info.

    :ivar notification_source: The source of the notification request.
    :vartype notification_source: str
    :ivar context_type: The context id type.
    :vartype context_type: str
    """

    notification_source: Optional[str] = rest_field(
        name="notificationSource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The source of the notification request."""
    context_type: Optional[str] = rest_field(
        name="contextType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The context id type."""

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

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

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


class DataCollectionEndpoint(_Model):
    """Definition of data collection endpoint.

    :ivar description: Description of the data collection endpoint.
    :vartype description: str
    :ivar immutable_id: The immutable ID of this data collection endpoint resource. This property
     is READ-ONLY.
    :vartype immutable_id: str
    :ivar configuration_access: The endpoint used by clients to access their configuration.
    :vartype configuration_access:
     ~azure.mgmt.monitor.models.DataCollectionEndpointConfigurationAccess
    :ivar logs_ingestion: The endpoint used by clients to ingest logs.
    :vartype logs_ingestion: ~azure.mgmt.monitor.models.DataCollectionEndpointLogsIngestion
    :ivar metrics_ingestion: The endpoint used by clients to ingest metrics.
    :vartype metrics_ingestion: ~azure.mgmt.monitor.models.DataCollectionEndpointMetricsIngestion
    :ivar network_acls: Network access control rules for the endpoints.
    :vartype network_acls: ~azure.mgmt.monitor.models.DataCollectionEndpointNetworkAcls
    :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known
     values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionEndpointProvisioningState
    :ivar private_link_scoped_resources: List of Azure Monitor Private Link Scope Resources to
     which this data collection endpoint resource is associated. This property is READ-ONLY.
    :vartype private_link_scoped_resources:
     list[~azure.mgmt.monitor.models.PrivateLinkScopedResource]
    :ivar failover_configuration: Metadata for the resource. This property can only be updated by
     Log Analytics Control Plane for Data Collection Endpoint with Log Analytics Destination.
    :vartype failover_configuration:
     ~azure.mgmt.monitor.models.DataCollectionEndpointFailoverConfiguration
    :ivar metadata: Metadata for the resource. This property can only be updated by Log Analytics
     Control Plane for Data Collection Endpoint with Log Analytics Destination.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionEndpointMetadata
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the data collection endpoint."""
    immutable_id: Optional[str] = rest_field(
        name="immutableId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The immutable ID of this data collection endpoint resource. This property is READ-ONLY."""
    configuration_access: Optional["_models.DataCollectionEndpointConfigurationAccess"] = rest_field(
        name="configurationAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint used by clients to access their configuration."""
    logs_ingestion: Optional["_models.DataCollectionEndpointLogsIngestion"] = rest_field(
        name="logsIngestion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint used by clients to ingest logs."""
    metrics_ingestion: Optional["_models.DataCollectionEndpointMetricsIngestion"] = rest_field(
        name="metricsIngestion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The endpoint used by clients to ingest metrics."""
    network_acls: Optional["_models.DataCollectionEndpointNetworkAcls"] = rest_field(
        name="networkAcls", visibility=["read", "create", "update", "delete", "query"]
    )
    """Network access control rules for the endpoints."""
    provisioning_state: Optional[Union[str, "_models.KnownDataCollectionEndpointProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The resource provisioning state. This property is READ-ONLY. Known values are: \"Creating\",
     \"Updating\", \"Deleting\", \"Succeeded\", \"Canceled\", and \"Failed\"."""
    private_link_scoped_resources: Optional[list["_models.PrivateLinkScopedResource"]] = rest_field(
        name="privateLinkScopedResources", visibility=["read"]
    )
    """List of Azure Monitor Private Link Scope Resources to which this data collection endpoint
     resource is associated. This property is READ-ONLY."""
    failover_configuration: Optional["_models.DataCollectionEndpointFailoverConfiguration"] = rest_field(
        name="failoverConfiguration", visibility=["read"]
    )
    """Metadata for the resource. This property can only be updated by Log Analytics Control Plane for
     Data Collection Endpoint with Log Analytics Destination."""
    metadata: Optional["_models.DataCollectionEndpointMetadata"] = rest_field(visibility=["read"])
    """Metadata for the resource. This property can only be updated by Log Analytics Control Plane for
     Data Collection Endpoint with Log Analytics Destination."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        immutable_id: Optional[str] = None,
        configuration_access: Optional["_models.DataCollectionEndpointConfigurationAccess"] = None,
        logs_ingestion: Optional["_models.DataCollectionEndpointLogsIngestion"] = None,
        metrics_ingestion: Optional["_models.DataCollectionEndpointMetricsIngestion"] = None,
        network_acls: Optional["_models.DataCollectionEndpointNetworkAcls"] = None,
    ) -> None: ...

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

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


class DataCollectionEndpointConfigurationAccess(ConfigurationAccessEndpointSpec):  # pylint: disable=name-too-long
    """The endpoint used by clients to access their configuration.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """


class FailoverConfigurationSpec(_Model):
    """FailoverConfigurationSpec.

    :ivar active_location: Active location where data flow will occur.
    :vartype active_location: str
    :ivar locations: Locations that are configured for failover.
    :vartype locations: list[~azure.mgmt.monitor.models.LocationSpec]
    """

    active_location: Optional[str] = rest_field(
        name="activeLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Active location where data flow will occur."""
    locations: Optional[list["_models.LocationSpec"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Locations that are configured for failover."""

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

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

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


class DataCollectionEndpointFailoverConfiguration(FailoverConfigurationSpec):  # pylint: disable=name-too-long
    """Metadata for the resource. This property can only be updated by Log Analytics Control Plane for
    Data Collection Endpoint with Log Analytics Destination.

    :ivar active_location: Active location where data flow will occur.
    :vartype active_location: str
    :ivar locations: Locations that are configured for failover.
    :vartype locations: list[~azure.mgmt.monitor.models.LocationSpec]
    """

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

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

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


class LogsIngestionEndpointSpec(_Model):
    """Definition of the endpoint used for ingesting logs.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """

    endpoint: Optional[str] = rest_field(visibility=["read"])
    """The endpoint. This property is READ-ONLY."""


class DataCollectionEndpointLogsIngestion(LogsIngestionEndpointSpec):
    """The endpoint used by clients to ingest logs.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """


class Metadata(_Model):
    """Metadata about the resource.

    :ivar provisioned_by: Azure offering managing this resource on-behalf-of customer.
    :vartype provisioned_by: str
    :ivar provisioned_by_resource_id: Resource Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_resource_id: str
    :ivar provisioned_by_immutable_id: Immutable Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_immutable_id: str
    """

    provisioned_by: Optional[str] = rest_field(name="provisionedBy", visibility=["read"])
    """Azure offering managing this resource on-behalf-of customer."""
    provisioned_by_resource_id: Optional[str] = rest_field(name="provisionedByResourceId", visibility=["read"])
    """Resource Id of azure offering managing this resource on-behalf-of customer."""
    provisioned_by_immutable_id: Optional[str] = rest_field(name="provisionedByImmutableId", visibility=["read"])
    """Immutable Id of azure offering managing this resource on-behalf-of customer."""


class DataCollectionEndpointMetadata(Metadata):
    """Metadata for the resource. This property can only be updated by Log Analytics Control Plane for
    Data Collection Endpoint with Log Analytics Destination.

    :ivar provisioned_by: Azure offering managing this resource on-behalf-of customer.
    :vartype provisioned_by: str
    :ivar provisioned_by_resource_id: Resource Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_resource_id: str
    :ivar provisioned_by_immutable_id: Immutable Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_immutable_id: str
    """


class MetricsIngestionEndpointSpec(_Model):
    """Definition of the endpoint used for ingesting metrics.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """

    endpoint: Optional[str] = rest_field(visibility=["read"])
    """The endpoint. This property is READ-ONLY."""


class DataCollectionEndpointMetricsIngestion(MetricsIngestionEndpointSpec):
    """The endpoint used by clients to ingest metrics.

    :ivar endpoint: The endpoint. This property is READ-ONLY.
    :vartype endpoint: str
    """


class NetworkRuleSet(_Model):
    """Definition of the network rules.

    :ivar public_network_access: The configuration to set whether network access from public
     internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and
     "SecuredByPerimeter".
    :vartype public_network_access: str or
     ~azure.mgmt.monitor.models.KnownPublicNetworkAccessOptions
    """

    public_network_access: Optional[Union[str, "_models.KnownPublicNetworkAccessOptions"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration to set whether network access from public internet to the endpoints are
     allowed. Known values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\"."""

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

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

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


class DataCollectionEndpointNetworkAcls(NetworkRuleSet):
    """Network access control rules for the endpoints.

    :ivar public_network_access: The configuration to set whether network access from public
     internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and
     "SecuredByPerimeter".
    :vartype public_network_access: str or
     ~azure.mgmt.monitor.models.KnownPublicNetworkAccessOptions
    """

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

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

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


class DataCollectionEndpointResource(TrackedResource):
    """Definition of ARM tracked top level 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties:
    :vartype properties: ~azure.mgmt.monitor.models.DataCollectionEndpointResourceProperties
    :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows".
    :vartype kind: str or ~azure.mgmt.monitor.models.KnownDataCollectionEndpointResourceKind
    :ivar sku: The SKU of the resource.
    :vartype sku: ~azure.mgmt.monitor.models.DataCollectionEndpointResourceSku
    :ivar identity: Managed service identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.DataCollectionEndpointResourceIdentity
    :ivar etag: Resource entity tag (ETag).
    :vartype etag: str
    """

    properties: Optional["_models.DataCollectionEndpointResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    kind: Optional[Union[str, "_models.KnownDataCollectionEndpointResourceKind"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The kind of the resource. Known values are: \"Linux\" and \"Windows\"."""
    sku: Optional["_models.DataCollectionEndpointResourceSku"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The SKU of the resource."""
    identity: Optional["_models.DataCollectionEndpointResourceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed service identity of the resource."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource entity tag (ETag)."""

    __flattened_items = [
        "description",
        "immutable_id",
        "configuration_access",
        "logs_ingestion",
        "metrics_ingestion",
        "network_acls",
        "provisioning_state",
        "private_link_scoped_resources",
        "failover_configuration",
        "metadata",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DataCollectionEndpointResourceProperties"] = None,
        kind: Optional[Union[str, "_models.KnownDataCollectionEndpointResourceKind"]] = None,
        sku: Optional["_models.DataCollectionEndpointResourceSku"] = None,
        identity: Optional["_models.DataCollectionEndpointResourceIdentity"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 ManagedServiceIdentity(_Model):
    """Managed service identity (system assigned and/or user assigned identities).

    :ivar principal_id: The service principal ID of the system assigned identity. This property
     will only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of managed identity assigned to this resource. Required. Known values are:
     "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.monitor.models.ManagedServiceIdentityType
    :ivar user_assigned_identities: The identities assigned to this resource by the user.
    :vartype user_assigned_identities: dict[str, ~azure.mgmt.monitor.models.UserAssignedIdentity]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The service principal ID of the system assigned identity. This property will only be provided
     for a system assigned identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of the system assigned identity. This property will only be provided for a system
     assigned identity."""
    type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of managed identity assigned to this resource. Required. Known values are: \"None\",
     \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The identities assigned to this resource by the user."""

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.ManagedServiceIdentityType"],
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None,
    ) -> None: ...

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

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


class DataCollectionEndpointResourceIdentity(ManagedServiceIdentity):
    """Managed service identity of the resource.

    :ivar principal_id: The service principal ID of the system assigned identity. This property
     will only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of managed identity assigned to this resource. Required. Known values are:
     "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.monitor.models.ManagedServiceIdentityType
    :ivar user_assigned_identities: The identities assigned to this resource by the user.
    :vartype user_assigned_identities: dict[str, ~azure.mgmt.monitor.models.UserAssignedIdentity]
    """

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.ManagedServiceIdentityType"],
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None,
    ) -> None: ...

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

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


class DataCollectionEndpointResourceProperties(DataCollectionEndpoint):
    """DataCollectionEndpointResourceProperties.

    :ivar description: Description of the data collection endpoint.
    :vartype description: str
    :ivar immutable_id: The immutable ID of this data collection endpoint resource. This property
     is READ-ONLY.
    :vartype immutable_id: str
    :ivar configuration_access: The endpoint used by clients to access their configuration.
    :vartype configuration_access:
     ~azure.mgmt.monitor.models.DataCollectionEndpointConfigurationAccess
    :ivar logs_ingestion: The endpoint used by clients to ingest logs.
    :vartype logs_ingestion: ~azure.mgmt.monitor.models.DataCollectionEndpointLogsIngestion
    :ivar metrics_ingestion: The endpoint used by clients to ingest metrics.
    :vartype metrics_ingestion: ~azure.mgmt.monitor.models.DataCollectionEndpointMetricsIngestion
    :ivar network_acls: Network access control rules for the endpoints.
    :vartype network_acls: ~azure.mgmt.monitor.models.DataCollectionEndpointNetworkAcls
    :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known
     values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionEndpointProvisioningState
    :ivar private_link_scoped_resources: List of Azure Monitor Private Link Scope Resources to
     which this data collection endpoint resource is associated. This property is READ-ONLY.
    :vartype private_link_scoped_resources:
     list[~azure.mgmt.monitor.models.PrivateLinkScopedResource]
    :ivar failover_configuration: Metadata for the resource. This property can only be updated by
     Log Analytics Control Plane for Data Collection Endpoint with Log Analytics Destination.
    :vartype failover_configuration:
     ~azure.mgmt.monitor.models.DataCollectionEndpointFailoverConfiguration
    :ivar metadata: Metadata for the resource. This property can only be updated by Log Analytics
     Control Plane for Data Collection Endpoint with Log Analytics Destination.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionEndpointMetadata
    """

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        immutable_id: Optional[str] = None,
        configuration_access: Optional["_models.DataCollectionEndpointConfigurationAccess"] = None,
        logs_ingestion: Optional["_models.DataCollectionEndpointLogsIngestion"] = None,
        metrics_ingestion: Optional["_models.DataCollectionEndpointMetricsIngestion"] = None,
        network_acls: Optional["_models.DataCollectionEndpointNetworkAcls"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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", and "Premium".
    :vartype tier: str or ~azure.mgmt.monitor.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\",
     and \"Premium\"."""
    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 DataCollectionEndpointResourceSku(Sku):
    """The SKU of the resource.

    :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", and "Premium".
    :vartype tier: str or ~azure.mgmt.monitor.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
    """

    @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 DataCollectionRule(_Model):
    """Definition of what monitoring data to collect and where that data should be sent.

    :ivar description: Description of the data collection rule.
    :vartype description: str
    :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY.
    :vartype immutable_id: str
    :ivar data_collection_endpoint_id: The resource ID of the data collection endpoint that this
     rule can be used with.
    :vartype data_collection_endpoint_id: str
    :ivar metadata: Metadata about the resource.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionRuleMetadata
    :ivar endpoints: Defines the ingestion endpoints to send data to via this rule.
    :vartype endpoints: ~azure.mgmt.monitor.models.DataCollectionRuleEndpoints
    :ivar references: Defines all the references that may be used in other sections of the DCR.
    :vartype references: ~azure.mgmt.monitor.models.DataCollectionRuleReferences
    :ivar agent_settings: Agent settings used to modify agent behavior on a given host.
    :vartype agent_settings: ~azure.mgmt.monitor.models.DataCollectionRuleAgentSettings
    :ivar stream_declarations: Declaration of custom streams used in this rule.
    :vartype stream_declarations: dict[str, ~azure.mgmt.monitor.models.StreamDeclaration]
    :ivar data_sources: The specification of data sources. This property is optional and can be
     omitted if the rule is meant to be used via direct calls to the provisioned endpoint.
    :vartype data_sources: ~azure.mgmt.monitor.models.DataCollectionRuleDataSources
    :ivar direct_data_sources: The specification of direct data sources. This property is optional
     and can be omitted.
    :vartype direct_data_sources: ~azure.mgmt.monitor.models.DataCollectionRuleDirectDataSources
    :ivar destinations: The specification of destinations.
    :vartype destinations: ~azure.mgmt.monitor.models.DataCollectionRuleDestinations
    :ivar data_flows: The specification of data flows.
    :vartype data_flows: list[~azure.mgmt.monitor.models.DataFlow]
    :ivar ingestion_quotas: The specification for ingestion limits.
    :vartype ingestion_quotas: ~azure.mgmt.monitor.models.DataCollectionRuleIngestionQuotas
    :ivar provisioning_state: The resource provisioning state. Known values are: "Creating",
     "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionRuleProvisioningState
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the data collection rule."""
    immutable_id: Optional[str] = rest_field(name="immutableId", visibility=["read"])
    """The immutable ID of this data collection rule. This property is READ-ONLY."""
    data_collection_endpoint_id: Optional[str] = rest_field(
        name="dataCollectionEndpointId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the data collection endpoint that this rule can be used with."""
    metadata: Optional["_models.DataCollectionRuleMetadata"] = rest_field(visibility=["read"])
    """Metadata about the resource."""
    endpoints: Optional["_models.DataCollectionRuleEndpoints"] = rest_field(visibility=["read"])
    """Defines the ingestion endpoints to send data to via this rule."""
    references: Optional["_models.DataCollectionRuleReferences"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines all the references that may be used in other sections of the DCR."""
    agent_settings: Optional["_models.DataCollectionRuleAgentSettings"] = rest_field(
        name="agentSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Agent settings used to modify agent behavior on a given host."""
    stream_declarations: Optional[dict[str, "_models.StreamDeclaration"]] = rest_field(
        name="streamDeclarations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Declaration of custom streams used in this rule."""
    data_sources: Optional["_models.DataCollectionRuleDataSources"] = rest_field(
        name="dataSources", visibility=["read", "create", "update", "delete", "query"]
    )
    """The specification of data sources. This property is optional and can be omitted if the rule is
     meant to be used via direct calls to the provisioned endpoint."""
    direct_data_sources: Optional["_models.DataCollectionRuleDirectDataSources"] = rest_field(
        name="directDataSources", visibility=["read", "create", "update", "delete", "query"]
    )
    """The specification of direct data sources. This property is optional and can be omitted."""
    destinations: Optional["_models.DataCollectionRuleDestinations"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The specification of destinations."""
    data_flows: Optional[list["_models.DataFlow"]] = rest_field(
        name="dataFlows", visibility=["read", "create", "update", "delete", "query"]
    )
    """The specification of data flows."""
    ingestion_quotas: Optional["_models.DataCollectionRuleIngestionQuotas"] = rest_field(
        name="ingestionQuotas", visibility=["read"]
    )
    """The specification for ingestion limits."""
    provisioning_state: Optional[Union[str, "_models.KnownDataCollectionRuleProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The resource provisioning state. Known values are: \"Creating\", \"Updating\", \"Deleting\",
     \"Succeeded\", \"Canceled\", and \"Failed\"."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        data_collection_endpoint_id: Optional[str] = None,
        references: Optional["_models.DataCollectionRuleReferences"] = None,
        agent_settings: Optional["_models.DataCollectionRuleAgentSettings"] = None,
        stream_declarations: Optional[dict[str, "_models.StreamDeclaration"]] = None,
        data_sources: Optional["_models.DataCollectionRuleDataSources"] = None,
        direct_data_sources: Optional["_models.DataCollectionRuleDirectDataSources"] = None,
        destinations: Optional["_models.DataCollectionRuleDestinations"] = None,
        data_flows: Optional[list["_models.DataFlow"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleAgentSettings(AgentSettingsSpec):
    """Agent settings used to modify agent behavior on a given host.

    :ivar logs: All the settings that are applicable to the logs agent (AMA).
    :vartype logs: list[~azure.mgmt.monitor.models.AgentSetting]
    """

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

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

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


class DataCollectionRuleAssociation(_Model):
    """Definition of association of a data collection rule with a monitored Azure resource.

    :ivar description: Description of the association.
    :vartype description: str
    :ivar data_collection_rule_id: The resource ID of the data collection rule that is to be
     associated.
    :vartype data_collection_rule_id: str
    :ivar data_collection_endpoint_id: The resource ID of the data collection endpoint that is to
     be associated.
    :vartype data_collection_endpoint_id: str
    :ivar provisioning_state: The resource provisioning state. Known values are: "Creating",
     "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionRuleAssociationProvisioningState
    :ivar metadata: Metadata about the resource.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionRuleAssociationMetadata
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the association."""
    data_collection_rule_id: Optional[str] = rest_field(
        name="dataCollectionRuleId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the data collection rule that is to be associated."""
    data_collection_endpoint_id: Optional[str] = rest_field(
        name="dataCollectionEndpointId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the data collection endpoint that is to be associated."""
    provisioning_state: Optional[Union[str, "_models.KnownDataCollectionRuleAssociationProvisioningState"]] = (
        rest_field(name="provisioningState", visibility=["read"])
    )
    """The resource provisioning state. Known values are: \"Creating\", \"Updating\", \"Deleting\",
     \"Succeeded\", \"Canceled\", and \"Failed\"."""
    metadata: Optional["_models.DataCollectionRuleAssociationMetadata"] = rest_field(visibility=["read"])
    """Metadata about the resource."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        data_collection_rule_id: Optional[str] = None,
        data_collection_endpoint_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 DataCollectionRuleAssociationMetadata(Metadata):
    """Metadata about the resource.

    :ivar provisioned_by: Azure offering managing this resource on-behalf-of customer.
    :vartype provisioned_by: str
    :ivar provisioned_by_resource_id: Resource Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_resource_id: str
    :ivar provisioned_by_immutable_id: Immutable Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_immutable_id: str
    """


class ExtensionResource(Resource):
    """The base extension resource.

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


class DataCollectionRuleAssociationProxyOnlyResource(ExtensionResource):  # pylint: disable=name-too-long
    """Definition of generic ARM 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.monitor.models.SystemData
    :ivar properties:
    :vartype properties:
     ~azure.mgmt.monitor.models.DataCollectionRuleAssociationProxyOnlyResourceProperties
    :ivar etag: Resource entity tag (ETag).
    :vartype etag: str
    """

    properties: Optional["_models.DataCollectionRuleAssociationProxyOnlyResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource entity tag (ETag)."""

    __flattened_items = [
        "description",
        "data_collection_rule_id",
        "data_collection_endpoint_id",
        "provisioning_state",
        "metadata",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 DataCollectionRuleAssociationProxyOnlyResourceProperties(
    DataCollectionRuleAssociation
):  # pylint: disable=name-too-long
    """DataCollectionRuleAssociationProxyOnlyResourceProperties.

    :ivar description: Description of the association.
    :vartype description: str
    :ivar data_collection_rule_id: The resource ID of the data collection rule that is to be
     associated.
    :vartype data_collection_rule_id: str
    :ivar data_collection_endpoint_id: The resource ID of the data collection endpoint that is to
     be associated.
    :vartype data_collection_endpoint_id: str
    :ivar provisioning_state: The resource provisioning state. Known values are: "Creating",
     "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionRuleAssociationProvisioningState
    :ivar metadata: Metadata about the resource.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionRuleAssociationMetadata
    """

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        data_collection_rule_id: Optional[str] = None,
        data_collection_endpoint_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 DataSourcesSpec(_Model):
    """Specification of data sources that will be collected.

    :ivar performance_counters: The list of performance counter data source configurations.
    :vartype performance_counters: list[~azure.mgmt.monitor.models.PerfCounterDataSource]
    :ivar performance_counters_o_tel: The list of Open Telemetry performance counter data source
     configurations.
    :vartype performance_counters_o_tel:
     list[~azure.mgmt.monitor.models.PerformanceCountersOTelDataSource]
    :ivar windows_event_logs: The list of Windows Event Log data source configurations.
    :vartype windows_event_logs: list[~azure.mgmt.monitor.models.WindowsEventLogDataSource]
    :ivar syslog: The list of Syslog data source configurations.
    :vartype syslog: list[~azure.mgmt.monitor.models.SyslogDataSource]
    :ivar extensions: The list of Azure VM extension data source configurations.
    :vartype extensions: list[~azure.mgmt.monitor.models.ExtensionDataSource]
    :ivar log_files: The list of Log files source configurations.
    :vartype log_files: list[~azure.mgmt.monitor.models.LogFilesDataSource]
    :ivar iis_logs: The list of IIS logs source configurations.
    :vartype iis_logs: list[~azure.mgmt.monitor.models.IisLogsDataSource]
    :ivar windows_firewall_logs: The list of Windows Firewall logs source configurations.
    :vartype windows_firewall_logs: list[~azure.mgmt.monitor.models.WindowsFirewallLogsDataSource]
    :ivar prometheus_forwarder: The list of Prometheus forwarder data source configurations.
    :vartype prometheus_forwarder: list[~azure.mgmt.monitor.models.PrometheusForwarderDataSource]
    :ivar platform_telemetry: The list of platform telemetry configurations.
    :vartype platform_telemetry: list[~azure.mgmt.monitor.models.PlatformTelemetryDataSource]
    :ivar data_imports: Specifications of pull based data sources.
    :vartype data_imports: ~azure.mgmt.monitor.models.DataSourcesSpecDataImports
    :ivar otel_logs: The list of Otel Logs data source configurations.
    :vartype otel_logs: list[~azure.mgmt.monitor.models.OtelLogsDataSource]
    :ivar otel_traces: The list of Otel traces data source configurations.
    :vartype otel_traces: list[~azure.mgmt.monitor.models.OtelTracesDataSource]
    :ivar otel_metrics: The list of OTel metrics data source configurations.
    :vartype otel_metrics: list[~azure.mgmt.monitor.models.OtelMetricsDataSource]
    :ivar etw_providers: The list of ETW providers data source configurations.
    :vartype etw_providers: list[~azure.mgmt.monitor.models.EtwProviderDataSource]
    """

    performance_counters: Optional[list["_models.PerfCounterDataSource"]] = rest_field(
        name="performanceCounters", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of performance counter data source configurations."""
    performance_counters_o_tel: Optional[list["_models.PerformanceCountersOTelDataSource"]] = rest_field(
        name="performanceCountersOTel", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Open Telemetry performance counter data source configurations."""
    windows_event_logs: Optional[list["_models.WindowsEventLogDataSource"]] = rest_field(
        name="windowsEventLogs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Windows Event Log data source configurations."""
    syslog: Optional[list["_models.SyslogDataSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Syslog data source configurations."""
    extensions: Optional[list["_models.ExtensionDataSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Azure VM extension data source configurations."""
    log_files: Optional[list["_models.LogFilesDataSource"]] = rest_field(
        name="logFiles", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Log files source configurations."""
    iis_logs: Optional[list["_models.IisLogsDataSource"]] = rest_field(
        name="iisLogs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of IIS logs source configurations."""
    windows_firewall_logs: Optional[list["_models.WindowsFirewallLogsDataSource"]] = rest_field(
        name="windowsFirewallLogs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Windows Firewall logs source configurations."""
    prometheus_forwarder: Optional[list["_models.PrometheusForwarderDataSource"]] = rest_field(
        name="prometheusForwarder", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Prometheus forwarder data source configurations."""
    platform_telemetry: Optional[list["_models.PlatformTelemetryDataSource"]] = rest_field(
        name="platformTelemetry", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of platform telemetry configurations."""
    data_imports: Optional["_models.DataSourcesSpecDataImports"] = rest_field(
        name="dataImports", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifications of pull based data sources."""
    otel_logs: Optional[list["_models.OtelLogsDataSource"]] = rest_field(
        name="otelLogs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Otel Logs data source configurations."""
    otel_traces: Optional[list["_models.OtelTracesDataSource"]] = rest_field(
        name="otelTraces", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of Otel traces data source configurations."""
    otel_metrics: Optional[list["_models.OtelMetricsDataSource"]] = rest_field(
        name="otelMetrics", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of OTel metrics data source configurations."""
    etw_providers: Optional[list["_models.EtwProviderDataSource"]] = rest_field(
        name="etwProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of ETW providers data source configurations."""

    @overload
    def __init__(
        self,
        *,
        performance_counters: Optional[list["_models.PerfCounterDataSource"]] = None,
        performance_counters_o_tel: Optional[list["_models.PerformanceCountersOTelDataSource"]] = None,
        windows_event_logs: Optional[list["_models.WindowsEventLogDataSource"]] = None,
        syslog: Optional[list["_models.SyslogDataSource"]] = None,
        extensions: Optional[list["_models.ExtensionDataSource"]] = None,
        log_files: Optional[list["_models.LogFilesDataSource"]] = None,
        iis_logs: Optional[list["_models.IisLogsDataSource"]] = None,
        windows_firewall_logs: Optional[list["_models.WindowsFirewallLogsDataSource"]] = None,
        prometheus_forwarder: Optional[list["_models.PrometheusForwarderDataSource"]] = None,
        platform_telemetry: Optional[list["_models.PlatformTelemetryDataSource"]] = None,
        data_imports: Optional["_models.DataSourcesSpecDataImports"] = None,
        otel_logs: Optional[list["_models.OtelLogsDataSource"]] = None,
        otel_traces: Optional[list["_models.OtelTracesDataSource"]] = None,
        otel_metrics: Optional[list["_models.OtelMetricsDataSource"]] = None,
        etw_providers: Optional[list["_models.EtwProviderDataSource"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleDataSources(DataSourcesSpec):
    """The specification of data sources. This property is optional and can be omitted if the rule is
    meant to be used via direct calls to the provisioned endpoint.

    :ivar performance_counters: The list of performance counter data source configurations.
    :vartype performance_counters: list[~azure.mgmt.monitor.models.PerfCounterDataSource]
    :ivar performance_counters_o_tel: The list of Open Telemetry performance counter data source
     configurations.
    :vartype performance_counters_o_tel:
     list[~azure.mgmt.monitor.models.PerformanceCountersOTelDataSource]
    :ivar windows_event_logs: The list of Windows Event Log data source configurations.
    :vartype windows_event_logs: list[~azure.mgmt.monitor.models.WindowsEventLogDataSource]
    :ivar syslog: The list of Syslog data source configurations.
    :vartype syslog: list[~azure.mgmt.monitor.models.SyslogDataSource]
    :ivar extensions: The list of Azure VM extension data source configurations.
    :vartype extensions: list[~azure.mgmt.monitor.models.ExtensionDataSource]
    :ivar log_files: The list of Log files source configurations.
    :vartype log_files: list[~azure.mgmt.monitor.models.LogFilesDataSource]
    :ivar iis_logs: The list of IIS logs source configurations.
    :vartype iis_logs: list[~azure.mgmt.monitor.models.IisLogsDataSource]
    :ivar windows_firewall_logs: The list of Windows Firewall logs source configurations.
    :vartype windows_firewall_logs: list[~azure.mgmt.monitor.models.WindowsFirewallLogsDataSource]
    :ivar prometheus_forwarder: The list of Prometheus forwarder data source configurations.
    :vartype prometheus_forwarder: list[~azure.mgmt.monitor.models.PrometheusForwarderDataSource]
    :ivar platform_telemetry: The list of platform telemetry configurations.
    :vartype platform_telemetry: list[~azure.mgmt.monitor.models.PlatformTelemetryDataSource]
    :ivar data_imports: Specifications of pull based data sources.
    :vartype data_imports: ~azure.mgmt.monitor.models.DataSourcesSpecDataImports
    :ivar otel_logs: The list of Otel Logs data source configurations.
    :vartype otel_logs: list[~azure.mgmt.monitor.models.OtelLogsDataSource]
    :ivar otel_traces: The list of Otel traces data source configurations.
    :vartype otel_traces: list[~azure.mgmt.monitor.models.OtelTracesDataSource]
    :ivar otel_metrics: The list of OTel metrics data source configurations.
    :vartype otel_metrics: list[~azure.mgmt.monitor.models.OtelMetricsDataSource]
    :ivar etw_providers: The list of ETW providers data source configurations.
    :vartype etw_providers: list[~azure.mgmt.monitor.models.EtwProviderDataSource]
    """

    @overload
    def __init__(
        self,
        *,
        performance_counters: Optional[list["_models.PerfCounterDataSource"]] = None,
        performance_counters_o_tel: Optional[list["_models.PerformanceCountersOTelDataSource"]] = None,
        windows_event_logs: Optional[list["_models.WindowsEventLogDataSource"]] = None,
        syslog: Optional[list["_models.SyslogDataSource"]] = None,
        extensions: Optional[list["_models.ExtensionDataSource"]] = None,
        log_files: Optional[list["_models.LogFilesDataSource"]] = None,
        iis_logs: Optional[list["_models.IisLogsDataSource"]] = None,
        windows_firewall_logs: Optional[list["_models.WindowsFirewallLogsDataSource"]] = None,
        prometheus_forwarder: Optional[list["_models.PrometheusForwarderDataSource"]] = None,
        platform_telemetry: Optional[list["_models.PlatformTelemetryDataSource"]] = None,
        data_imports: Optional["_models.DataSourcesSpecDataImports"] = None,
        otel_logs: Optional[list["_models.OtelLogsDataSource"]] = None,
        otel_traces: Optional[list["_models.OtelTracesDataSource"]] = None,
        otel_metrics: Optional[list["_models.OtelMetricsDataSource"]] = None,
        etw_providers: Optional[list["_models.EtwProviderDataSource"]] = None,
    ) -> None: ...

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

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


class DestinationsSpec(_Model):
    """Specification of destinations that can be used in data flows.

    :ivar log_analytics: List of Log Analytics destinations.
    :vartype log_analytics: list[~azure.mgmt.monitor.models.LogAnalyticsDestination]
    :ivar monitoring_accounts: List of monitoring account destinations.
    :vartype monitoring_accounts: list[~azure.mgmt.monitor.models.MonitoringAccountDestination]
    :ivar azure_monitor_metrics: Azure Monitor Metrics destination.
    :vartype azure_monitor_metrics: ~azure.mgmt.monitor.models.DestinationsSpecAzureMonitorMetrics
    :ivar event_hubs: List of Event Hubs destinations.
    :vartype event_hubs: list[~azure.mgmt.monitor.models.EventHubDestination]
    :ivar event_hubs_direct: List of Event Hubs Direct destinations.
    :vartype event_hubs_direct: list[~azure.mgmt.monitor.models.EventHubDirectDestination]
    :ivar storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for
     sending data directly to store from the agent.
    :vartype storage_blobs_direct: list[~azure.mgmt.monitor.models.StorageBlobDestination]
    :ivar storage_tables_direct: List of Storage Table Direct destinations.
    :vartype storage_tables_direct: list[~azure.mgmt.monitor.models.StorageTableDestination]
    :ivar storage_accounts: List of storage accounts destinations.
    :vartype storage_accounts: list[~azure.mgmt.monitor.models.StorageBlobDestination]
    :ivar microsoft_fabric: List of Microsoft Fabric destinations.
    :vartype microsoft_fabric: list[~azure.mgmt.monitor.models.MicrosoftFabricDestination]
    :ivar azure_data_explorer: List of Azure Data Explorer destinations.
    :vartype azure_data_explorer: list[~azure.mgmt.monitor.models.AdxDestination]
    """

    log_analytics: Optional[list["_models.LogAnalyticsDestination"]] = rest_field(
        name="logAnalytics", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Log Analytics destinations."""
    monitoring_accounts: Optional[list["_models.MonitoringAccountDestination"]] = rest_field(
        name="monitoringAccounts", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of monitoring account destinations."""
    azure_monitor_metrics: Optional["_models.DestinationsSpecAzureMonitorMetrics"] = rest_field(
        name="azureMonitorMetrics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure Monitor Metrics destination."""
    event_hubs: Optional[list["_models.EventHubDestination"]] = rest_field(
        name="eventHubs", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Event Hubs destinations."""
    event_hubs_direct: Optional[list["_models.EventHubDirectDestination"]] = rest_field(
        name="eventHubsDirect", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Event Hubs Direct destinations."""
    storage_blobs_direct: Optional[list["_models.StorageBlobDestination"]] = rest_field(
        name="storageBlobsDirect", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Storage Blob Direct destinations. To be used only for sending data directly to store
     from the agent."""
    storage_tables_direct: Optional[list["_models.StorageTableDestination"]] = rest_field(
        name="storageTablesDirect", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Storage Table Direct destinations."""
    storage_accounts: Optional[list["_models.StorageBlobDestination"]] = rest_field(
        name="storageAccounts", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of storage accounts destinations."""
    microsoft_fabric: Optional[list["_models.MicrosoftFabricDestination"]] = rest_field(
        name="microsoftFabric", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Microsoft Fabric destinations."""
    azure_data_explorer: Optional[list["_models.AdxDestination"]] = rest_field(
        name="azureDataExplorer", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Azure Data Explorer destinations."""

    @overload
    def __init__(
        self,
        *,
        log_analytics: Optional[list["_models.LogAnalyticsDestination"]] = None,
        monitoring_accounts: Optional[list["_models.MonitoringAccountDestination"]] = None,
        azure_monitor_metrics: Optional["_models.DestinationsSpecAzureMonitorMetrics"] = None,
        event_hubs: Optional[list["_models.EventHubDestination"]] = None,
        event_hubs_direct: Optional[list["_models.EventHubDirectDestination"]] = None,
        storage_blobs_direct: Optional[list["_models.StorageBlobDestination"]] = None,
        storage_tables_direct: Optional[list["_models.StorageTableDestination"]] = None,
        storage_accounts: Optional[list["_models.StorageBlobDestination"]] = None,
        microsoft_fabric: Optional[list["_models.MicrosoftFabricDestination"]] = None,
        azure_data_explorer: Optional[list["_models.AdxDestination"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleDestinations(DestinationsSpec):
    """The specification of destinations.

    :ivar log_analytics: List of Log Analytics destinations.
    :vartype log_analytics: list[~azure.mgmt.monitor.models.LogAnalyticsDestination]
    :ivar monitoring_accounts: List of monitoring account destinations.
    :vartype monitoring_accounts: list[~azure.mgmt.monitor.models.MonitoringAccountDestination]
    :ivar azure_monitor_metrics: Azure Monitor Metrics destination.
    :vartype azure_monitor_metrics: ~azure.mgmt.monitor.models.DestinationsSpecAzureMonitorMetrics
    :ivar event_hubs: List of Event Hubs destinations.
    :vartype event_hubs: list[~azure.mgmt.monitor.models.EventHubDestination]
    :ivar event_hubs_direct: List of Event Hubs Direct destinations.
    :vartype event_hubs_direct: list[~azure.mgmt.monitor.models.EventHubDirectDestination]
    :ivar storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for
     sending data directly to store from the agent.
    :vartype storage_blobs_direct: list[~azure.mgmt.monitor.models.StorageBlobDestination]
    :ivar storage_tables_direct: List of Storage Table Direct destinations.
    :vartype storage_tables_direct: list[~azure.mgmt.monitor.models.StorageTableDestination]
    :ivar storage_accounts: List of storage accounts destinations.
    :vartype storage_accounts: list[~azure.mgmt.monitor.models.StorageBlobDestination]
    :ivar microsoft_fabric: List of Microsoft Fabric destinations.
    :vartype microsoft_fabric: list[~azure.mgmt.monitor.models.MicrosoftFabricDestination]
    :ivar azure_data_explorer: List of Azure Data Explorer destinations.
    :vartype azure_data_explorer: list[~azure.mgmt.monitor.models.AdxDestination]
    """

    @overload
    def __init__(
        self,
        *,
        log_analytics: Optional[list["_models.LogAnalyticsDestination"]] = None,
        monitoring_accounts: Optional[list["_models.MonitoringAccountDestination"]] = None,
        azure_monitor_metrics: Optional["_models.DestinationsSpecAzureMonitorMetrics"] = None,
        event_hubs: Optional[list["_models.EventHubDestination"]] = None,
        event_hubs_direct: Optional[list["_models.EventHubDirectDestination"]] = None,
        storage_blobs_direct: Optional[list["_models.StorageBlobDestination"]] = None,
        storage_tables_direct: Optional[list["_models.StorageTableDestination"]] = None,
        storage_accounts: Optional[list["_models.StorageBlobDestination"]] = None,
        microsoft_fabric: Optional[list["_models.MicrosoftFabricDestination"]] = None,
        azure_data_explorer: Optional[list["_models.AdxDestination"]] = None,
    ) -> None: ...

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

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


class DirectDataSourcesSpec(_Model):
    """Specification of direct data sources that will be collected.

    :ivar otel_metrics: The list of OTel metrics data source configurations.
    :vartype otel_metrics: list[~azure.mgmt.monitor.models.OtelMetricsDirectDataSource]
    :ivar otel_logs: The list of OTel logs data source configurations.
    :vartype otel_logs: list[~azure.mgmt.monitor.models.OtelLogsDirectDataSource]
    :ivar otel_traces: The list of OTel traces data source configurations.
    :vartype otel_traces: list[~azure.mgmt.monitor.models.OtelTracesDirectDataSource]
    """

    otel_metrics: Optional[list["_models.OtelMetricsDirectDataSource"]] = rest_field(
        name="otelMetrics", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of OTel metrics data source configurations."""
    otel_logs: Optional[list["_models.OtelLogsDirectDataSource"]] = rest_field(
        name="otelLogs", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of OTel logs data source configurations."""
    otel_traces: Optional[list["_models.OtelTracesDirectDataSource"]] = rest_field(
        name="otelTraces", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of OTel traces data source configurations."""

    @overload
    def __init__(
        self,
        *,
        otel_metrics: Optional[list["_models.OtelMetricsDirectDataSource"]] = None,
        otel_logs: Optional[list["_models.OtelLogsDirectDataSource"]] = None,
        otel_traces: Optional[list["_models.OtelTracesDirectDataSource"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleDirectDataSources(DirectDataSourcesSpec):
    """The specification of direct data sources. This property is optional and can be omitted.

    :ivar otel_metrics: The list of OTel metrics data source configurations.
    :vartype otel_metrics: list[~azure.mgmt.monitor.models.OtelMetricsDirectDataSource]
    :ivar otel_logs: The list of OTel logs data source configurations.
    :vartype otel_logs: list[~azure.mgmt.monitor.models.OtelLogsDirectDataSource]
    :ivar otel_traces: The list of OTel traces data source configurations.
    :vartype otel_traces: list[~azure.mgmt.monitor.models.OtelTracesDirectDataSource]
    """

    @overload
    def __init__(
        self,
        *,
        otel_metrics: Optional[list["_models.OtelMetricsDirectDataSource"]] = None,
        otel_logs: Optional[list["_models.OtelLogsDirectDataSource"]] = None,
        otel_traces: Optional[list["_models.OtelTracesDirectDataSource"]] = None,
    ) -> None: ...

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

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


class EndpointsSpec(_Model):
    """This defines all the ingestion endpoints that can be used by this rule.

    :ivar logs_ingestion: The ingestion endpoint for logs.
    :vartype logs_ingestion: str
    :ivar metrics_ingestion: The ingestion endpoint for metrics.
    :vartype metrics_ingestion: str
    """

    logs_ingestion: Optional[str] = rest_field(name="logsIngestion", visibility=["read"])
    """The ingestion endpoint for logs."""
    metrics_ingestion: Optional[str] = rest_field(name="metricsIngestion", visibility=["read"])
    """The ingestion endpoint for metrics."""


class DataCollectionRuleEndpoints(EndpointsSpec):
    """Defines the ingestion endpoints to send data to via this rule.

    :ivar logs_ingestion: The ingestion endpoint for logs.
    :vartype logs_ingestion: str
    :ivar metrics_ingestion: The ingestion endpoint for metrics.
    :vartype metrics_ingestion: str
    """


class IngestionQuotas(_Model):
    """IngestionQuotas.

    :ivar logs:
    :vartype logs: ~azure.mgmt.monitor.models.IngestionQuotasLogs
    """

    logs: Optional["_models.IngestionQuotasLogs"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class DataCollectionRuleIngestionQuotas(IngestionQuotas):
    """The specification for ingestion limits.

    :ivar logs:
    :vartype logs: ~azure.mgmt.monitor.models.IngestionQuotasLogs
    """

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

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

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


class DataCollectionRuleMetadata(Metadata):
    """Metadata about the resource.

    :ivar provisioned_by: Azure offering managing this resource on-behalf-of customer.
    :vartype provisioned_by: str
    :ivar provisioned_by_resource_id: Resource Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_resource_id: str
    :ivar provisioned_by_immutable_id: Immutable Id of azure offering managing this resource
     on-behalf-of customer.
    :vartype provisioned_by_immutable_id: str
    """


class ReferencesSpec(_Model):
    """This section defines all the references that may be used in other sections of the DCR.

    :ivar enrichment_data: All the enrichment data sources referenced in data flows.
    :vartype enrichment_data: ~azure.mgmt.monitor.models.ReferencesSpecEnrichmentData
    :ivar application_insights: Application Insights references to be used on OTel metrics/logs
     enrichment.
    :vartype application_insights: list[~azure.mgmt.monitor.models.ApplicationInsights]
    """

    enrichment_data: Optional["_models.ReferencesSpecEnrichmentData"] = rest_field(
        name="enrichmentData", visibility=["read", "create", "update", "delete", "query"]
    )
    """All the enrichment data sources referenced in data flows."""
    application_insights: Optional[list["_models.ApplicationInsights"]] = rest_field(
        name="applicationInsights", visibility=["read", "create", "update", "delete", "query"]
    )
    """Application Insights references to be used on OTel metrics/logs enrichment."""

    @overload
    def __init__(
        self,
        *,
        enrichment_data: Optional["_models.ReferencesSpecEnrichmentData"] = None,
        application_insights: Optional[list["_models.ApplicationInsights"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleReferences(ReferencesSpec):
    """Defines all the references that may be used in other sections of the DCR.

    :ivar enrichment_data: All the enrichment data sources referenced in data flows.
    :vartype enrichment_data: ~azure.mgmt.monitor.models.ReferencesSpecEnrichmentData
    :ivar application_insights: Application Insights references to be used on OTel metrics/logs
     enrichment.
    :vartype application_insights: list[~azure.mgmt.monitor.models.ApplicationInsights]
    """

    @overload
    def __init__(
        self,
        *,
        enrichment_data: Optional["_models.ReferencesSpecEnrichmentData"] = None,
        application_insights: Optional[list["_models.ApplicationInsights"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleResource(TrackedResource):
    """Definition of ARM tracked top level 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties:
    :vartype properties: ~azure.mgmt.monitor.models.DataCollectionRuleResourceProperties
    :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows".
    :vartype kind: str or ~azure.mgmt.monitor.models.KnownDataCollectionRuleResourceKind
    :ivar sku: The SKU of the resource.
    :vartype sku: ~azure.mgmt.monitor.models.DataCollectionRuleResourceSku
    :ivar identity: Managed service identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.DataCollectionRuleResourceIdentity
    :ivar etag: Resource entity tag (ETag).
    :vartype etag: str
    """

    properties: Optional["_models.DataCollectionRuleResourceProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    kind: Optional[Union[str, "_models.KnownDataCollectionRuleResourceKind"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The kind of the resource. Known values are: \"Linux\" and \"Windows\"."""
    sku: Optional["_models.DataCollectionRuleResourceSku"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The SKU of the resource."""
    identity: Optional["_models.DataCollectionRuleResourceIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed service identity of the resource."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource entity tag (ETag)."""

    __flattened_items = [
        "description",
        "immutable_id",
        "data_collection_endpoint_id",
        "metadata",
        "endpoints",
        "references",
        "agent_settings",
        "stream_declarations",
        "data_sources",
        "direct_data_sources",
        "destinations",
        "data_flows",
        "ingestion_quotas",
        "provisioning_state",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        tags: Optional[dict[str, str]] = None,
        properties: Optional["_models.DataCollectionRuleResourceProperties"] = None,
        kind: Optional[Union[str, "_models.KnownDataCollectionRuleResourceKind"]] = None,
        sku: Optional["_models.DataCollectionRuleResourceSku"] = None,
        identity: Optional["_models.DataCollectionRuleResourceIdentity"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 DataCollectionRuleResourceIdentity(ManagedServiceIdentity):
    """Managed service identity of the resource.

    :ivar principal_id: The service principal ID of the system assigned identity. This property
     will only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of managed identity assigned to this resource. Required. Known values are:
     "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.monitor.models.ManagedServiceIdentityType
    :ivar user_assigned_identities: The identities assigned to this resource by the user.
    :vartype user_assigned_identities: dict[str, ~azure.mgmt.monitor.models.UserAssignedIdentity]
    """

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.ManagedServiceIdentityType"],
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleResourceProperties(DataCollectionRule):
    """DataCollectionRuleResourceProperties.

    :ivar description: Description of the data collection rule.
    :vartype description: str
    :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY.
    :vartype immutable_id: str
    :ivar data_collection_endpoint_id: The resource ID of the data collection endpoint that this
     rule can be used with.
    :vartype data_collection_endpoint_id: str
    :ivar metadata: Metadata about the resource.
    :vartype metadata: ~azure.mgmt.monitor.models.DataCollectionRuleMetadata
    :ivar endpoints: Defines the ingestion endpoints to send data to via this rule.
    :vartype endpoints: ~azure.mgmt.monitor.models.DataCollectionRuleEndpoints
    :ivar references: Defines all the references that may be used in other sections of the DCR.
    :vartype references: ~azure.mgmt.monitor.models.DataCollectionRuleReferences
    :ivar agent_settings: Agent settings used to modify agent behavior on a given host.
    :vartype agent_settings: ~azure.mgmt.monitor.models.DataCollectionRuleAgentSettings
    :ivar stream_declarations: Declaration of custom streams used in this rule.
    :vartype stream_declarations: dict[str, ~azure.mgmt.monitor.models.StreamDeclaration]
    :ivar data_sources: The specification of data sources. This property is optional and can be
     omitted if the rule is meant to be used via direct calls to the provisioned endpoint.
    :vartype data_sources: ~azure.mgmt.monitor.models.DataCollectionRuleDataSources
    :ivar direct_data_sources: The specification of direct data sources. This property is optional
     and can be omitted.
    :vartype direct_data_sources: ~azure.mgmt.monitor.models.DataCollectionRuleDirectDataSources
    :ivar destinations: The specification of destinations.
    :vartype destinations: ~azure.mgmt.monitor.models.DataCollectionRuleDestinations
    :ivar data_flows: The specification of data flows.
    :vartype data_flows: list[~azure.mgmt.monitor.models.DataFlow]
    :ivar ingestion_quotas: The specification for ingestion limits.
    :vartype ingestion_quotas: ~azure.mgmt.monitor.models.DataCollectionRuleIngestionQuotas
    :ivar provisioning_state: The resource provisioning state. Known values are: "Creating",
     "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.KnownDataCollectionRuleProvisioningState
    """

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        data_collection_endpoint_id: Optional[str] = None,
        references: Optional["_models.DataCollectionRuleReferences"] = None,
        agent_settings: Optional["_models.DataCollectionRuleAgentSettings"] = None,
        stream_declarations: Optional[dict[str, "_models.StreamDeclaration"]] = None,
        data_sources: Optional["_models.DataCollectionRuleDataSources"] = None,
        direct_data_sources: Optional["_models.DataCollectionRuleDirectDataSources"] = None,
        destinations: Optional["_models.DataCollectionRuleDestinations"] = None,
        data_flows: Optional[list["_models.DataFlow"]] = None,
    ) -> None: ...

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

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


class DataCollectionRuleResourceSku(Sku):
    """The SKU of the resource.

    :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", and "Premium".
    :vartype tier: str or ~azure.mgmt.monitor.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
    """

    @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 DataFlow(_Model):
    """Definition of which streams are sent to which destinations.

    :ivar streams: List of streams for this data flow.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownDataFlowStreams]
    :ivar destinations: List of destinations for this data flow.
    :vartype destinations: list[str]
    :ivar transform_kql: The KQL query to transform stream data.
    :vartype transform_kql: str
    :ivar output_stream: The output stream of the transform. Only required if the transform changes
     data to a different stream.
    :vartype output_stream: str
    :ivar built_in_transform: The builtIn transform to transform stream data.
    :vartype built_in_transform: str
    :ivar capture_overflow: Flag to enable overflow column in LA destinations.
    :vartype capture_overflow: bool
    """

    streams: Optional[list[Union[str, "_models.KnownDataFlowStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams for this data flow."""
    destinations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of destinations for this data flow."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform stream data."""
    output_stream: Optional[str] = rest_field(
        name="outputStream", visibility=["read", "create", "update", "delete", "query"]
    )
    """The output stream of the transform. Only required if the transform changes data to a different
     stream."""
    built_in_transform: Optional[str] = rest_field(
        name="builtInTransform", visibility=["read", "create", "update", "delete", "query"]
    )
    """The builtIn transform to transform stream data."""
    capture_overflow: Optional[bool] = rest_field(
        name="captureOverflow", visibility=["read", "create", "update", "delete", "query"]
    )
    """Flag to enable overflow column in LA destinations."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownDataFlowStreams"]]] = None,
        destinations: Optional[list[str]] = None,
        transform_kql: Optional[str] = None,
        output_stream: Optional[str] = None,
        built_in_transform: Optional[str] = None,
        capture_overflow: 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 DataImportSources(_Model):
    """DataImportSources.

    :ivar event_hub: Definition of Event Hub configuration.
    :vartype event_hub: ~azure.mgmt.monitor.models.DataImportSourcesEventHub
    """

    event_hub: Optional["_models.DataImportSourcesEventHub"] = rest_field(
        name="eventHub", visibility=["read", "create", "update", "delete", "query"]
    )
    """Definition of Event Hub configuration."""

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

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

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


class EventHubDataSource(_Model):
    """EventHubDataSource.

    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    :ivar consumer_group: Event Hub consumer group name.
    :vartype consumer_group: str
    :ivar stream: The stream to collect from EventHub.
    :vartype stream: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""
    consumer_group: Optional[str] = rest_field(
        name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Event Hub consumer group name."""
    stream: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The stream to collect from EventHub."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        consumer_group: Optional[str] = None,
        stream: 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 DataImportSourcesEventHub(EventHubDataSource):
    """Definition of Event Hub configuration.

    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    :ivar consumer_group: Event Hub consumer group name.
    :vartype consumer_group: str
    :ivar stream: The stream to collect from EventHub.
    :vartype stream: str
    """

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        consumer_group: Optional[str] = None,
        stream: 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 DataSourcesSpecDataImports(DataImportSources):
    """Specifications of pull based data sources.

    :ivar event_hub: Definition of Event Hub configuration.
    :vartype event_hub: ~azure.mgmt.monitor.models.DataImportSourcesEventHub
    """

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

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

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


class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination):
    """Azure Monitor Metrics destination.

    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    @overload
    def __init__(
        self,
        *,
        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 Dimension(_Model):
    """Dimension splitting and filtering definition.

    :ivar name: Name of the dimension. Required.
    :vartype name: str
    :ivar operator: Operator for dimension values. Required. Known values are: "Include" and
     "Exclude".
    :vartype operator: str or ~azure.mgmt.monitor.models.DimensionOperator
    :ivar values_property: List of dimension values. Required.
    :vartype values_property: list[str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the dimension. Required."""
    operator: Union[str, "_models.DimensionOperator"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Operator for dimension values. Required. Known values are: \"Include\" and \"Exclude\"."""
    values_property: list[str] = rest_field(
        name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values"
    )
    """List of dimension values. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        operator: Union[str, "_models.DimensionOperator"],
        values_property: list[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 MultiMetricCriteria(_Model):
    """The types of conditions for a multi resource alert.

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

    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. Known values are: "StaticThresholdCriterion" and
     "DynamicThresholdCriterion".
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.CriterionType
    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar metric_name: Name of the metric. Required.
    :vartype metric_name: str
    :ivar metric_namespace: Namespace of the metric.
    :vartype metric_namespace: str
    :ivar time_aggregation: The criteria time aggregation types. Previously undocumented values
     might be returned. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and
     "Total".
    :vartype time_aggregation: str or ~azure.mgmt.monitor.models.AggregationTypeEnum
    :ivar dimensions: List of dimension conditions.
    :vartype dimensions: list[~azure.mgmt.monitor.models.MetricDimension]
    :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet
     emitted, by causing the metric validation to be skipped.
    :vartype skip_metric_validation: bool
    """

    __mapping__: dict[str, _Model] = {}
    criterion_type: str = rest_discriminator(
        name="criterionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. Known values are: \"StaticThresholdCriterion\" and \"DynamicThresholdCriterion\"."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the criteria. Required."""
    metric_name: str = rest_field(name="metricName", visibility=["read", "create", "update", "delete", "query"])
    """Name of the metric. Required."""
    metric_namespace: Optional[str] = rest_field(
        name="metricNamespace", visibility=["read", "create", "update", "delete", "query"]
    )
    """Namespace of the metric."""
    time_aggregation: Union[str, "_models.AggregationTypeEnum"] = rest_field(
        name="timeAggregation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The criteria time aggregation types. Previously undocumented values might be returned.
     Required. Known values are: \"Average\", \"Count\", \"Minimum\", \"Maximum\", and \"Total\"."""
    dimensions: Optional[list["_models.MetricDimension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of dimension conditions."""
    skip_metric_validation: Optional[bool] = rest_field(
        name="skipMetricValidation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric
     validation to be skipped."""

    @overload
    def __init__(
        self,
        *,
        criterion_type: str,
        name: str,
        metric_name: str,
        time_aggregation: Union[str, "_models.AggregationTypeEnum"],
        metric_namespace: Optional[str] = None,
        dimensions: Optional[list["_models.MetricDimension"]] = None,
        skip_metric_validation: 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 DynamicMetricCriteria(MultiMetricCriteria, discriminator="DynamicThresholdCriterion"):
    """Criterion for dynamic threshold.

    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar metric_name: Name of the metric. Required.
    :vartype metric_name: str
    :ivar metric_namespace: Namespace of the metric.
    :vartype metric_namespace: str
    :ivar time_aggregation: The criteria time aggregation types. Previously undocumented values
     might be returned. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and
     "Total".
    :vartype time_aggregation: str or ~azure.mgmt.monitor.models.AggregationTypeEnum
    :ivar dimensions: List of dimension conditions.
    :vartype dimensions: list[~azure.mgmt.monitor.models.MetricDimension]
    :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet
     emitted, by causing the metric validation to be skipped.
    :vartype skip_metric_validation: bool
    :ivar operator: The operator used to compare the metric value against the threshold. Previously
     undocumented values might be returned. Required. Known values are: "GreaterThan", "LessThan",
     and "GreaterOrLessThan".
    :vartype operator: str or ~azure.mgmt.monitor.models.DynamicThresholdOperator
    :ivar alert_sensitivity: The extent of deviation required to trigger an alert. This will affect
     how tight the threshold is to the metric series pattern. Previously undocumented values might
     be returned. Required. Known values are: "Low", "Medium", and "High".
    :vartype alert_sensitivity: str or ~azure.mgmt.monitor.models.DynamicThresholdSensitivity
    :ivar failing_periods: The minimum number of violations required within the selected lookback
     time window required to raise an alert. Required.
    :vartype failing_periods: ~azure.mgmt.monitor.models.DynamicThresholdFailingPeriods
    :ivar ignore_data_before: Use this option to set the date from which to start learning the
     metric historical data and calculate the dynamic thresholds (in ISO8601 format).
    :vartype ignore_data_before: ~datetime.datetime
    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. DynamicThresholdCriterion.
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.DYNAMIC_THRESHOLD_CRITERION
    """

    operator: Union[str, "_models.DynamicThresholdOperator"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The operator used to compare the metric value against the threshold. Previously undocumented
     values might be returned. Required. Known values are: \"GreaterThan\", \"LessThan\", and
     \"GreaterOrLessThan\"."""
    alert_sensitivity: Union[str, "_models.DynamicThresholdSensitivity"] = rest_field(
        name="alertSensitivity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extent of deviation required to trigger an alert. This will affect how tight the threshold
     is to the metric series pattern. Previously undocumented values might be returned. Required.
     Known values are: \"Low\", \"Medium\", and \"High\"."""
    failing_periods: "_models.DynamicThresholdFailingPeriods" = rest_field(
        name="failingPeriods", visibility=["read", "create", "update", "delete", "query"]
    )
    """The minimum number of violations required within the selected lookback time window required to
     raise an alert. Required."""
    ignore_data_before: Optional[datetime.datetime] = rest_field(
        name="ignoreDataBefore", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Use this option to set the date from which to start learning the metric historical data and
     calculate the dynamic thresholds (in ISO8601 format)."""
    criterion_type: Literal[CriterionType.DYNAMIC_THRESHOLD_CRITERION] = rest_discriminator(name="criterionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. DynamicThresholdCriterion."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        metric_name: str,
        time_aggregation: Union[str, "_models.AggregationTypeEnum"],
        operator: Union[str, "_models.DynamicThresholdOperator"],
        alert_sensitivity: Union[str, "_models.DynamicThresholdSensitivity"],
        failing_periods: "_models.DynamicThresholdFailingPeriods",
        metric_namespace: Optional[str] = None,
        dimensions: Optional[list["_models.MetricDimension"]] = None,
        skip_metric_validation: Optional[bool] = None,
        ignore_data_before: 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)
        self.criterion_type = CriterionType.DYNAMIC_THRESHOLD_CRITERION  # type: ignore


class MultiPromQLCriteria(_Model):
    """The types of conditions for a multi query metric alert.

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

    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. Known values are: "StaticThresholdCriterion" and
     "DynamicThresholdCriterion".
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.CriterionType
    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar query: The query used to evaluate the alert rule. Required.
    :vartype query: str
    """

    __mapping__: dict[str, _Model] = {}
    criterion_type: str = rest_discriminator(
        name="criterionType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. Known values are: \"StaticThresholdCriterion\" and \"DynamicThresholdCriterion\"."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the criteria. Required."""
    query: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The query used to evaluate the alert rule. Required."""

    @overload
    def __init__(
        self,
        *,
        criterion_type: str,
        name: str,
        query: 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 DynamicPromQLCriteria(MultiPromQLCriteria, discriminator="DynamicThresholdCriterion"):
    """The criterion for dynamic prom query.

    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar query: The query used to evaluate the alert rule. Required.
    :vartype query: str
    :ivar operator: The operator used to compare the metric value against the threshold. Previously
     undocumented values might be returned. Required. Known values are: "GreaterThan", "LessThan",
     and "GreaterOrLessThan".
    :vartype operator: str or ~azure.mgmt.monitor.models.DynamicThresholdOperator
    :ivar alert_sensitivity: The extent of deviation required to trigger an alert. This will affect
     how tight the threshold is to the metric series pattern. Previously undocumented values might
     be returned. Required. Known values are: "Low", "Medium", and "High".
    :vartype alert_sensitivity: str or ~azure.mgmt.monitor.models.DynamicThresholdSensitivity
    :ivar ignore_data_before: Use this option to set the date from which to start learning the
     metric historical data and calculate the dynamic thresholds (in ISO8601 format).
    :vartype ignore_data_before: ~datetime.datetime
    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. DynamicThresholdCriterion.
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.DYNAMIC_THRESHOLD_CRITERION
    """

    operator: Union[str, "_models.DynamicThresholdOperator"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The operator used to compare the metric value against the threshold. Previously undocumented
     values might be returned. Required. Known values are: \"GreaterThan\", \"LessThan\", and
     \"GreaterOrLessThan\"."""
    alert_sensitivity: Union[str, "_models.DynamicThresholdSensitivity"] = rest_field(
        name="alertSensitivity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extent of deviation required to trigger an alert. This will affect how tight the threshold
     is to the metric series pattern. Previously undocumented values might be returned. Required.
     Known values are: \"Low\", \"Medium\", and \"High\"."""
    ignore_data_before: Optional[datetime.datetime] = rest_field(
        name="ignoreDataBefore", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Use this option to set the date from which to start learning the metric historical data and
     calculate the dynamic thresholds (in ISO8601 format)."""
    criterion_type: Literal[CriterionType.DYNAMIC_THRESHOLD_CRITERION] = rest_discriminator(name="criterionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. DynamicThresholdCriterion."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        query: str,
        operator: Union[str, "_models.DynamicThresholdOperator"],
        alert_sensitivity: Union[str, "_models.DynamicThresholdSensitivity"],
        ignore_data_before: 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)
        self.criterion_type = CriterionType.DYNAMIC_THRESHOLD_CRITERION  # type: ignore


class DynamicThresholdFailingPeriods(_Model):
    """The minimum number of violations required within the selected lookback time window required to
    raise an alert.

    :ivar number_of_evaluation_periods: The number of aggregated lookback points. The lookback time
     window is calculated based on the aggregation granularity (windowSize) and the selected number
     of aggregated points. Required.
    :vartype number_of_evaluation_periods: float
    :ivar min_failing_periods_to_alert: The number of violations to trigger an alert. Should be
     smaller or equal to numberOfEvaluationPeriods. Required.
    :vartype min_failing_periods_to_alert: float
    """

    number_of_evaluation_periods: float = rest_field(
        name="numberOfEvaluationPeriods", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of aggregated lookback points. The lookback time window is calculated based on the
     aggregation granularity (windowSize) and the selected number of aggregated points. Required."""
    min_failing_periods_to_alert: float = rest_field(
        name="minFailingPeriodsToAlert", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of violations to trigger an alert. Should be smaller or equal to
     numberOfEvaluationPeriods. Required."""

    @overload
    def __init__(
        self,
        *,
        number_of_evaluation_periods: float,
        min_failing_periods_to_alert: float,
    ) -> None: ...

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

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


class EmailNotification(_Model):
    """Email notification of an autoscale event.

    :ivar send_to_subscription_administrator: a value indicating whether to send email to
     subscription administrator.
    :vartype send_to_subscription_administrator: bool
    :ivar send_to_subscription_co_administrators: a value indicating whether to send email to
     subscription co-administrators.
    :vartype send_to_subscription_co_administrators: bool
    :ivar custom_emails: the custom e-mails list. This value can be null or empty, in which case
     this attribute will be ignored.
    :vartype custom_emails: list[str]
    """

    send_to_subscription_administrator: Optional[bool] = rest_field(
        name="sendToSubscriptionAdministrator", visibility=["read", "create", "update", "delete", "query"]
    )
    """a value indicating whether to send email to subscription administrator."""
    send_to_subscription_co_administrators: Optional[bool] = rest_field(
        name="sendToSubscriptionCoAdministrators", visibility=["read", "create", "update", "delete", "query"]
    )
    """a value indicating whether to send email to subscription co-administrators."""
    custom_emails: Optional[list[str]] = rest_field(
        name="customEmails", visibility=["read", "create", "update", "delete", "query"]
    )
    """the custom e-mails list. This value can be null or empty, in which case this attribute will be
     ignored."""

    @overload
    def __init__(
        self,
        *,
        send_to_subscription_administrator: Optional[bool] = None,
        send_to_subscription_co_administrators: Optional[bool] = None,
        custom_emails: 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 EmailReceiver(_Model):
    """An email receiver.

    :ivar name: The name of the email receiver. Names must be unique across all receivers within an
     action group. Required.
    :vartype name: str
    :ivar email_address: The email address of this receiver. Required.
    :vartype email_address: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled",
     and "Disabled".
    :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the email receiver. Names must be unique across all receivers within an action
     group. Required."""
    email_address: str = rest_field(name="emailAddress", visibility=["read", "create", "update", "delete", "query"])
    """The email address of this receiver. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    status: Optional[Union[str, "_models.ReceiverStatus"]] = rest_field(visibility=["read"])
    """The receiver status of the e-mail. Known values are: \"NotSpecified\", \"Enabled\", and
     \"Disabled\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        email_address: str,
        use_common_alert_schema: 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 EnableRequest(_Model):
    """Describes a receiver that should be resubscribed.

    :ivar receiver_name: The name of the receiver to resubscribe. Required.
    :vartype receiver_name: str
    """

    receiver_name: str = rest_field(name="receiverName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the receiver to resubscribe. Required."""

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

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

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


class EnrichmentData(_Model):
    """All the enrichment data sources referenced in data flows.

    :ivar storage_blobs: All the storage blobs used as enrichment data sources.
    :vartype storage_blobs: list[~azure.mgmt.monitor.models.StorageBlob]
    """

    storage_blobs: Optional[list["_models.StorageBlob"]] = rest_field(
        name="storageBlobs", visibility=["read", "create", "update", "delete", "query"]
    )
    """All the storage blobs used as enrichment data sources."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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 ErrorContract(_Model):
    """Common error response for all Azure Resource Manager APIs to return error details for failed
    operations. (This also follows the OData error response format.).

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.monitor.models.ErrorResponseCommon
    """

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

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

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

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


class ErrorDetail(_Model):
    """Describes details of an error response.

    :ivar code: Unlocalized string which can be used to programmatically identify the error.
    :vartype code: str
    :ivar message: Describes the error in detail and provides debugging information.
    :vartype message: str
    :ivar target: The target of the particular error (for example, the name of the property in
     error).
    :vartype target: str
    :ivar additional_info: An array of objects with 'type' and 'info' properties. The schema of
     'info' is service-specific and dependent on the 'type' string.
    :vartype additional_info: list[~azure.mgmt.monitor.models.ErrorDetailAdditionalInfoItem]
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unlocalized string which can be used to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the error in detail and provides debugging information."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error (for example, the name of the property in error)."""
    additional_info: Optional[list["_models.ErrorDetailAdditionalInfoItem"]] = rest_field(
        name="additionalInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific
     and dependent on the 'type' string."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        target: Optional[str] = None,
        additional_info: Optional[list["_models.ErrorDetailAdditionalInfoItem"]] = None,
    ) -> None: ...

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

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


class ErrorDetailAdditionalInfoItem(_Model):
    """ErrorDetailAdditionalInfoItem.

    :ivar type: The type of additional information.
    :vartype type: str
    :ivar info: The additional information specific to the type.
    :vartype info: dict[str, any]
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of additional information."""
    info: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The additional information specific to the type."""

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

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

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


class ErrorDetailAutoGenerated(_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.monitor.models.ErrorDetailAutoGenerated]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.monitor.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.ErrorDetailAutoGenerated"]] = 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):
    """Describes the format of Error response.

    :ivar code: Error code.
    :vartype code: str
    :ivar message: Error message indicating why the operation failed.
    :vartype message: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Error code."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Error message indicating why the operation failed."""

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

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

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


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

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.monitor.models.ErrorDetailAutoGenerated
    """

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

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

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

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


class ErrorResponseCommon(_Model):
    """Common error response for all Azure Resource Manager APIs to return error details for failed
    operations. (This also follows the OData error response format.).

    :ivar code: Error code.
    :vartype code: str
    :ivar message: Error message indicating why the operation failed.
    :vartype message: str
    :ivar target: The error target.
    :vartype target: str
    :ivar details: The error details.
    :vartype details: list[~azure.mgmt.monitor.models.ErrorResponseCommon]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.monitor.models.ErrorAdditionalInfo]
    """

    code: Optional[str] = rest_field(visibility=["read"])
    """Error code."""
    message: Optional[str] = rest_field(visibility=["read"])
    """Error message indicating why the operation failed."""
    target: Optional[str] = rest_field(visibility=["read"])
    """The error target."""
    details: Optional[list["_models.ErrorResponseCommon"]] = rest_field(visibility=["read"])
    """The error details."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class ErrorResponseCommonV2(_Model):
    """Common error response for all Azure Resource Manager APIs to return error details for failed
    operations. (This also follows the OData error response format.).

    :ivar error: The error object.
    :vartype error: ~azure.mgmt.monitor.models.ErrorDetailAutoGenerated
    """

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

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

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

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


class ErrorResponseError(_Model):
    """ErrorResponseError.

    :ivar code: Unlocalized string which can be used to programmatically identify the error.
    :vartype code: str
    :ivar message: Describes the error in detail and provides debugging information. If
     Accept-Language is set in the request, it must be localized to that language.
    :vartype message: str
    :ivar target: The target of the particular error (for example, the name of the property in
     error).
    :vartype target: str
    :ivar details: An array of additional nested error response info objects, as described by this
     contract.
    :vartype details: list[~azure.mgmt.monitor.models.ErrorDetail]
    :ivar additional_info: An array of objects with 'type' and 'info' properties. The schema of
     'info' is service-specific and dependent on the 'type' string.
    :vartype additional_info: list[~azure.mgmt.monitor.models.ErrorResponseErrorAdditionalInfoItem]
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unlocalized string which can be used to programmatically identify the error."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describes the error in detail and provides debugging information. If Accept-Language is set in
     the request, it must be localized to that language."""
    target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The target of the particular error (for example, the name of the property in error)."""
    details: Optional[list["_models.ErrorDetail"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of additional nested error response info objects, as described by this contract."""
    additional_info: Optional[list["_models.ErrorResponseErrorAdditionalInfoItem"]] = rest_field(
        name="additionalInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific
     and dependent on the 'type' string."""

    @overload
    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        target: Optional[str] = None,
        details: Optional[list["_models.ErrorDetail"]] = None,
        additional_info: Optional[list["_models.ErrorResponseErrorAdditionalInfoItem"]] = None,
    ) -> None: ...

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

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


class ErrorResponseErrorAdditionalInfoItem(_Model):
    """ErrorResponseErrorAdditionalInfoItem.

    :ivar type: The type of additional information.
    :vartype type: str
    :ivar info: The additional information specific to the type.
    :vartype info: dict[str, any]
    """

    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of additional information."""
    info: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The additional information specific to the type."""

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

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

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


class EtwProviderDataSource(_Model):
    """Enables an ETW provider logs to be collected by this data collection rule.

    :ivar streams: List of streams that this data source will be sent to. Required.
    :vartype streams: list[str]
    :ivar provider: The provider GUID or class name for event source. Required.
    :vartype provider: str
    :ivar provider_type: Provider type specification: By Manifest GUID or by Event Source name.
     Required. Known values are: "EventSource" and "Manifest".
    :vartype provider_type: str or ~azure.mgmt.monitor.models.KnownEtwProviderType
    :ivar log_level: Minimal level of detail to be logged. Known values are: "Critical", "Error",
     "Warning", "Informational", and "Verbose".
    :vartype log_level: str or ~azure.mgmt.monitor.models.KnownEtwProviderDataSourceLogLevel
    :ivar event_ids: Events Ids to collect.
    :vartype event_ids: list[str]
    :ivar keyword: Event's membership in a set of event categories.
    :vartype keyword: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of streams that this data source will be sent to. Required."""
    provider: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The provider GUID or class name for event source. Required."""
    provider_type: Union[str, "_models.KnownEtwProviderType"] = rest_field(
        name="providerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Provider type specification: By Manifest GUID or by Event Source name. Required. Known values
     are: \"EventSource\" and \"Manifest\"."""
    log_level: Optional[Union[str, "_models.KnownEtwProviderDataSourceLogLevel"]] = rest_field(
        name="logLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Minimal level of detail to be logged. Known values are: \"Critical\", \"Error\", \"Warning\",
     \"Informational\", and \"Verbose\"."""
    event_ids: Optional[list[str]] = rest_field(
        name="eventIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """Events Ids to collect."""
    keyword: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Event's membership in a set of event categories."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[str],
        provider: str,
        provider_type: Union[str, "_models.KnownEtwProviderType"],
        log_level: Optional[Union[str, "_models.KnownEtwProviderDataSourceLogLevel"]] = None,
        event_ids: Optional[list[str]] = None,
        keyword: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class EventData(_Model):
    """The Azure event log entries are of type EventData.

    :ivar authorization: The sender authorization information.
    :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization
    :ivar claims: key value pairs to identify ARM permissions.
    :vartype claims: dict[str, str]
    :ivar caller: the email address of the user who has performed the operation, the UPN claim or
     SPN claim based on availability.
    :vartype caller: str
    :ivar description: the description of the event.
    :vartype description: str
    :ivar id: the Id of this event as required by ARM for RBAC. It contains the EventDataID and a
     timestamp information.
    :vartype id: str
    :ivar event_data_id: the event data Id. This is a unique identifier for an event.
    :vartype event_data_id: str
    :ivar correlation_id: the correlation Id, usually a GUID in the string format. The correlation
     Id is shared among the events that belong to the same uber operation.
    :vartype correlation_id: str
    :ivar event_name: the event name. This value should not be confused with OperationName. For
     practical purposes, OperationName might be more appealing to end users.
    :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar category: the event category.
    :vartype category: ~azure.mgmt.monitor.models.LocalizableString
    :ivar http_request: the HTTP request info. Usually includes the 'clientRequestId',
     'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method
     e.g. PUT).
    :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo
    :ivar level: the event level. Known values are: "Critical", "Error", "Warning",
     "Informational", and "Verbose".
    :vartype level: str or ~azure.mgmt.monitor.models.EventLevel
    :ivar resource_group_name: the resource group name of the impacted resource.
    :vartype resource_group_name: str
    :ivar resource_provider_name: the resource provider name of the impacted resource.
    :vartype resource_provider_name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar resource_id: the resource uri that uniquely identifies the resource that caused this
     event.
    :vartype resource_id: str
    :ivar resource_type: the resource type.
    :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString
    :ivar operation_id: It is usually a GUID shared among the events corresponding to single
     operation. This value should not be confused with EventName.
    :vartype operation_id: str
    :ivar operation_name: the operation name.
    :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar properties: the set of <Key, Value> pairs (usually a Dictionary<String, String>) that
     includes details about the event.
    :vartype properties: dict[str, str]
    :ivar status: a string describing the status of the operation. Some typical values are:
     Started, In progress, Succeeded, Failed, Resolved.
    :vartype status: ~azure.mgmt.monitor.models.LocalizableString
    :ivar sub_status: the event sub status. Most of the time, when included, this captures the HTTP
     status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP
     Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad
     Request(HTTP Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code:
     409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status
     Code:503), Gateway Timeout (HTTP Status Code: 504).
    :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString
    :ivar event_timestamp: the timestamp of when the event was generated by the Azure service
     processing the request corresponding the event. It in ISO 8601 format.
    :vartype event_timestamp: ~datetime.datetime
    :ivar submission_timestamp: the timestamp of when the event became available for querying via
     this API. It is in ISO 8601 format. This value should not be confused eventTimestamp. As there
     might be a delay between the occurrence time of the event, and the time that the event is
     submitted to the Azure logging infrastructure.
    :vartype submission_timestamp: ~datetime.datetime
    :ivar subscription_id: the Azure subscription Id usually a GUID.
    :vartype subscription_id: str
    :ivar tenant_id: the Azure tenant Id.
    :vartype tenant_id: str
    """

    authorization: Optional["_models.SenderAuthorization"] = rest_field(visibility=["read"])
    """The sender authorization information."""
    claims: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """key value pairs to identify ARM permissions."""
    caller: Optional[str] = rest_field(visibility=["read"])
    """the email address of the user who has performed the operation, the UPN claim or SPN claim based
     on availability."""
    description: Optional[str] = rest_field(visibility=["read"])
    """the description of the event."""
    id: Optional[str] = rest_field(visibility=["read"])
    """the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp
     information."""
    event_data_id: Optional[str] = rest_field(name="eventDataId", visibility=["read"])
    """the event data Id. This is a unique identifier for an event."""
    correlation_id: Optional[str] = rest_field(name="correlationId", visibility=["read"])
    """the correlation Id, usually a GUID in the string format. The correlation Id is shared among the
     events that belong to the same uber operation."""
    event_name: Optional["_models.LocalizableString"] = rest_field(name="eventName", visibility=["read"])
    """the event name. This value should not be confused with OperationName. For practical purposes,
     OperationName might be more appealing to end users."""
    category: Optional["_models.LocalizableString"] = rest_field(visibility=["read"])
    """the event category."""
    http_request: Optional["_models.HttpRequestInfo"] = rest_field(name="httpRequest", visibility=["read"])
    """the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of
     the user who initiated the event) and 'method' (HTTP method e.g. PUT)."""
    level: Optional[Union[str, "_models.EventLevel"]] = rest_field(visibility=["read"])
    """the event level. Known values are: \"Critical\", \"Error\", \"Warning\", \"Informational\", and
     \"Verbose\"."""
    resource_group_name: Optional[str] = rest_field(name="resourceGroupName", visibility=["read"])
    """the resource group name of the impacted resource."""
    resource_provider_name: Optional["_models.LocalizableString"] = rest_field(
        name="resourceProviderName", visibility=["read"]
    )
    """the resource provider name of the impacted resource."""
    resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"])
    """the resource uri that uniquely identifies the resource that caused this event."""
    resource_type: Optional["_models.LocalizableString"] = rest_field(name="resourceType", visibility=["read"])
    """the resource type."""
    operation_id: Optional[str] = rest_field(name="operationId", visibility=["read"])
    """It is usually a GUID shared among the events corresponding to single operation. This value
     should not be confused with EventName."""
    operation_name: Optional["_models.LocalizableString"] = rest_field(name="operationName", visibility=["read"])
    """the operation name."""
    properties: Optional[dict[str, str]] = rest_field(visibility=["read"])
    """the set of <Key, Value> pairs (usually a Dictionary<String, String>) that includes details
     about the event."""
    status: Optional["_models.LocalizableString"] = rest_field(visibility=["read"])
    """a string describing the status of the operation. Some typical values are: Started, In progress,
     Succeeded, Failed, Resolved."""
    sub_status: Optional["_models.LocalizableString"] = rest_field(name="subStatus", visibility=["read"])
    """the event sub status. Most of the time, when included, this captures the HTTP status code of
     the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201),
     Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP Status
     Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal
     Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway
     Timeout (HTTP Status Code: 504)."""
    event_timestamp: Optional[datetime.datetime] = rest_field(
        name="eventTimestamp", visibility=["read"], format="rfc3339"
    )
    """the timestamp of when the event was generated by the Azure service processing the request
     corresponding the event. It in ISO 8601 format."""
    submission_timestamp: Optional[datetime.datetime] = rest_field(
        name="submissionTimestamp", visibility=["read"], format="rfc3339"
    )
    """the timestamp of when the event became available for querying via this API. It is in ISO 8601
     format. This value should not be confused eventTimestamp. As there might be a delay between the
     occurrence time of the event, and the time that the event is submitted to the Azure logging
     infrastructure."""
    subscription_id: Optional[str] = rest_field(name="subscriptionId", visibility=["read"])
    """the Azure subscription Id usually a GUID."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """the Azure tenant Id."""


class EventHubDestination(_Model):
    """EventHubDestination.

    :ivar event_hub_resource_id: The resource ID of the event hub.
    :vartype event_hub_resource_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    event_hub_resource_id: Optional[str] = rest_field(
        name="eventHubResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the event hub."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class EventHubDirectDestination(_Model):
    """EventHubDirectDestination.

    :ivar event_hub_resource_id: The resource ID of the event hub.
    :vartype event_hub_resource_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    event_hub_resource_id: Optional[str] = rest_field(
        name="eventHubResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the event hub."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class EventHubReceiver(_Model):
    """An Event hub receiver.

    :ivar name: The name of the Event hub receiver. Names must be unique across all receivers
     within an action group. Required.
    :vartype name: str
    :ivar event_hub_name_space: The Event Hub namespace. Required.
    :vartype event_hub_name_space: str
    :ivar event_hub_name: The name of the specific Event Hub queue. Required.
    :vartype event_hub_name: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar tenant_id: The tenant Id for the subscription containing this event hub.
    :vartype tenant_id: str
    :ivar subscription_id: The Id for the subscription containing this event hub. Required.
    :vartype subscription_id: str
    :ivar managed_identity: The principal id of the managed identity. The value can be "None",
     "SystemAssigned".
    :vartype managed_identity: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Event hub receiver. Names must be unique across all receivers within an action
     group. Required."""
    event_hub_name_space: str = rest_field(
        name="eventHubNameSpace", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Event Hub namespace. Required."""
    event_hub_name: str = rest_field(name="eventHubName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the specific Event Hub queue. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """The tenant Id for the subscription containing this event hub."""
    subscription_id: str = rest_field(name="subscriptionId", visibility=["read", "create", "update", "delete", "query"])
    """The Id for the subscription containing this event hub. Required."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The principal id of the managed identity. The value can be \"None\", \"SystemAssigned\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        event_hub_name_space: str,
        event_hub_name: str,
        subscription_id: str,
        use_common_alert_schema: Optional[bool] = None,
        tenant_id: Optional[str] = None,
        managed_identity: Optional[str] = None,
    ) -> None: ...

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

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


class ExtensionDataSource(_Model):
    """Definition of which data will be collected from a separate VM extension that integrates with
    the Azure Monitor Agent. Collected from either Windows and Linux machines, depending on which
    extension is defined.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownExtensionDataSourceStreams]
    :ivar extension_name: The name of the VM extension. Required.
    :vartype extension_name: str
    :ivar extension_settings: The extension settings. The format is specific for particular
     extension.
    :vartype extension_settings: any
    :ivar input_data_sources: The list of data sources this extension needs data from.
    :vartype input_data_sources: list[str]
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownExtensionDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to."""
    extension_name: str = rest_field(name="extensionName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the VM extension. Required."""
    extension_settings: Optional[Any] = rest_field(
        name="extensionSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """The extension settings. The format is specific for particular extension."""
    input_data_sources: Optional[list[str]] = rest_field(
        name="inputDataSources", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of data sources this extension needs data from."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        extension_name: str,
        streams: Optional[list[Union[str, "_models.KnownExtensionDataSourceStreams"]]] = None,
        extension_settings: Optional[Any] = None,
        input_data_sources: Optional[list[str]] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class HttpRequestInfo(_Model):
    """The Http request info.

    :ivar client_request_id: the client request id.
    :vartype client_request_id: str
    :ivar client_ip_address: the client Ip Address.
    :vartype client_ip_address: str
    :ivar method: the Http request method.
    :vartype method: str
    :ivar uri: the Uri.
    :vartype uri: str
    """

    client_request_id: Optional[str] = rest_field(
        name="clientRequestId", visibility=["read", "create", "update", "delete", "query"]
    )
    """the client request id."""
    client_ip_address: Optional[str] = rest_field(
        name="clientIpAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """the client Ip Address."""
    method: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the Http request method."""
    uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the Uri."""

    @overload
    def __init__(
        self,
        *,
        client_request_id: Optional[str] = None,
        client_ip_address: Optional[str] = None,
        method: Optional[str] = None,
        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 Identity(_Model):
    """Identity for the resource.

    :ivar principal_id: The principal ID of resource identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of resource.
    :vartype tenant_id: str
    :ivar type: Type of managed service identity. Required. Known values are: "SystemAssigned",
     "UserAssigned", and "None".
    :vartype type: str or ~azure.mgmt.monitor.models.IdentityType
    :ivar user_assigned_identities: The list of user 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.monitor.models.UserIdentityProperties]
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal ID of resource identity."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of resource."""
    type: Union[str, "_models.IdentityType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of managed service identity. Required. Known values are: \"SystemAssigned\",
     \"UserAssigned\", and \"None\"."""
    user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = rest_field(
        name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of user 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: Union[str, "_models.IdentityType"],
        user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None,
    ) -> None: ...

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

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


class IisLogsDataSource(_Model):
    """Enables IIS logs to be collected by this data collection rule.

    :ivar streams: IIS streams. Required.
    :vartype streams: list[str]
    :ivar log_directories: Absolute paths file location.
    :vartype log_directories: list[str]
    :ivar transform_kql: The KQL query to transform the data source. This is a deprecated property
     and will be removed in future versions.
    :vartype transform_kql: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """IIS streams. Required."""
    log_directories: Optional[list[str]] = rest_field(
        name="logDirectories", visibility=["read", "create", "update", "delete", "query"]
    )
    """Absolute paths file location."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform the data source. This is a deprecated property and will be removed
     in future versions."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

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

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

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


class Incident(_Model):
    """An alert incident indicates the activation status of an alert rule.

    :ivar name: Incident name.
    :vartype name: str
    :ivar rule_name: Rule name that is associated with the incident.
    :vartype rule_name: str
    :ivar is_active: A boolean to indicate whether the incident is active or resolved.
    :vartype is_active: bool
    :ivar activated_time: The time at which the incident was activated in ISO8601 format.
    :vartype activated_time: ~datetime.datetime
    :ivar resolved_time: The time at which the incident was resolved in ISO8601 format. If null, it
     means the incident is still active.
    :vartype resolved_time: ~datetime.datetime
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Incident name."""
    rule_name: Optional[str] = rest_field(name="ruleName", visibility=["read"])
    """Rule name that is associated with the incident."""
    is_active: Optional[bool] = rest_field(name="isActive", visibility=["read"])
    """A boolean to indicate whether the incident is active or resolved."""
    activated_time: Optional[datetime.datetime] = rest_field(
        name="activatedTime", visibility=["read"], format="rfc3339"
    )
    """The time at which the incident was activated in ISO8601 format."""
    resolved_time: Optional[datetime.datetime] = rest_field(name="resolvedTime", visibility=["read"], format="rfc3339")
    """The time at which the incident was resolved in ISO8601 format. If null, it means the incident
     is still active."""


class IncidentReceiver(_Model):
    """An Incident receiver.

    :ivar name: The name of the Incident receiver. Names must be unique across all receivers within
     an action group. Required.
    :vartype name: str
    :ivar connection: The incident service connection. Required.
    :vartype connection: ~azure.mgmt.monitor.models.IncidentServiceConnection
    :ivar incident_management_service: The incident management service type. Required. "Icm"
    :vartype incident_management_service: str or
     ~azure.mgmt.monitor.models.IncidentManagementService
    :ivar mappings: Field mappings for the incident service. Required.
    :vartype mappings: dict[str, str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Incident receiver. Names must be unique across all receivers within an action
     group. Required."""
    connection: "_models.IncidentServiceConnection" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The incident service connection. Required."""
    incident_management_service: Union[str, "_models.IncidentManagementService"] = rest_field(
        name="incidentManagementService", visibility=["read", "create", "update", "delete", "query"]
    )
    """The incident management service type. Required. \"Icm\""""
    mappings: dict[str, str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Field mappings for the incident service. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        connection: "_models.IncidentServiceConnection",
        incident_management_service: Union[str, "_models.IncidentManagementService"],
        mappings: 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 IncidentServiceConnection(_Model):
    """The connection info for Incident Receiver.

    :ivar name: The name of the connection. Required.
    :vartype name: str
    :ivar id: GUID value representing the connection ID for the incident management service.
     Required.
    :vartype id: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the connection. Required."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """GUID value representing the connection ID for the incident management service. Required."""

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

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

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


class LogsQuotaSpec(_Model):
    """LogsQuotaSpec.

    :ivar max_size_per_minute_in_gb:
    :vartype max_size_per_minute_in_gb: str
    :ivar max_requests_per_minute:
    :vartype max_requests_per_minute: str
    """

    max_size_per_minute_in_gb: Optional[str] = rest_field(
        name="maxSizePerMinuteInGB", visibility=["read", "create", "update", "delete", "query"]
    )
    max_requests_per_minute: Optional[str] = rest_field(
        name="maxRequestsPerMinute", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        max_size_per_minute_in_gb: Optional[str] = None,
        max_requests_per_minute: 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 IngestionQuotasLogs(LogsQuotaSpec):
    """IngestionQuotasLogs.

    :ivar max_size_per_minute_in_gb:
    :vartype max_size_per_minute_in_gb: str
    :ivar max_requests_per_minute:
    :vartype max_requests_per_minute: str
    """

    @overload
    def __init__(
        self,
        *,
        max_size_per_minute_in_gb: Optional[str] = None,
        max_requests_per_minute: 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 ItsmReceiver(_Model):
    """An Itsm receiver.

    :ivar name: The name of the Itsm receiver. Names must be unique across all receivers within an
     action group. Required.
    :vartype name: str
    :ivar workspace_id: OMS LA instance identifier. Required.
    :vartype workspace_id: str
    :ivar connection_id: Unique identification of ITSM connection among multiple defined in above
     workspace. Required.
    :vartype connection_id: str
    :ivar ticket_configuration: JSON blob for the configurations of the ITSM action.
     CreateMultipleWorkItems option will be part of this blob as well. Required.
    :vartype ticket_configuration: str
    :ivar region: Region in which workspace resides. Supported
     values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'.
     Required.
    :vartype region: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Itsm receiver. Names must be unique across all receivers within an action
     group. Required."""
    workspace_id: str = rest_field(name="workspaceId", visibility=["read", "create", "update", "delete", "query"])
    """OMS LA instance identifier. Required."""
    connection_id: str = rest_field(name="connectionId", visibility=["read", "create", "update", "delete", "query"])
    """Unique identification of ITSM connection among multiple defined in above workspace. Required."""
    ticket_configuration: str = rest_field(
        name="ticketConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be
     part of this blob as well. Required."""
    region: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Region in which workspace resides. Supported
     values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'.
     Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        workspace_id: str,
        connection_id: str,
        ticket_configuration: str,
        region: 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 LocalizableString(_Model):
    """The localizable string class.

    :ivar value: the invariant value. Required.
    :vartype value: str
    :ivar localized_value: the locale specific value.
    :vartype localized_value: str
    """

    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the invariant value. Required."""
    localized_value: Optional[str] = rest_field(
        name="localizedValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """the locale specific value."""

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

    :ivar location: Name of location.
    :vartype location: str
    :ivar provisioning_status: The resource provisioning state in this location. Known values are:
     "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed".
    :vartype provisioning_status: str or
     ~azure.mgmt.monitor.models.KnownLocationSpecProvisioningStatus
    """

    location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of location."""
    provisioning_status: Optional[Union[str, "_models.KnownLocationSpecProvisioningStatus"]] = rest_field(
        name="provisioningStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource provisioning state in this location. Known values are: \"Creating\", \"Updating\",
     \"Deleting\", \"Succeeded\", \"Canceled\", and \"Failed\"."""

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

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

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


class LogAnalyticsDestination(_Model):
    """Log Analytics destination.

    :ivar workspace_resource_id: The resource ID of the Log Analytics workspace.
    :vartype workspace_resource_id: str
    :ivar workspace_id: The Customer ID of the Log Analytics workspace.
    :vartype workspace_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    workspace_resource_id: Optional[str] = rest_field(
        name="workspaceResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the Log Analytics workspace."""
    workspace_id: Optional[str] = rest_field(name="workspaceId", visibility=["read"])
    """The Customer ID of the Log Analytics workspace."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class LogFilesDataSource(_Model):
    """Definition of which custom log files will be collected by this data collection rule.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data source. Required.
    :vartype streams: list[str]
    :ivar file_patterns: File Patterns where the log files are located. Required.
    :vartype file_patterns: list[str]
    :ivar format: The data format of the log files. Required. Known values are: "json" and "text".
    :vartype format: str or ~azure.mgmt.monitor.models.KnownLogFilesDataSourceFormat
    :ivar settings: The log files specific settings.
    :vartype settings: ~azure.mgmt.monitor.models.LogFilesDataSourceSettings
    :ivar transform_kql: The KQL query to transform the data source. This is a deprecated property
     and will be removed in future versions.
    :vartype transform_kql: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data source. Required."""
    file_patterns: list[str] = rest_field(
        name="filePatterns", visibility=["read", "create", "update", "delete", "query"]
    )
    """File Patterns where the log files are located. Required."""
    format: Union[str, "_models.KnownLogFilesDataSourceFormat"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The data format of the log files. Required. Known values are: \"json\" and \"text\"."""
    settings: Optional["_models.LogFilesDataSourceSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The log files specific settings."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform the data source. This is a deprecated property and will be removed
     in future versions."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[str],
        file_patterns: list[str],
        format: Union[str, "_models.KnownLogFilesDataSourceFormat"],
        settings: Optional["_models.LogFilesDataSourceSettings"] = None,
        transform_kql: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class LogFileSettings(_Model):
    """Settings for different log file formats.

    :ivar text: Text settings.
    :vartype text: ~azure.mgmt.monitor.models.LogFileSettingsText
    """

    text: Optional["_models.LogFileSettingsText"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Text settings."""

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

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

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


class LogFilesDataSourceSettings(LogFileSettings):
    """The log files specific settings.

    :ivar text: Text settings.
    :vartype text: ~azure.mgmt.monitor.models.LogFileSettingsText
    """

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

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

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


class LogFileTextSettings(_Model):
    """Settings for text log files.

    :ivar record_start_timestamp_format: One of the supported timestamp formats. Required. Known
     values are: "ISO 8601", "YYYY-MM-DD HH:MM:SS", "M/D/YYYY HH:MM:SS AM/PM", "Mon DD, YYYY
     HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz",
     and "yyyy-MM-ddTHH:mm:ssK".
    :vartype record_start_timestamp_format: str or
     ~azure.mgmt.monitor.models.KnownLogFileTextSettingsRecordStartTimestampFormat
    """

    record_start_timestamp_format: Union[str, "_models.KnownLogFileTextSettingsRecordStartTimestampFormat"] = (
        rest_field(name="recordStartTimestampFormat", visibility=["read", "create", "update", "delete", "query"])
    )
    """One of the supported timestamp formats. Required. Known values are: \"ISO 8601\", \"YYYY-MM-DD
     HH:MM:SS\", \"M/D/YYYY HH:MM:SS AM/PM\", \"Mon DD, YYYY HH:MM:SS\", \"yyMMdd HH:mm:ss\",
     \"ddMMyy HH:mm:ss\", \"MMM d hh:mm:ss\", \"dd/MMM/yyyy:HH:mm:ss zzz\", and
     \"yyyy-MM-ddTHH:mm:ssK\"."""

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

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

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


class LogFileSettingsText(LogFileTextSettings):
    """Text settings.

    :ivar record_start_timestamp_format: One of the supported timestamp formats. Required. Known
     values are: "ISO 8601", "YYYY-MM-DD HH:MM:SS", "M/D/YYYY HH:MM:SS AM/PM", "Mon DD, YYYY
     HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz",
     and "yyyy-MM-ddTHH:mm:ssK".
    :vartype record_start_timestamp_format: str or
     ~azure.mgmt.monitor.models.KnownLogFileTextSettingsRecordStartTimestampFormat
    """

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

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

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


class LogicAppReceiver(_Model):
    """A logic app receiver.

    :ivar name: The name of the logic app receiver. Names must be unique across all receivers
     within an action group. Required.
    :vartype name: str
    :ivar resource_id: The azure resource id of the logic app receiver. Required.
    :vartype resource_id: str
    :ivar callback_url: The callback url where http request sent to. Required.
    :vartype callback_url: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar managed_identity: The principal id of the managed identity. The value can be "None",
     "SystemAssigned".
    :vartype managed_identity: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the logic app receiver. Names must be unique across all receivers within an action
     group. Required."""
    resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"])
    """The azure resource id of the logic app receiver. Required."""
    callback_url: str = rest_field(name="callbackUrl", visibility=["read", "create", "update", "delete", "query"])
    """The callback url where http request sent to. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The principal id of the managed identity. The value can be \"None\", \"SystemAssigned\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        resource_id: str,
        callback_url: str,
        use_common_alert_schema: Optional[bool] = None,
        managed_identity: Optional[str] = None,
    ) -> None: ...

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

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


class LogProfileProperties(_Model):
    """The log profile properties.

    :ivar storage_account_id: the resource id of the storage account to which you would like to
     send the Activity Log.
    :vartype storage_account_id: str
    :ivar service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
     would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the
     format: '{service bus resource ID}/authorizationrules/{key name}'.
    :vartype service_bus_rule_id: str
    :ivar locations: List of regions for which Activity Log events should be stored or streamed. It
     is a comma separated list of valid ARM locations including the 'global' location. Required.
    :vartype locations: list[str]
    :ivar categories: the categories of the logs. These categories are created as is convenient to
     the user. Some values are: 'Write', 'Delete', and/or 'Action.'. Required.
    :vartype categories: list[str]
    :ivar retention_policy: the retention policy for the events in the log. Required.
    :vartype retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy
    """

    storage_account_id: Optional[str] = rest_field(
        name="storageAccountId", visibility=["read", "create", "update", "delete", "query"]
    )
    """the resource id of the storage account to which you would like to send the Activity Log."""
    service_bus_rule_id: Optional[str] = rest_field(
        name="serviceBusRuleId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service bus rule ID of the service bus namespace in which you would like to have Event Hubs
     created for streaming the Activity Log. The rule ID is of the format: '{service bus resource
     ID}/authorizationrules/{key name}'."""
    locations: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of regions for which Activity Log events should be stored or streamed. It is a comma
     separated list of valid ARM locations including the 'global' location. Required."""
    categories: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the categories of the logs. These categories are created as is convenient to the user. Some
     values are: 'Write', 'Delete', and/or 'Action.'. Required."""
    retention_policy: "_models.RetentionPolicy" = rest_field(
        name="retentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """the retention policy for the events in the log. Required."""

    @overload
    def __init__(
        self,
        *,
        locations: list[str],
        categories: list[str],
        retention_policy: "_models.RetentionPolicy",
        storage_account_id: Optional[str] = None,
        service_bus_rule_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 LogProfileResource(TrackedResource):
    """The log profile 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: The log profile properties of the resource. Required.
    :vartype properties: ~azure.mgmt.monitor.models.LogProfileProperties
    """

    properties: "_models.LogProfileProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The log profile properties of the resource. Required."""

    __flattened_items = ["storage_account_id", "service_bus_rule_id", "locations", "categories", "retention_policy"]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.LogProfileProperties",
        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 LogProfileResourcePatch(_Model):
    """The log profile resource for patch operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The log profile properties for an update operation.
    :vartype properties: ~azure.mgmt.monitor.models.LogProfileProperties
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    properties: Optional["_models.LogProfileProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The log profile properties for an update operation."""

    __flattened_items = ["storage_account_id", "service_bus_rule_id", "locations", "categories", "retention_policy"]

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

    @overload
    def __init__(self, mapping: Mapping[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 LogSettings(_Model):
    """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.

    :ivar category: Name of a Diagnostic Log category for a resource type this setting is applied
     to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET
     diagnostic settings operation.
    :vartype category: str
    :ivar category_group: Name of a Diagnostic Log category group for a resource type this setting
     is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a
     GET diagnostic settings operation.
    :vartype category_group: str
    :ivar enabled: a value indicating whether this log is enabled. Required.
    :vartype enabled: bool
    :ivar retention_policy: the retention policy for this log.
    :vartype retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy
    """

    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the
     list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings
     operation."""
    category_group: Optional[str] = rest_field(
        name="categoryGroup", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of a Diagnostic Log category group for a resource type this setting is applied to. To
     obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic
     settings operation."""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """a value indicating whether this log is enabled. Required."""
    retention_policy: Optional["_models.RetentionPolicy"] = rest_field(
        name="retentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """the retention policy for this log."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        category: Optional[str] = None,
        category_group: Optional[str] = None,
        retention_policy: Optional["_models.RetentionPolicy"] = None,
    ) -> None: ...

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

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


class MetadataValue(_Model):
    """Represents a metric metadata value.

    :ivar name: The name of the metadata.
    :vartype name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar value: The value of the metadata.
    :vartype value: str
    """

    name: Optional["_models.LocalizableString"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the metadata."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the metadata."""

    @overload
    def __init__(
        self,
        *,
        name: Optional["_models.LocalizableString"] = 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 Metric(_Model):
    """The result data of a query.

    :ivar id: The metric Id. Required.
    :vartype id: str
    :ivar type: The resource type of the metric resource. Required.
    :vartype type: str
    :ivar name: The name and the display name of the metric, i.e. it is localizable string.
     Required.
    :vartype name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar display_description: Detailed description of this metric.
    :vartype display_description: str
    :ivar error_code: 'Success' or the error details on query failures for this metric.
    :vartype error_code: str
    :ivar error_message: Error message encountered querying this specific metric.
    :vartype error_message: str
    :ivar unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds",
     "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified",
     "Cores", "MilliCores", "NanoCores", and "BitsPerSecond".
    :vartype unit: str or ~azure.mgmt.monitor.models.MetricUnit
    :ivar timeseries: The time series returned when a data query is performed. Required.
    :vartype timeseries: list[~azure.mgmt.monitor.models.TimeSeriesElement]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The metric Id. Required."""
    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource type of the metric resource. Required."""
    name: "_models.LocalizableString" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name and the display name of the metric, i.e. it is localizable string. Required."""
    display_description: Optional[str] = rest_field(
        name="displayDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """Detailed description of this metric."""
    error_code: Optional[str] = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"])
    """'Success' or the error details on query failures for this metric."""
    error_message: Optional[str] = rest_field(
        name="errorMessage", visibility=["read", "create", "update", "delete", "query"]
    )
    """Error message encountered querying this specific metric."""
    unit: Union[str, "_models.MetricUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unit of the metric. Required. Known values are: \"Count\", \"Bytes\", \"Seconds\",
     \"CountPerSecond\", \"BytesPerSecond\", \"Percent\", \"MilliSeconds\", \"ByteSeconds\",
     \"Unspecified\", \"Cores\", \"MilliCores\", \"NanoCores\", and \"BitsPerSecond\"."""
    timeseries: list["_models.TimeSeriesElement"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The time series returned when a data query is performed. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        type: str,
        name: "_models.LocalizableString",
        unit: Union[str, "_models.MetricUnit"],
        timeseries: list["_models.TimeSeriesElement"],
        display_description: Optional[str] = None,
        error_code: Optional[str] = None,
        error_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 MetricAlertAction(_Model):
    """An alert action.

    :ivar action_group_id: The id of the action group to use.
    :vartype action_group_id: str
    :ivar web_hook_properties: This field allows specifying custom properties, which would be
     appended to the alert payload sent as input to the webhook.
    :vartype web_hook_properties: dict[str, str]
    """

    action_group_id: Optional[str] = rest_field(
        name="actionGroupId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The id of the action group to use."""
    web_hook_properties: Optional[dict[str, str]] = rest_field(
        name="webHookProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """This field allows specifying custom properties, which would be appended to the alert payload
     sent as input to the webhook."""

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

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

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


class MetricAlertCriteria(_Model):
    """The rule criteria that defines the conditions of the alert rule.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    MetricAlertMultipleResourceMultipleMetricCriteria, PromQLCriteria,
    MetricAlertSingleResourceMultipleMetricCriteria, WebtestLocationAvailabilityCriteria

    :ivar odata_type: Specifies the type of the alert criteria. Previously undocumented values
     might be returned. Required. Known values are:
     "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
     "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
     "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", and
     "Microsoft.Azure.Monitor.PromQLCriteria".
    :vartype odata_type: str or ~azure.mgmt.monitor.models.Odatatype
    """

    __mapping__: dict[str, _Model] = {}
    odata_type: str = rest_discriminator(name="odata.type", visibility=["read", "create", "update", "delete", "query"])
    """Specifies the type of the alert criteria. Previously undocumented values might be returned.
     Required. Known values are: \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\",
     \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\",
     \"Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria\", and
     \"Microsoft.Azure.Monitor.PromQLCriteria\"."""

    @overload
    def __init__(
        self,
        *,
        odata_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 MetricAlertErrorResponse(_Model):
    """Describes the format of Error response.

    :ivar error:
    :vartype error: ~azure.mgmt.monitor.models.ErrorResponseError
    """

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

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

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

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


class MetricAlertMultipleResourceMultipleMetricCriteria(
    MetricAlertCriteria, discriminator="Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
):  # pylint: disable=name-too-long
    """Specifies the metric alert criteria for multiple resource that has multiple metric criteria.

    :ivar all_of: The list of multiple metric criteria for this 'all of' operation.
    :vartype all_of: list[~azure.mgmt.monitor.models.MultiMetricCriteria]
    :ivar odata_type: Specifies the type of the alert criteria. Previously undocumented values
     might be returned. Required. Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria.
    :vartype odata_type: str or
     ~azure.mgmt.monitor.models.MICROSOFT_AZURE_MONITOR_MULTIPLE_RESOURCE_MULTIPLE_METRIC_CRITERIA
    """

    all_of: Optional[list["_models.MultiMetricCriteria"]] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of multiple metric criteria for this 'all of' operation."""
    odata_type: Literal[Odatatype.MICROSOFT_AZURE_MONITOR_MULTIPLE_RESOURCE_MULTIPLE_METRIC_CRITERIA] = rest_discriminator(name="odata.type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of the alert criteria. Previously undocumented values might be returned.
     Required. Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria."""

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

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


class MetricAlertProperties(_Model):
    """An alert rule.

    :ivar description: The description of the metric alert that will be included in the alert
     email.
    :vartype description: str
    :ivar severity: Alert severity {0, 1, 2, 3, 4}. Required.
    :vartype severity: int
    :ivar enabled: The flag that indicates whether the metric alert is enabled. Required.
    :vartype enabled: bool
    :ivar scopes: The list of resource id's that this metric alert is scoped to. You cannot change
     the scope of a metric rule based on logs. Required.
    :vartype scopes: list[str]
    :ivar evaluation_frequency: How often the metric alert is evaluated represented in ISO 8601
     duration format. Required.
    :vartype evaluation_frequency: ~datetime.timedelta
    :ivar window_size: The period of time (in ISO 8601 duration format) that is used to monitor
     alert activity based on the threshold.
    :vartype window_size: ~datetime.timedelta
    :ivar target_resource_type: The resource type of the target resource(s) on which the alert is
     created/updated. Mandatory if the scope contains a subscription, resource group, or more than
     one resource.
    :vartype target_resource_type: str
    :ivar target_resource_region: The region of the target resource(s) on which the alert is
     created/updated. Mandatory if the scope contains a subscription, resource group, or more than
     one resource.
    :vartype target_resource_region: str
    :ivar criteria: Defines the specific alert criteria information. Required.
    :vartype criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria
    :ivar auto_mitigate: The flag that indicates whether the alert should be auto resolved or not.
     The default is true.
    :vartype auto_mitigate: bool
    :ivar resolve_configuration: The configuration for how the alert is resolved. Applicable for
     PromQLCriteria.
    :vartype resolve_configuration: ~azure.mgmt.monitor.models.ResolveConfiguration
    :ivar actions: The array of actions that are performed when the alert rule becomes active, and
     when an alert condition is resolved.
    :vartype actions: list[~azure.mgmt.monitor.models.MetricAlertAction]
    :ivar last_updated_time: Last time the rule was updated in ISO8601 format.
    :vartype last_updated_time: ~datetime.datetime
    :ivar is_migrated: The value indicating whether this alert rule is migrated.
    :vartype is_migrated: bool
    :ivar custom_properties: The properties of an alert payload.
    :vartype custom_properties: dict[str, str]
    :ivar action_properties: The properties of an action properties.
    :vartype action_properties: dict[str, str]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the metric alert that will be included in the alert email."""
    severity: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Alert severity {0, 1, 2, 3, 4}. Required."""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The flag that indicates whether the metric alert is enabled. Required."""
    scopes: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of resource id's that this metric alert is scoped to. You cannot change the scope of a
     metric rule based on logs. Required."""
    evaluation_frequency: datetime.timedelta = rest_field(
        name="evaluationFrequency", visibility=["read", "create", "update", "delete", "query"]
    )
    """How often the metric alert is evaluated represented in ISO 8601 duration format. Required."""
    window_size: Optional[datetime.timedelta] = rest_field(
        name="windowSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """The period of time (in ISO 8601 duration format) that is used to monitor alert activity based
     on the threshold."""
    target_resource_type: Optional[str] = rest_field(
        name="targetResourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource type of the target resource(s) on which the alert is created/updated. Mandatory if
     the scope contains a subscription, resource group, or more than one resource."""
    target_resource_region: Optional[str] = rest_field(
        name="targetResourceRegion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The region of the target resource(s) on which the alert is created/updated. Mandatory if the
     scope contains a subscription, resource group, or more than one resource."""
    criteria: "_models.MetricAlertCriteria" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Defines the specific alert criteria information. Required."""
    auto_mitigate: Optional[bool] = rest_field(
        name="autoMitigate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that indicates whether the alert should be auto resolved or not. The default is true."""
    resolve_configuration: Optional["_models.ResolveConfiguration"] = rest_field(
        name="resolveConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration for how the alert is resolved. Applicable for PromQLCriteria."""
    actions: Optional[list["_models.MetricAlertAction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The array of actions that are performed when the alert rule becomes active, and when an alert
     condition is resolved."""
    last_updated_time: Optional[datetime.datetime] = rest_field(
        name="lastUpdatedTime", visibility=["read"], format="rfc3339"
    )
    """Last time the rule was updated in ISO8601 format."""
    is_migrated: Optional[bool] = rest_field(name="isMigrated", visibility=["read"])
    """The value indicating whether this alert rule is migrated."""
    custom_properties: Optional[dict[str, str]] = rest_field(
        name="customProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an alert payload."""
    action_properties: Optional[dict[str, str]] = rest_field(
        name="actionProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an action properties."""

    @overload
    def __init__(
        self,
        *,
        severity: int,
        enabled: bool,
        scopes: list[str],
        evaluation_frequency: datetime.timedelta,
        criteria: "_models.MetricAlertCriteria",
        description: Optional[str] = None,
        window_size: Optional[datetime.timedelta] = None,
        target_resource_type: Optional[str] = None,
        target_resource_region: Optional[str] = None,
        auto_mitigate: Optional[bool] = None,
        resolve_configuration: Optional["_models.ResolveConfiguration"] = None,
        actions: Optional[list["_models.MetricAlertAction"]] = None,
        custom_properties: Optional[dict[str, str]] = None,
        action_properties: Optional[dict[str, str]] = None,
    ) -> None: ...

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

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


class MetricAlertPropertiesPatch(_Model):
    """An alert rule properties for patch.

    :ivar description: The description of the metric alert that will be included in the alert
     email.
    :vartype description: str
    :ivar severity: Alert severity {0, 1, 2, 3, 4}.
    :vartype severity: int
    :ivar enabled: The flag that indicates whether the metric alert is enabled.
    :vartype enabled: bool
    :ivar scopes: The list of resource id's that this metric alert is scoped to.
    :vartype scopes: list[str]
    :ivar evaluation_frequency: How often the metric alert is evaluated represented in ISO 8601
     duration format.
    :vartype evaluation_frequency: ~datetime.timedelta
    :ivar window_size: The period of time (in ISO 8601 duration format) that is used to monitor
     alert activity based on the threshold.
    :vartype window_size: ~datetime.timedelta
    :ivar target_resource_type: The resource type of the target resource(s) on which the alert is
     created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
    :vartype target_resource_type: str
    :ivar target_resource_region: The region of the target resource(s) on which the alert is
     created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
    :vartype target_resource_region: str
    :ivar criteria: Defines the specific alert criteria information.
    :vartype criteria: ~azure.mgmt.monitor.models.MetricAlertCriteria
    :ivar auto_mitigate: The flag that indicates whether the alert should be auto resolved or not.
     The default is true.
    :vartype auto_mitigate: bool
    :ivar resolve_configuration: The configuration for how the alert is resolved. Applicable for
     PromQLCriteria.
    :vartype resolve_configuration: ~azure.mgmt.monitor.models.ResolveConfiguration
    :ivar actions: The array of actions that are performed when the alert rule becomes active, and
     when an alert condition is resolved.
    :vartype actions: list[~azure.mgmt.monitor.models.MetricAlertAction]
    :ivar last_updated_time: Last time the rule was updated in ISO8601 format.
    :vartype last_updated_time: ~datetime.datetime
    :ivar is_migrated: The value indicating whether this alert rule is migrated.
    :vartype is_migrated: bool
    :ivar custom_properties: The properties of an alert payload.
    :vartype custom_properties: dict[str, str]
    :ivar action_properties: The properties of an action properties.
    :vartype action_properties: dict[str, str]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the metric alert that will be included in the alert email."""
    severity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Alert severity {0, 1, 2, 3, 4}."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The flag that indicates whether the metric alert is enabled."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of resource id's that this metric alert is scoped to."""
    evaluation_frequency: Optional[datetime.timedelta] = rest_field(
        name="evaluationFrequency", visibility=["read", "create", "update", "delete", "query"]
    )
    """How often the metric alert is evaluated represented in ISO 8601 duration format."""
    window_size: Optional[datetime.timedelta] = rest_field(
        name="windowSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """The period of time (in ISO 8601 duration format) that is used to monitor alert activity based
     on the threshold."""
    target_resource_type: Optional[str] = rest_field(
        name="targetResourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource type of the target resource(s) on which the alert is created/updated. Mandatory
     for MultipleResourceMultipleMetricCriteria."""
    target_resource_region: Optional[str] = rest_field(
        name="targetResourceRegion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The region of the target resource(s) on which the alert is created/updated. Mandatory for
     MultipleResourceMultipleMetricCriteria."""
    criteria: Optional["_models.MetricAlertCriteria"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the specific alert criteria information."""
    auto_mitigate: Optional[bool] = rest_field(
        name="autoMitigate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that indicates whether the alert should be auto resolved or not. The default is true."""
    resolve_configuration: Optional["_models.ResolveConfiguration"] = rest_field(
        name="resolveConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """The configuration for how the alert is resolved. Applicable for PromQLCriteria."""
    actions: Optional[list["_models.MetricAlertAction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The array of actions that are performed when the alert rule becomes active, and when an alert
     condition is resolved."""
    last_updated_time: Optional[datetime.datetime] = rest_field(
        name="lastUpdatedTime", visibility=["read"], format="rfc3339"
    )
    """Last time the rule was updated in ISO8601 format."""
    is_migrated: Optional[bool] = rest_field(name="isMigrated", visibility=["read"])
    """The value indicating whether this alert rule is migrated."""
    custom_properties: Optional[dict[str, str]] = rest_field(
        name="customProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an alert payload."""
    action_properties: Optional[dict[str, str]] = rest_field(
        name="actionProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of an action properties."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        severity: Optional[int] = None,
        enabled: Optional[bool] = None,
        scopes: Optional[list[str]] = None,
        evaluation_frequency: Optional[datetime.timedelta] = None,
        window_size: Optional[datetime.timedelta] = None,
        target_resource_type: Optional[str] = None,
        target_resource_region: Optional[str] = None,
        criteria: Optional["_models.MetricAlertCriteria"] = None,
        auto_mitigate: Optional[bool] = None,
        resolve_configuration: Optional["_models.ResolveConfiguration"] = None,
        actions: Optional[list["_models.MetricAlertAction"]] = None,
        custom_properties: Optional[dict[str, str]] = None,
        action_properties: Optional[dict[str, str]] = None,
    ) -> None: ...

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

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


class MetricAlertResource(TrackedResource):
    """The metric alert 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.monitor.models.SystemData
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar properties: The alert rule properties of the resource. Required.
    :vartype properties: ~azure.mgmt.monitor.models.MetricAlertProperties
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.Identity
    """

    properties: "_models.MetricAlertProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alert rule properties of the resource. Required."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""

    __flattened_items = [
        "description",
        "severity",
        "enabled",
        "scopes",
        "evaluation_frequency",
        "window_size",
        "target_resource_type",
        "target_resource_region",
        "criteria",
        "auto_mitigate",
        "resolve_configuration",
        "actions",
        "last_updated_time",
        "is_migrated",
        "custom_properties",
        "action_properties",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.MetricAlertProperties",
        tags: Optional[dict[str, 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:
        _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 MetricAlertResourcePatch(_Model):
    """The metric alert resource for patch operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.Identity
    :ivar properties: The alert rule properties of the resource.
    :vartype properties: ~azure.mgmt.monitor.models.MetricAlertPropertiesPatch
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    properties: Optional["_models.MetricAlertPropertiesPatch"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The alert rule properties of the resource."""

    __flattened_items = [
        "description",
        "severity",
        "enabled",
        "scopes",
        "evaluation_frequency",
        "window_size",
        "target_resource_type",
        "target_resource_region",
        "criteria",
        "auto_mitigate",
        "resolve_configuration",
        "actions",
        "last_updated_time",
        "is_migrated",
        "custom_properties",
        "action_properties",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 MetricAlertSingleResourceMultipleMetricCriteria(
    MetricAlertCriteria, discriminator="Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
):  # pylint: disable=name-too-long
    """Specifies the metric alert criteria for a single resource that has multiple metric criteria.

    :ivar all_of: The list of metric criteria for this 'all of' operation.
    :vartype all_of: list[~azure.mgmt.monitor.models.MetricCriteria]
    :ivar odata_type: Specifies the type of the alert criteria. Previously undocumented values
     might be returned. Required. Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria.
    :vartype odata_type: str or
     ~azure.mgmt.monitor.models.MICROSOFT_AZURE_MONITOR_SINGLE_RESOURCE_MULTIPLE_METRIC_CRITERIA
    """

    all_of: Optional[list["_models.MetricCriteria"]] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of metric criteria for this 'all of' operation."""
    odata_type: Literal[Odatatype.MICROSOFT_AZURE_MONITOR_SINGLE_RESOURCE_MULTIPLE_METRIC_CRITERIA] = rest_discriminator(name="odata.type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of the alert criteria. Previously undocumented values might be returned.
     Required. Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria."""

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

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


class MetricAlertStatus(_Model):
    """An alert status.

    :ivar name: The status name.
    :vartype name: str
    :ivar id: The alert rule arm id.
    :vartype id: str
    :ivar type: The extended resource type name.
    :vartype type: str
    :ivar properties: The alert status properties of the metric alert status.
    :vartype properties: ~azure.mgmt.monitor.models.MetricAlertStatusProperties
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status name."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alert rule arm id."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The extended resource type name."""
    properties: Optional["_models.MetricAlertStatusProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The alert status properties of the metric alert status."""

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

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

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


class MetricAlertStatusCollection(_Model):
    """Represents a collection of alert rule resources.

    :ivar value: The values for the alert rule resources.
    :vartype value: list[~azure.mgmt.monitor.models.MetricAlertStatus]
    """

    value: Optional[list["_models.MetricAlertStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The values for the alert rule resources."""

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

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

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


class MetricAlertStatusProperties(_Model):
    """An alert status properties.

    :ivar dimensions: An object describing the type of the dimensions.
    :vartype dimensions: dict[str, str]
    :ivar status: Status value.
    :vartype status: str
    :ivar timestamp: UTC time when the status was checked.
    :vartype timestamp: ~datetime.datetime
    """

    dimensions: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An object describing the type of the dimensions."""
    status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Status value."""
    timestamp: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """UTC time when the status was checked."""

    @overload
    def __init__(
        self,
        *,
        dimensions: Optional[dict[str, str]] = None,
        status: Optional[str] = None,
        timestamp: 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 MetricAvailability(_Model):
    """Metric availability specifies the time grain (aggregation interval or frequency) and the
    retention period for that time grain.

    :ivar time_grain: The time grain specifies a supported aggregation interval for the metric.
     Expressed as a duration 'PT1M', 'P1D', etc.
    :vartype time_grain: ~datetime.timedelta
    :ivar retention: The retention period for the metric at the specified timegrain.  Expressed as
     a duration 'PT1M', 'P1D', etc.
    :vartype retention: ~datetime.timedelta
    """

    time_grain: Optional[datetime.timedelta] = rest_field(
        name="timeGrain", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time grain specifies a supported aggregation interval for the metric. Expressed as a
     duration 'PT1M', 'P1D', etc."""
    retention: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The retention period for the metric at the specified timegrain.  Expressed as a duration
     'PT1M', 'P1D', etc."""

    @overload
    def __init__(
        self,
        *,
        time_grain: Optional[datetime.timedelta] = None,
        retention: Optional[datetime.timedelta] = None,
    ) -> None: ...

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

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


class MetricBaselinesErrorResponse(_Model):
    """Describes the format of Error response.

    :ivar error:
    :vartype error: ~azure.mgmt.monitor.models.ErrorResponseError
    """

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

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

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

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


class MetricBaselinesProperties(_Model):
    """The response to a metric baselines query.

    :ivar timespan: The timespan for which the data was retrieved. Its value consists of two
     datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back
     from what was originally requested. Required.
    :vartype timespan: str
    :ivar interval: The interval (window size) for which the metric data was returned in.  This may
     be adjusted in the future and returned back from what was originally requested.  This is not
     present if a metadata request was made. Required.
    :vartype interval: ~datetime.timedelta
    :ivar namespace: The namespace of the metrics been queried.
    :vartype namespace: str
    :ivar baselines: The baseline for each time series that was queried. Required.
    :vartype baselines: list[~azure.mgmt.monitor.models.TimeSeriesBaseline]
    """

    timespan: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The timespan for which the data was retrieved. Its value consists of two datetimes
     concatenated, separated by '/'.  This may be adjusted in the future and returned back from what
     was originally requested. Required."""
    interval: datetime.timedelta = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The interval (window size) for which the metric data was returned in.  This may be adjusted in
     the future and returned back from what was originally requested.  This is not present if a
     metadata request was made. Required."""
    namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace of the metrics been queried."""
    baselines: list["_models.TimeSeriesBaseline"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The baseline for each time series that was queried. Required."""

    @overload
    def __init__(
        self,
        *,
        timespan: str,
        interval: datetime.timedelta,
        baselines: list["_models.TimeSeriesBaseline"],
        namespace: 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 MetricCriteria(MultiMetricCriteria, discriminator="StaticThresholdCriterion"):
    """Criterion to filter metrics.

    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar metric_name: Name of the metric. Required.
    :vartype metric_name: str
    :ivar metric_namespace: Namespace of the metric.
    :vartype metric_namespace: str
    :ivar time_aggregation: The criteria time aggregation types. Previously undocumented values
     might be returned. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and
     "Total".
    :vartype time_aggregation: str or ~azure.mgmt.monitor.models.AggregationTypeEnum
    :ivar dimensions: List of dimension conditions.
    :vartype dimensions: list[~azure.mgmt.monitor.models.MetricDimension]
    :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet
     emitted, by causing the metric validation to be skipped.
    :vartype skip_metric_validation: bool
    :ivar operator: The criteria operator. Previously undocumented values might be returned.
     Required. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and
     "LessThanOrEqual".
    :vartype operator: str or ~azure.mgmt.monitor.models.Operator
    :ivar threshold: The criteria threshold value that activates the alert. Required.
    :vartype threshold: float
    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. StaticThresholdCriterion.
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.STATIC_THRESHOLD_CRITERION
    """

    operator: Union[str, "_models.Operator"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The criteria operator. Previously undocumented values might be returned. Required. Known values
     are: \"Equals\", \"GreaterThan\", \"GreaterThanOrEqual\", \"LessThan\", and
     \"LessThanOrEqual\"."""
    threshold: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The criteria threshold value that activates the alert. Required."""
    criterion_type: Literal[CriterionType.STATIC_THRESHOLD_CRITERION] = rest_discriminator(name="criterionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. StaticThresholdCriterion."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        metric_name: str,
        time_aggregation: Union[str, "_models.AggregationTypeEnum"],
        operator: Union[str, "_models.Operator"],
        threshold: float,
        metric_namespace: Optional[str] = None,
        dimensions: Optional[list["_models.MetricDimension"]] = None,
        skip_metric_validation: 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.criterion_type = CriterionType.STATIC_THRESHOLD_CRITERION  # type: ignore


class MetricDefinition(_Model):
    """Metric definition class specifies the metadata for a metric.

    :ivar is_dimension_required: Flag to indicate whether the dimension is required.
    :vartype is_dimension_required: bool
    :ivar resource_id: The resource identifier of the resource that emitted the metric.
    :vartype resource_id: str
    :ivar namespace: The namespace the metric belongs to.
    :vartype namespace: str
    :ivar name: The name and the display name of the metric, i.e. it is a localizable string.
    :vartype name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar display_description: Detailed description of this metric.
    :vartype display_description: str
    :ivar category: Custom category name for this metric.
    :vartype category: str
    :ivar metric_class: The class of the metric. Known values are: "Availability", "Transactions",
     "Errors", "Latency", and "Saturation".
    :vartype metric_class: str or ~azure.mgmt.monitor.models.MetricClass
    :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds",
     "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified",
     "Cores", "MilliCores", "NanoCores", and "BitsPerSecond".
    :vartype unit: str or ~azure.mgmt.monitor.models.MetricUnit
    :ivar primary_aggregation_type: The primary aggregation type value defining how to use the
     values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and
     "Total".
    :vartype primary_aggregation_type: str or ~azure.mgmt.monitor.models.AggregationType
    :ivar supported_aggregation_types: The collection of what aggregation types are supported.
    :vartype supported_aggregation_types: list[str or ~azure.mgmt.monitor.models.AggregationType]
    :ivar metric_availabilities: The collection of what aggregation intervals are available to be
     queried.
    :vartype metric_availabilities: list[~azure.mgmt.monitor.models.MetricAvailability]
    :ivar id: The resource identifier of the metric definition.
    :vartype id: str
    :ivar dimensions: The name and the display name of the dimension, i.e. it is a localizable
     string.
    :vartype dimensions: list[~azure.mgmt.monitor.models.LocalizableString]
    """

    is_dimension_required: Optional[bool] = rest_field(
        name="isDimensionRequired", visibility=["read", "create", "update", "delete", "query"]
    )
    """Flag to indicate whether the dimension is required."""
    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource identifier of the resource that emitted the metric."""
    namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace the metric belongs to."""
    name: Optional["_models.LocalizableString"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name and the display name of the metric, i.e. it is a localizable string."""
    display_description: Optional[str] = rest_field(
        name="displayDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """Detailed description of this metric."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom category name for this metric."""
    metric_class: Optional[Union[str, "_models.MetricClass"]] = rest_field(
        name="metricClass", visibility=["read", "create", "update", "delete", "query"]
    )
    """The class of the metric. Known values are: \"Availability\", \"Transactions\", \"Errors\",
     \"Latency\", and \"Saturation\"."""
    unit: Optional[Union[str, "_models.MetricUnit"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The unit of the metric. Known values are: \"Count\", \"Bytes\", \"Seconds\",
     \"CountPerSecond\", \"BytesPerSecond\", \"Percent\", \"MilliSeconds\", \"ByteSeconds\",
     \"Unspecified\", \"Cores\", \"MilliCores\", \"NanoCores\", and \"BitsPerSecond\"."""
    primary_aggregation_type: Optional[Union[str, "_models.AggregationType"]] = rest_field(
        name="primaryAggregationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The primary aggregation type value defining how to use the values for display. Known values
     are: \"None\", \"Average\", \"Count\", \"Minimum\", \"Maximum\", and \"Total\"."""
    supported_aggregation_types: Optional[list[Union[str, "_models.AggregationType"]]] = rest_field(
        name="supportedAggregationTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The collection of what aggregation types are supported."""
    metric_availabilities: Optional[list["_models.MetricAvailability"]] = rest_field(
        name="metricAvailabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The collection of what aggregation intervals are available to be queried."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource identifier of the metric definition."""
    dimensions: Optional[list["_models.LocalizableString"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The name and the display name of the dimension, i.e. it is a localizable string."""

    @overload
    def __init__(
        self,
        *,
        is_dimension_required: Optional[bool] = None,
        resource_id: Optional[str] = None,
        namespace: Optional[str] = None,
        name: Optional["_models.LocalizableString"] = None,
        display_description: Optional[str] = None,
        category: Optional[str] = None,
        metric_class: Optional[Union[str, "_models.MetricClass"]] = None,
        unit: Optional[Union[str, "_models.MetricUnit"]] = None,
        primary_aggregation_type: Optional[Union[str, "_models.AggregationType"]] = None,
        supported_aggregation_types: Optional[list[Union[str, "_models.AggregationType"]]] = None,
        metric_availabilities: Optional[list["_models.MetricAvailability"]] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        dimensions: Optional[list["_models.LocalizableString"]] = None,
    ) -> None: ...

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

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


class MetricDimension(_Model):
    """Specifies a metric dimension.

    :ivar name: Name of the dimension. Required.
    :vartype name: str
    :ivar operator: The dimension operator. Only 'Include' and 'Exclude' are supported. Required.
    :vartype operator: str
    :ivar values_property: List of dimension values. Required.
    :vartype values_property: list[str]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the dimension. Required."""
    operator: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The dimension operator. Only 'Include' and 'Exclude' are supported. Required."""
    values_property: list[str] = rest_field(
        name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values"
    )
    """List of dimension values. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        operator: str,
        values_property: list[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 MetricNamespace(_Model):
    """Metric namespace class specifies the metadata for a metric namespace.

    :ivar id: The ID of the metric namespace.
    :vartype id: str
    :ivar type: The type of the namespace.
    :vartype type: str
    :ivar name: The escaped name of the namespace.
    :vartype name: str
    :ivar classification: Kind of namespace. Known values are: "Platform", "Custom", and "Qos".
    :vartype classification: str or ~azure.mgmt.monitor.models.NamespaceClassification
    :ivar properties: Properties which include the fully qualified namespace name.
    :vartype properties: ~azure.mgmt.monitor.models.MetricNamespaceName
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the metric namespace."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the namespace."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The escaped name of the namespace."""
    classification: Optional[Union[str, "_models.NamespaceClassification"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Kind of namespace. Known values are: \"Platform\", \"Custom\", and \"Qos\"."""
    properties: Optional["_models.MetricNamespaceName"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties which include the fully qualified namespace name."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        type: Optional[str] = None,
        name: Optional[str] = None,
        classification: Optional[Union[str, "_models.NamespaceClassification"]] = None,
        properties: Optional["_models.MetricNamespaceName"] = None,
    ) -> None: ...

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

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


class MetricNamespaceName(_Model):
    """The fully qualified metric namespace name.

    :ivar metric_namespace_name: The metric namespace name.
    :vartype metric_namespace_name: str
    """

    metric_namespace_name: Optional[str] = rest_field(
        name="metricNamespaceName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The metric namespace name."""

    @overload
    def __init__(
        self,
        *,
        metric_namespace_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 MetricSettings(_Model):
    """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.

    :ivar time_grain: the timegrain of the metric in ISO8601 format.
    :vartype time_grain: ~datetime.timedelta
    :ivar category: Name of a Diagnostic Metric category for a resource type this setting is
     applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a
     GET diagnostic settings operation.
    :vartype category: str
    :ivar enabled: a value indicating whether this category is enabled. Required.
    :vartype enabled: bool
    :ivar retention_policy: the retention policy for this category.
    :vartype retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy
    """

    time_grain: Optional[datetime.timedelta] = rest_field(
        name="timeGrain", visibility=["read", "create", "update", "delete", "query"]
    )
    """the timegrain of the metric in ISO8601 format."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain
     the list of Diagnostic metric categories for a resource, first perform a GET diagnostic
     settings operation."""
    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """a value indicating whether this category is enabled. Required."""
    retention_policy: Optional["_models.RetentionPolicy"] = rest_field(
        name="retentionPolicy", visibility=["read", "create", "update", "delete", "query"]
    )
    """the retention policy for this category."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        time_grain: Optional[datetime.timedelta] = None,
        category: Optional[str] = None,
        retention_policy: Optional["_models.RetentionPolicy"] = None,
    ) -> None: ...

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

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


class MetricSingleDimension(_Model):
    """The metric dimension name and value.

    :ivar name: Name of the dimension. Required.
    :vartype name: str
    :ivar value: Value of the dimension. Required.
    :vartype value: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the dimension. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Value of the dimension. Required."""

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

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

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


class MetricTrigger(_Model):
    """The trigger that results in a scaling action.

    :ivar metric_name: the name of the metric that defines what the rule monitors. Required.
    :vartype metric_name: str
    :ivar metric_namespace: the namespace of the metric that defines what the rule monitors.
    :vartype metric_namespace: str
    :ivar metric_resource_uri: the resource identifier of the resource the rule monitors. Required.
    :vartype metric_resource_uri: str
    :ivar metric_resource_location: the location of the resource the rule monitors.
    :vartype metric_resource_location: str
    :ivar time_grain: the granularity of metrics the rule monitors. Must be one of the predefined
     values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.
     Required.
    :vartype time_grain: ~datetime.timedelta
    :ivar statistic: the metric statistic type. How the metrics from multiple instances are
     combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count".
    :vartype statistic: str or ~azure.mgmt.monitor.models.MetricStatisticType
    :ivar time_window: the range of time in which instance data is collected. This value must be
     greater than the delay in metric collection, which can vary from resource-to-resource. Must be
     between 12 hours and 5 minutes. Required.
    :vartype time_window: ~datetime.timedelta
    :ivar time_aggregation: time aggregation type. How the data that is collected should be
     combined over time. The default value is Average. Required. Known values are: "Average",
     "Minimum", "Maximum", "Total", "Count", and "Last".
    :vartype time_aggregation: str or ~azure.mgmt.monitor.models.TimeAggregationType
    :ivar operator: the operator that is used to compare the metric data and the threshold.
     Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual",
     "LessThan", and "LessThanOrEqual".
    :vartype operator: str or ~azure.mgmt.monitor.models.ComparisonOperationType
    :ivar threshold: the threshold of the metric that triggers the scale action. Required.
    :vartype threshold: float
    :ivar dimensions: List of dimension conditions. For example:
     [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
    :vartype dimensions: list[~azure.mgmt.monitor.models.ScaleRuleMetricDimension]
    :ivar divide_per_instance: a value indicating whether metric should divide per instance.
    :vartype divide_per_instance: bool
    """

    metric_name: str = rest_field(name="metricName", visibility=["read", "create", "update", "delete", "query"])
    """the name of the metric that defines what the rule monitors. Required."""
    metric_namespace: Optional[str] = rest_field(
        name="metricNamespace", visibility=["read", "create", "update", "delete", "query"]
    )
    """the namespace of the metric that defines what the rule monitors."""
    metric_resource_uri: str = rest_field(
        name="metricResourceUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """the resource identifier of the resource the rule monitors. Required."""
    metric_resource_location: Optional[str] = rest_field(
        name="metricResourceLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """the location of the resource the rule monitors."""
    time_grain: datetime.timedelta = rest_field(
        name="timeGrain", visibility=["read", "create", "update", "delete", "query"]
    )
    """the granularity of metrics the rule monitors. Must be one of the predefined values returned
     from metric definitions for the metric. Must be between 12 hours and 1 minute. Required."""
    statistic: Union[str, "_models.MetricStatisticType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the metric statistic type. How the metrics from multiple instances are combined. Required.
     Known values are: \"Average\", \"Min\", \"Max\", \"Sum\", and \"Count\"."""
    time_window: datetime.timedelta = rest_field(
        name="timeWindow", visibility=["read", "create", "update", "delete", "query"]
    )
    """the range of time in which instance data is collected. This value must be greater than the
     delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours
     and 5 minutes. Required."""
    time_aggregation: Union[str, "_models.TimeAggregationType"] = rest_field(
        name="timeAggregation", visibility=["read", "create", "update", "delete", "query"]
    )
    """time aggregation type. How the data that is collected should be combined over time. The default
     value is Average. Required. Known values are: \"Average\", \"Minimum\", \"Maximum\", \"Total\",
     \"Count\", and \"Last\"."""
    operator: Union[str, "_models.ComparisonOperationType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the operator that is used to compare the metric data and the threshold. Required. Known values
     are: \"Equals\", \"NotEquals\", \"GreaterThan\", \"GreaterThanOrEqual\", \"LessThan\", and
     \"LessThanOrEqual\"."""
    threshold: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the threshold of the metric that triggers the scale action. Required."""
    dimensions: Optional[list["_models.ScaleRuleMetricDimension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of dimension conditions. For example:
     [{\"DimensionName\":\"AppName\",\"Operator\":\"Equals\",\"Values\":[\"App1\"]},{\"DimensionName\":\"Deployment\",\"Operator\":\"Equals\",\"Values\":[\"default\"]}]."""
    divide_per_instance: Optional[bool] = rest_field(
        name="dividePerInstance", visibility=["read", "create", "update", "delete", "query"]
    )
    """a value indicating whether metric should divide per instance."""

    @overload
    def __init__(
        self,
        *,
        metric_name: str,
        metric_resource_uri: str,
        time_grain: datetime.timedelta,
        statistic: Union[str, "_models.MetricStatisticType"],
        time_window: datetime.timedelta,
        time_aggregation: Union[str, "_models.TimeAggregationType"],
        operator: Union[str, "_models.ComparisonOperationType"],
        threshold: float,
        metric_namespace: Optional[str] = None,
        metric_resource_location: Optional[str] = None,
        dimensions: Optional[list["_models.ScaleRuleMetricDimension"]] = None,
        divide_per_instance: 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 MetricValue(_Model):
    """Represents a metric value.

    :ivar time_stamp: The timestamp for the metric value in ISO 8601 format. Required.
    :vartype time_stamp: ~datetime.datetime
    :ivar average: The average value in the time range.
    :vartype average: float
    :ivar minimum: The least value in the time range.
    :vartype minimum: float
    :ivar maximum: The greatest value in the time range.
    :vartype maximum: float
    :ivar total: The sum of all of the values in the time range.
    :vartype total: float
    :ivar count: The number of samples in the time range. Can be used to determine the number of
     values that contributed to the average value.
    :vartype count: float
    """

    time_stamp: datetime.datetime = rest_field(
        name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The timestamp for the metric value in ISO 8601 format. Required."""
    average: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The average value in the time range."""
    minimum: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The least value in the time range."""
    maximum: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The greatest value in the time range."""
    total: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The sum of all of the values in the time range."""
    count: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The number of samples in the time range. Can be used to determine the number of values that
     contributed to the average value."""

    @overload
    def __init__(
        self,
        *,
        time_stamp: datetime.datetime,
        average: Optional[float] = None,
        minimum: Optional[float] = None,
        maximum: Optional[float] = None,
        total: Optional[float] = None,
        count: Optional[float] = None,
    ) -> None: ...

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

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


class MicrosoftFabricDestination(_Model):
    """Microsoft Fabric destination (non-Azure).

    :ivar tenant_id: The tenant id of the Microsoft Fabric resource.
    :vartype tenant_id: str
    :ivar artifact_id: The artifact id of the Microsoft Fabric resource.
    :vartype artifact_id: str
    :ivar database_name: The name of the database to which data will be ingested.
    :vartype database_name: str
    :ivar ingestion_uri: The ingestion uri of the Microsoft Fabric resource.
    :vartype ingestion_uri: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """The tenant id of the Microsoft Fabric resource."""
    artifact_id: Optional[str] = rest_field(
        name="artifactId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The artifact id of the Microsoft Fabric resource."""
    database_name: Optional[str] = rest_field(
        name="databaseName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the database to which data will be ingested."""
    ingestion_uri: Optional[str] = rest_field(
        name="ingestionUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ingestion uri of the Microsoft Fabric resource."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class MonitoringAccountDestination(_Model):
    """Monitoring account destination.

    :ivar account_resource_id: The resource ID of the monitoring account.
    :vartype account_resource_id: str
    :ivar account_id: The immutable ID of the account.
    :vartype account_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    account_resource_id: Optional[str] = rest_field(
        name="accountResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the monitoring account."""
    account_id: Optional[str] = rest_field(name="accountId", visibility=["read"])
    """The immutable ID of the account."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class NetworkSecurityPerimeter(_Model):
    """Information about a network security perimeter (NSP).

    :ivar id: Fully qualified Azure resource ID of the NSP resource.
    :vartype id: str
    :ivar perimeter_guid: Universal unique ID (UUID) of the network security perimeter.
    :vartype perimeter_guid: str
    :ivar location: Location of the network security perimeter.
    :vartype location: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Fully qualified Azure resource ID of the NSP resource."""
    perimeter_guid: Optional[str] = rest_field(
        name="perimeterGuid", visibility=["read", "create", "update", "delete", "query"]
    )
    """Universal unique ID (UUID) of the network security perimeter."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """Location of the network security perimeter."""

    @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 NetworkSecurityPerimeterConfiguration(ProxyResource):
    """Network security perimeter (NSP) configuration resource.

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

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

    @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 NetworkSecurityPerimeterConfigurationProperties(_Model):  # pylint: disable=name-too-long
    """Network security configuration properties.

    :ivar provisioning_state: Known values are: "Succeeded", "Creating", "Updating", "Deleting",
     "Accepted", "Failed", and "Canceled".
    :vartype provisioning_state: str or
     ~azure.mgmt.monitor.models.NetworkSecurityPerimeterConfigurationProvisioningState
    :ivar provisioning_issues: List of provisioning issues, if any.
    :vartype provisioning_issues: list[~azure.mgmt.monitor.models.ProvisioningIssue]
    :ivar network_security_perimeter:
    :vartype network_security_perimeter: ~azure.mgmt.monitor.models.NetworkSecurityPerimeter
    :ivar resource_association:
    :vartype resource_association: ~azure.mgmt.monitor.models.ResourceAssociation
    :ivar profile:
    :vartype profile: ~azure.mgmt.monitor.models.NetworkSecurityProfile
    """

    provisioning_state: Optional[Union[str, "_models.NetworkSecurityPerimeterConfigurationProvisioningState"]] = (
        rest_field(name="provisioningState", visibility=["read"])
    )
    """Known values are: \"Succeeded\", \"Creating\", \"Updating\", \"Deleting\", \"Accepted\",
     \"Failed\", and \"Canceled\"."""
    provisioning_issues: Optional[list["_models.ProvisioningIssue"]] = rest_field(
        name="provisioningIssues", visibility=["read"]
    )
    """List of provisioning issues, if any."""
    network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = rest_field(
        name="networkSecurityPerimeter", visibility=["read", "create", "update", "delete", "query"]
    )
    resource_association: Optional["_models.ResourceAssociation"] = rest_field(
        name="resourceAssociation", visibility=["read", "create", "update", "delete", "query"]
    )
    profile: Optional["_models.NetworkSecurityProfile"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = None,
        resource_association: Optional["_models.ResourceAssociation"] = None,
        profile: Optional["_models.NetworkSecurityProfile"] = None,
    ) -> None: ...

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

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


class NetworkSecurityProfile(_Model):
    """Network security perimeter configuration profile.

    :ivar name: Name of the profile.
    :vartype name: str
    :ivar access_rules_version: Current access rules version.
    :vartype access_rules_version: int
    :ivar access_rules: List of Access Rules.
    :vartype access_rules: list[~azure.mgmt.monitor.models.AccessRule]
    :ivar diagnostic_settings_version: Current diagnostic settings version.
    :vartype diagnostic_settings_version: int
    :ivar enabled_log_categories: List of log categories that are enabled.
    :vartype enabled_log_categories: list[str]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the profile."""
    access_rules_version: Optional[int] = rest_field(
        name="accessRulesVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """Current access rules version."""
    access_rules: Optional[list["_models.AccessRule"]] = rest_field(
        name="accessRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Access Rules."""
    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 log categories that are enabled."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        access_rules_version: Optional[int] = None,
        access_rules: Optional[list["_models.AccessRule"]] = 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 NotificationRequestBody(_Model):
    """The request body which contain contact detail metadata.

    :ivar alert_type: The value of the supported alert type. Supported alert type values are:
     servicehealth, metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert,
     webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog,
     actualcostbudget, forecastedbudget. Required.
    :vartype alert_type: str
    :ivar email_receivers: The list of email receivers that are part of this action group.
    :vartype email_receivers: list[~azure.mgmt.monitor.models.EmailReceiver]
    :ivar sms_receivers: The list of SMS receivers that are part of this action group.
    :vartype sms_receivers: list[~azure.mgmt.monitor.models.SmsReceiver]
    :ivar webhook_receivers: The list of webhook receivers that are part of this action group.
    :vartype webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver]
    :ivar itsm_receivers: The list of ITSM receivers that are part of this action group.
    :vartype itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver]
    :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action
     group.
    :vartype azure_app_push_receivers: list[~azure.mgmt.monitor.models.AzureAppPushReceiver]
    :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of
     this action group.
    :vartype automation_runbook_receivers:
     list[~azure.mgmt.monitor.models.AutomationRunbookReceiver]
    :ivar voice_receivers: The list of voice receivers that are part of this action group.
    :vartype voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver]
    :ivar logic_app_receivers: The list of logic app receivers that are part of this action group.
    :vartype logic_app_receivers: list[~azure.mgmt.monitor.models.LogicAppReceiver]
    :ivar azure_function_receivers: The list of azure function receivers that are part of this
     action group.
    :vartype azure_function_receivers: list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
    :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group.
     Roles are Azure RBAC roles and only built-in roles are supported.
    :vartype arm_role_receivers: list[~azure.mgmt.monitor.models.ArmRoleReceiver]
    :ivar event_hub_receivers: The list of event hub receivers that are part of this action group.
    :vartype event_hub_receivers: list[~azure.mgmt.monitor.models.EventHubReceiver]
    :ivar incident_receivers: The list of incident receivers that are part of this action group.
    :vartype incident_receivers: list[~azure.mgmt.monitor.models.IncidentReceiver]
    """

    alert_type: str = rest_field(name="alertType", visibility=["read", "create", "update", "delete", "query"])
    """The value of the supported alert type. Supported alert type values are: servicehealth,
     metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert, webtestalert,
     logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog,
     actualcostbudget, forecastedbudget. Required."""
    email_receivers: Optional[list["_models.EmailReceiver"]] = rest_field(
        name="emailReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of email receivers that are part of this action group."""
    sms_receivers: Optional[list["_models.SmsReceiver"]] = rest_field(
        name="smsReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of SMS receivers that are part of this action group."""
    webhook_receivers: Optional[list["_models.WebhookReceiver"]] = rest_field(
        name="webhookReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of webhook receivers that are part of this action group."""
    itsm_receivers: Optional[list["_models.ItsmReceiver"]] = rest_field(
        name="itsmReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of ITSM receivers that are part of this action group."""
    azure_app_push_receivers: Optional[list["_models.AzureAppPushReceiver"]] = rest_field(
        name="azureAppPushReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of AzureAppPush receivers that are part of this action group."""
    automation_runbook_receivers: Optional[list["_models.AutomationRunbookReceiver"]] = rest_field(
        name="automationRunbookReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of AutomationRunbook receivers that are part of this action group."""
    voice_receivers: Optional[list["_models.VoiceReceiver"]] = rest_field(
        name="voiceReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of voice receivers that are part of this action group."""
    logic_app_receivers: Optional[list["_models.LogicAppReceiver"]] = rest_field(
        name="logicAppReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of logic app receivers that are part of this action group."""
    azure_function_receivers: Optional[list["_models.AzureFunctionReceiver"]] = rest_field(
        name="azureFunctionReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of azure function receivers that are part of this action group."""
    arm_role_receivers: Optional[list["_models.ArmRoleReceiver"]] = rest_field(
        name="armRoleReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles
     and only built-in roles are supported."""
    event_hub_receivers: Optional[list["_models.EventHubReceiver"]] = rest_field(
        name="eventHubReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of event hub receivers that are part of this action group."""
    incident_receivers: Optional[list["_models.IncidentReceiver"]] = rest_field(
        name="incidentReceivers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of incident receivers that are part of this action group."""

    @overload
    def __init__(
        self,
        *,
        alert_type: str,
        email_receivers: Optional[list["_models.EmailReceiver"]] = None,
        sms_receivers: Optional[list["_models.SmsReceiver"]] = None,
        webhook_receivers: Optional[list["_models.WebhookReceiver"]] = None,
        itsm_receivers: Optional[list["_models.ItsmReceiver"]] = None,
        azure_app_push_receivers: Optional[list["_models.AzureAppPushReceiver"]] = None,
        automation_runbook_receivers: Optional[list["_models.AutomationRunbookReceiver"]] = None,
        voice_receivers: Optional[list["_models.VoiceReceiver"]] = None,
        logic_app_receivers: Optional[list["_models.LogicAppReceiver"]] = None,
        azure_function_receivers: Optional[list["_models.AzureFunctionReceiver"]] = None,
        arm_role_receivers: Optional[list["_models.ArmRoleReceiver"]] = None,
        event_hub_receivers: Optional[list["_models.EventHubReceiver"]] = None,
        incident_receivers: Optional[list["_models.IncidentReceiver"]] = None,
    ) -> None: ...

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

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


class OperationStatus(_Model):
    """The status of operation.

    :ivar id: The operation Id.
    :vartype id: str
    :ivar name: The operation name.
    :vartype name: str
    :ivar start_time: Start time of the job in standard ISO8601 format.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: End time of the job in standard ISO8601 format.
    :vartype end_time: ~datetime.datetime
    :ivar status: The status of the operation.
    :vartype status: str
    :ivar error: The error detail of the operation if any.
    :vartype error: ~azure.mgmt.monitor.models.ErrorDetailAutoGenerated
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The operation Id."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The operation name."""
    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Start time of the job in standard ISO8601 format."""
    end_time: Optional[datetime.datetime] = rest_field(
        name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """End time of the job in standard ISO8601 format."""
    status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status of the operation."""
    error: Optional["_models.ErrorDetailAutoGenerated"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The error detail of the operation if any."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        name: Optional[str] = None,
        start_time: Optional[datetime.datetime] = None,
        end_time: Optional[datetime.datetime] = None,
        status: Optional[str] = None,
        error: Optional["_models.ErrorDetailAutoGenerated"] = None,
    ) -> None: ...

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

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


class OtelDataSourceResourceAttributeRouting(_Model):
    """Enables OTLP (logs, traces, and metrics) payload routing.

    :ivar attribute_name: The name of the resource attribute to match.
    :vartype attribute_name: str
    :ivar attribute_value: The value of the resource attribute to match.
    :vartype attribute_value: str
    """

    attribute_name: Optional[str] = rest_field(
        name="attributeName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the resource attribute to match."""
    attribute_value: Optional[str] = rest_field(
        name="attributeValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The value of the resource attribute to match."""

    @overload
    def __init__(
        self,
        *,
        attribute_name: Optional[str] = None,
        attribute_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 OtelLogsDataSource(_Model):
    """Enables Otel logs to be collected by this data collection rule.

    :ivar streams: List of streams that this data source will be sent to. Required.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownOtelLogsDataSourceStreams]
    :ivar resource_attribute_routing: Specifies the routing policy based on OTLP payload resource
     attributes to route subset of the payload according to matching resource attribute.
    :vartype resource_attribute_routing:
     ~azure.mgmt.monitor.models.OtelLogsDataSourceResourceAttributeRouting
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference alias to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar replace_resource_id_with_reference: Specifies whether to replace the default resourceId
     in the log record with the resourceId of the referenced resource being used for enrichment.
    :vartype replace_resource_id_with_reference: bool
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[Union[str, "_models.KnownOtelLogsDataSourceStreams"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. Required."""
    resource_attribute_routing: Optional["_models.OtelLogsDataSourceResourceAttributeRouting"] = rest_field(
        name="resourceAttributeRouting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
     payload according to matching resource attribute."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference alias to enrich the telemetry signal with."""
    replace_resource_id_with_reference: Optional[bool] = rest_field(
        name="replaceResourceIdWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether to replace the default resourceId in the log record with the resourceId of
     the referenced resource being used for enrichment."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[Union[str, "_models.KnownOtelLogsDataSourceStreams"]],
        resource_attribute_routing: Optional["_models.OtelLogsDataSourceResourceAttributeRouting"] = None,
        enrich_with_resource_attributes: Optional[list[str]] = None,
        enrich_with_reference: Optional[str] = None,
        replace_resource_id_with_reference: Optional[bool] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class OtelLogsDataSourceResourceAttributeRouting(
    OtelDataSourceResourceAttributeRouting
):  # pylint: disable=name-too-long
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
    payload according to matching resource attribute.

    :ivar attribute_name: The name of the resource attribute to match.
    :vartype attribute_name: str
    :ivar attribute_value: The value of the resource attribute to match.
    :vartype attribute_value: str
    """

    @overload
    def __init__(
        self,
        *,
        attribute_name: Optional[str] = None,
        attribute_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 OtelLogsDirectDataSource(_Model):
    """OtelLogsDirectDataSource.

    :ivar streams: List of streams that this data source will be sent to. Required.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownOtelLogsDirectDataSourceStreams]
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar replace_resource_id_with_reference: Specifies whether to replace the default resourceId
     in the log record with the resourceId of the referenced resource being used for enrichment.
    :vartype replace_resource_id_with_reference: bool
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[Union[str, "_models.KnownOtelLogsDirectDataSourceStreams"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. Required."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference to enrich the telemetry signal with."""
    replace_resource_id_with_reference: Optional[bool] = rest_field(
        name="replaceResourceIdWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether to replace the default resourceId in the log record with the resourceId of
     the referenced resource being used for enrichment."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[Union[str, "_models.KnownOtelLogsDirectDataSourceStreams"]],
        enrich_with_resource_attributes: Optional[list[str]] = None,
        enrich_with_reference: Optional[str] = None,
        replace_resource_id_with_reference: Optional[bool] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class OtelMetricsDataSource(_Model):
    """Definition of OTel metrics configuration.

    :ivar streams: List of streams that this data source will be sent to. Required.
    :vartype streams: list[str]
    :ivar resource_attribute_routing: Specifies the routing policy based on OTLP payload resource
     attributes to route subset of the payload according to matching resource attribute.
    :vartype resource_attribute_routing:
     ~azure.mgmt.monitor.models.OtelMetricsDataSourceResourceAttributeRouting
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of streams that this data source will be sent to. Required."""
    resource_attribute_routing: Optional["_models.OtelMetricsDataSourceResourceAttributeRouting"] = rest_field(
        name="resourceAttributeRouting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
     payload according to matching resource attribute."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference to enrich the telemetry signal with."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[str],
        resource_attribute_routing: Optional["_models.OtelMetricsDataSourceResourceAttributeRouting"] = None,
        enrich_with_resource_attributes: Optional[list[str]] = None,
        enrich_with_reference: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class OtelMetricsDataSourceResourceAttributeRouting(
    OtelDataSourceResourceAttributeRouting
):  # pylint: disable=name-too-long
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
    payload according to matching resource attribute.

    :ivar attribute_name: The name of the resource attribute to match.
    :vartype attribute_name: str
    :ivar attribute_value: The value of the resource attribute to match.
    :vartype attribute_value: str
    """

    @overload
    def __init__(
        self,
        *,
        attribute_name: Optional[str] = None,
        attribute_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 OtelMetricsDirectDataSource(_Model):
    """Definition of OTel metrics configuration.

    :ivar streams: List of streams that this data source will be sent to. Required.
    :vartype streams: list[str]
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of streams that this data source will be sent to. Required."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference to enrich the telemetry signal with."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

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

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

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


class OtelTracesDataSource(_Model):
    """Enables Otel Traces to be collected by this data collection rule.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to. Required.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownOtelTracesDataSourceStreams]
    :ivar resource_attribute_routing: Specifies the routing policy based on OTLP payload resource
     attributes to route subset of the payload according to matching resource attribute.
    :vartype resource_attribute_routing:
     ~azure.mgmt.monitor.models.OtelTracesDataSourceResourceAttributeRouting
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar replace_resource_id_with_reference: Specifies whether to replace the default resourceId
     in the log record with the resourceId of the referenced resource being used for enrichment.
    :vartype replace_resource_id_with_reference: bool
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[Union[str, "_models.KnownOtelTracesDataSourceStreams"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to. Required."""
    resource_attribute_routing: Optional["_models.OtelTracesDataSourceResourceAttributeRouting"] = rest_field(
        name="resourceAttributeRouting", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
     payload according to matching resource attribute."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference to enrich the telemetry signal with."""
    replace_resource_id_with_reference: Optional[bool] = rest_field(
        name="replaceResourceIdWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether to replace the default resourceId in the log record with the resourceId of
     the referenced resource being used for enrichment."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[Union[str, "_models.KnownOtelTracesDataSourceStreams"]],
        resource_attribute_routing: Optional["_models.OtelTracesDataSourceResourceAttributeRouting"] = None,
        enrich_with_resource_attributes: Optional[list[str]] = None,
        enrich_with_reference: Optional[str] = None,
        replace_resource_id_with_reference: Optional[bool] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class OtelTracesDataSourceResourceAttributeRouting(
    OtelDataSourceResourceAttributeRouting
):  # pylint: disable=name-too-long
    """Specifies the routing policy based on OTLP payload resource attributes to route subset of the
    payload according to matching resource attribute.

    :ivar attribute_name: The name of the resource attribute to match.
    :vartype attribute_name: str
    :ivar attribute_value: The value of the resource attribute to match.
    :vartype attribute_value: str
    """

    @overload
    def __init__(
        self,
        *,
        attribute_name: Optional[str] = None,
        attribute_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 OtelTracesDirectDataSource(_Model):
    """Enables Otel Traces to be collected by this data collection rule.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to. Required.
    :vartype streams: list[str or
     ~azure.mgmt.monitor.models.KnownOtelTracesDirectDataSourceStreams]
    :ivar enrich_with_resource_attributes: Specifies the list of resource attributes that need to
     be added as labels/dimensions to the telemetry data for further enrichment.
    :vartype enrich_with_resource_attributes: list[str]
    :ivar enrich_with_reference: Specifies the reference to enrich the telemetry signal with.
    :vartype enrich_with_reference: str
    :ivar replace_resource_id_with_reference: Specifies whether to replace the default resourceId
     in the log record with the resourceId of the referenced resource being used for enrichment.
    :vartype replace_resource_id_with_reference: bool
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[Union[str, "_models.KnownOtelTracesDirectDataSourceStreams"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to. Required."""
    enrich_with_resource_attributes: Optional[list[str]] = rest_field(
        name="enrichWithResourceAttributes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the list of resource attributes that need to be added as labels/dimensions to the
     telemetry data for further enrichment."""
    enrich_with_reference: Optional[str] = rest_field(
        name="enrichWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the reference to enrich the telemetry signal with."""
    replace_resource_id_with_reference: Optional[bool] = rest_field(
        name="replaceResourceIdWithReference", visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies whether to replace the default resourceId in the log record with the resourceId of
     the referenced resource being used for enrichment."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[Union[str, "_models.KnownOtelTracesDirectDataSourceStreams"]],
        enrich_with_resource_attributes: Optional[list[str]] = None,
        enrich_with_reference: Optional[str] = None,
        replace_resource_id_with_reference: Optional[bool] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class PerfCounterDataSource(_Model):
    """Definition of which performance counters will be collected and how they will be collected by
    this data collection rule. Collected from both Windows and Linux machines where the counter is
    present.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownPerfCounterDataSourceStreams]
    :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter
     measurements (samples).
    :vartype sampling_frequency_in_seconds: int
    :ivar counter_specifiers: A list of specifier names of the performance counters you want to
     collect. Use a wildcard (*) to collect a counter for all instances. To get a list of
     performance counters on Windows, run the command 'typeperf'.
    :vartype counter_specifiers: list[str]
    :ivar transform_kql: The KQL query to transform the data source. This is a deprecated property
     and will be removed in future versions.
    :vartype transform_kql: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownPerfCounterDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to."""
    sampling_frequency_in_seconds: Optional[int] = rest_field(
        name="samplingFrequencyInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of seconds between consecutive counter measurements (samples)."""
    counter_specifiers: Optional[list[str]] = rest_field(
        name="counterSpecifiers", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of specifier names of the performance counters you want to collect. Use a wildcard (*)
     to collect a counter for all instances. To get a list of performance counters on Windows, run
     the command 'typeperf'."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform the data source. This is a deprecated property and will be removed
     in future versions."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownPerfCounterDataSourceStreams"]]] = None,
        sampling_frequency_in_seconds: Optional[int] = None,
        counter_specifiers: Optional[list[str]] = None,
        transform_kql: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class PerformanceCountersOTelDataSource(_Model):
    """Definition of which Open Telemetry performance counters will be collected and how they will be
    collected by this data collection rule. Collected from both Windows and Linux machines where
    the counter is present.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to.
    :vartype streams: list[str or
     ~azure.mgmt.monitor.models.KnownPerformanceCountersOTelDataSourceStreams]
    :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter
     measurements (samples).
    :vartype sampling_frequency_in_seconds: int
    :ivar counter_specifiers: A list of specifier names of the performance counters you want to
     collect.
    :vartype counter_specifiers: list[str]
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownPerformanceCountersOTelDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to."""
    sampling_frequency_in_seconds: Optional[int] = rest_field(
        name="samplingFrequencyInSeconds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of seconds between consecutive counter measurements (samples)."""
    counter_specifiers: Optional[list[str]] = rest_field(
        name="counterSpecifiers", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of specifier names of the performance counters you want to collect."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownPerformanceCountersOTelDataSourceStreams"]]] = None,
        sampling_frequency_in_seconds: Optional[int] = None,
        counter_specifiers: Optional[list[str]] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class PlatformTelemetryDataSource(_Model):
    """Definition of platform telemetry data source configuration.

    :ivar streams: List of platform telemetry streams to collect. Required.
    :vartype streams: list[str]
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of platform telemetry streams to collect. Required."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[str],
        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 PredictiveAutoscalePolicy(_Model):
    """The parameters for enabling predictive autoscale.

    :ivar scale_mode: the predictive autoscale mode. Required. Known values are: "Disabled",
     "ForecastOnly", and "Enabled".
    :vartype scale_mode: str or ~azure.mgmt.monitor.models.PredictiveAutoscalePolicyScaleMode
    :ivar scale_look_ahead_time: the amount of time to specify by which instances are launched in
     advance. It must be between 1 minute and 60 minutes in ISO 8601 format.
    :vartype scale_look_ahead_time: ~datetime.timedelta
    """

    scale_mode: Union[str, "_models.PredictiveAutoscalePolicyScaleMode"] = rest_field(
        name="scaleMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """the predictive autoscale mode. Required. Known values are: \"Disabled\", \"ForecastOnly\", and
     \"Enabled\"."""
    scale_look_ahead_time: Optional[datetime.timedelta] = rest_field(
        name="scaleLookAheadTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """the amount of time to specify by which instances are launched in advance. It must be between 1
     minute and 60 minutes in ISO 8601 format."""

    @overload
    def __init__(
        self,
        *,
        scale_mode: Union[str, "_models.PredictiveAutoscalePolicyScaleMode"],
        scale_look_ahead_time: Optional[datetime.timedelta] = None,
    ) -> None: ...

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

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


class PredictiveResponse(_Model):
    """The response to a metrics query.

    :ivar timespan: The timespan for which the data was retrieved. Its value consists of two
     datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back
     from what was originally requested.
    :vartype timespan: str
    :ivar interval: The interval (window size) for which the metric data was returned in.  This may
     be adjusted in the future and returned back from what was originally requested.  This is not
     present if a metadata request was made.
    :vartype interval: ~datetime.timedelta
    :ivar metric_name: The metrics being queried.
    :vartype metric_name: str
    :ivar target_resource_id: resource of the predictive metric.
    :vartype target_resource_id: str
    :ivar data: the value of the collection.
    :vartype data: list[~azure.mgmt.monitor.models.PredictiveValue]
    """

    timespan: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The timespan for which the data was retrieved. Its value consists of two datetimes
     concatenated, separated by '/'.  This may be adjusted in the future and returned back from what
     was originally requested."""
    interval: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The interval (window size) for which the metric data was returned in.  This may be adjusted in
     the future and returned back from what was originally requested.  This is not present if a
     metadata request was made."""
    metric_name: Optional[str] = rest_field(
        name="metricName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The metrics being queried."""
    target_resource_id: Optional[str] = rest_field(
        name="targetResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """resource of the predictive metric."""
    data: Optional[list["_models.PredictiveValue"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the value of the collection."""

    @overload
    def __init__(
        self,
        *,
        timespan: Optional[str] = None,
        interval: Optional[datetime.timedelta] = None,
        metric_name: Optional[str] = None,
        target_resource_id: Optional[str] = None,
        data: Optional[list["_models.PredictiveValue"]] = None,
    ) -> None: ...

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

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


class PredictiveValue(_Model):
    """Represents a predictive metric value in the given bucket.

    :ivar time_stamp: the timestamp for the metric value in ISO 8601 format. Required.
    :vartype time_stamp: ~datetime.datetime
    :ivar value: Predictive value in this time bucket. Required.
    :vartype value: float
    """

    time_stamp: datetime.datetime = rest_field(
        name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """the timestamp for the metric value in ISO 8601 format. Required."""
    value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Predictive value in this time bucket. Required."""

    @overload
    def __init__(
        self,
        *,
        time_stamp: datetime.datetime,
        value: float,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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(Resource):
    """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.monitor.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.monitor.models.PrivateEndpointConnectionProperties
    """

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

    __flattened_items = ["private_endpoint", "private_link_service_connection_state", "provisioning_state"]

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

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

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

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

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


class PrivateEndpointConnectionProperties(_Model):
    """Properties of the private endpoint connection.

    :ivar private_endpoint: The private endpoint resource.
    :vartype private_endpoint: ~azure.mgmt.monitor.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.monitor.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.monitor.models.PrivateEndpointConnectionProvisioningState
    """

    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(
        name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private endpoint resource."""
    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\"."""

    @overload
    def __init__(
        self,
        *,
        private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState",
        private_endpoint: Optional["_models.PrivateEndpoint"] = None,
    ) -> None: ...

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

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


class PrivateLinkResource(Resource):
    """A private link resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.monitor.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.monitor.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 PrivateLinkResourceProperties(_Model):
    """Properties of a private link resource.

    :ivar group_id: The private link resource group id.
    :vartype group_id: str
    :ivar required_members: The private link resource required member names.
    :vartype required_members: list[str]
    :ivar required_zone_names: The private link resource private link DNS zone name.
    :vartype required_zone_names: list[str]
    """

    group_id: Optional[str] = rest_field(name="groupId", visibility=["read"])
    """The private link resource group id."""
    required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"])
    """The private link resource required member names."""
    required_zone_names: Optional[list[str]] = rest_field(
        name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private link resource private link DNS zone name."""

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

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

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


class PrivateLinkScopedResource(_Model):
    """PrivateLinkScopedResource.

    :ivar resource_id: The resourceId of the Azure Monitor Private Link Scope Scoped Resource
     through which this DCE is associated with a Azure Monitor Private Link Scope.
    :vartype resource_id: str
    :ivar scope_id: The immutableId of the Azure Monitor Private Link Scope Resource to which the
     association is.
    :vartype scope_id: str
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resourceId of the Azure Monitor Private Link Scope Scoped Resource through which this DCE
     is associated with a Azure Monitor Private Link Scope."""
    scope_id: Optional[str] = rest_field(name="scopeId", visibility=["read", "create", "update", "delete", "query"])
    """The immutableId of the Azure Monitor Private Link Scope Resource to which the association is."""

    @overload
    def __init__(
        self,
        *,
        resource_id: Optional[str] = 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 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.monitor.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 PrometheusForwarderDataSource(_Model):
    """Definition of Prometheus metrics forwarding configuration.

    :ivar streams: List of streams that this data source will be sent to.
    :vartype streams: list[str or
     ~azure.mgmt.monitor.models.KnownPrometheusForwarderDataSourceStreams]
    :ivar label_include_filter: The list of label inclusion filters in the form of label
     "name-value" pairs. Currently only one label is supported: 'microsoft_metrics_include_label'.
     Label values are matched case-insensitively.
    :vartype label_include_filter: dict[str, str]
    :ivar custom_vm_scrape_config: Custom VM Scrape Config that defines scrape jobs.
    :vartype custom_vm_scrape_config: list[any]
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownPrometheusForwarderDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to."""
    label_include_filter: Optional[dict[str, str]] = rest_field(
        name="labelIncludeFilter", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of label inclusion filters in the form of label \"name-value\" pairs. Currently only
     one label is supported: 'microsoft_metrics_include_label'. Label values are matched
     case-insensitively."""
    custom_vm_scrape_config: Optional[list[Any]] = rest_field(
        name="customVMScrapeConfig", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom VM Scrape Config that defines scrape jobs."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownPrometheusForwarderDataSourceStreams"]]] = None,
        label_include_filter: Optional[dict[str, str]] = None,
        custom_vm_scrape_config: Optional[list[Any]] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class PromQLCriteria(MetricAlertCriteria, discriminator="Microsoft.Azure.Monitor.PromQLCriteria"):
    """Specifies the PromQL criteria for the metric alert resource.

    :ivar failing_periods: Configuration for failing periods in query-based alerts.
    :vartype failing_periods: ~azure.mgmt.monitor.models.QueryFailingPeriods
    :ivar all_of: The list of promQL criteria. Alert will be raised when all conditions are met.
    :vartype all_of: list[~azure.mgmt.monitor.models.MultiPromQLCriteria]
    :ivar odata_type: Specifies the type of the alert criteria. Previously undocumented values
     might be returned. Required. Microsoft.Azure.Monitor.PromQLCriteria.
    :vartype odata_type: str or ~azure.mgmt.monitor.models.MICROSOFT_AZURE_MONITOR_PROM_QL_CRITERIA
    """

    failing_periods: Optional["_models.QueryFailingPeriods"] = rest_field(
        name="failingPeriods", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration for failing periods in query-based alerts."""
    all_of: Optional[list["_models.MultiPromQLCriteria"]] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of promQL criteria. Alert will be raised when all conditions are met."""
    odata_type: Literal[Odatatype.MICROSOFT_AZURE_MONITOR_PROM_QL_CRITERIA] = rest_discriminator(name="odata.type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of the alert criteria. Previously undocumented values might be returned.
     Required. Microsoft.Azure.Monitor.PromQLCriteria."""

    @overload
    def __init__(
        self,
        *,
        failing_periods: Optional["_models.QueryFailingPeriods"] = None,
        all_of: Optional[list["_models.MultiPromQLCriteria"]] = None,
    ) -> None: ...

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


class ProvisioningIssue(_Model):
    """Describes a provisioning issue for a network security perimeter configuration.

    :ivar name: Name of the issue.
    :vartype name: str
    :ivar properties:
    :vartype properties: ~azure.mgmt.monitor.models.ProvisioningIssueProperties
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Name of the issue."""
    properties: Optional["_models.ProvisioningIssueProperties"] = rest_field(visibility=["read"])


class ProvisioningIssueProperties(_Model):
    """Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource
    providers should generate separate provisioning issue elements for each separate issue
    detected, and include a meaningful and distinctive description, as well as any appropriate
    suggestedResourceIds and suggestedAccessRules.

    :ivar issue_type: Type of issue. Known values are: "Unknown",
     "ConfigurationPropagationFailure", "MissingPerimeterConfiguration", and
     "MissingIdentityConfiguration".
    :vartype issue_type: str or ~azure.mgmt.monitor.models.IssueType
    :ivar severity: Severity of the issue. Known values are: "Warning" and "Error".
    :vartype severity: str or ~azure.mgmt.monitor.models.Severity
    :ivar description: Description of the issue.
    :vartype description: str
    :ivar suggested_resource_ids: Fully qualified resource IDs of suggested resources that can be
     associated to the network security perimeter (NSP) to remediate the issue.
    :vartype suggested_resource_ids: list[str]
    :ivar suggested_access_rules: Access rules that can be added to the network security profile
     (NSP) to remediate the issue.
    :vartype suggested_access_rules: list[~azure.mgmt.monitor.models.AccessRule]
    """

    issue_type: Optional[Union[str, "_models.IssueType"]] = rest_field(name="issueType", visibility=["read"])
    """Type of issue. Known values are: \"Unknown\", \"ConfigurationPropagationFailure\",
     \"MissingPerimeterConfiguration\", and \"MissingIdentityConfiguration\"."""
    severity: Optional[Union[str, "_models.Severity"]] = rest_field(visibility=["read"])
    """Severity of the issue. Known values are: \"Warning\" and \"Error\"."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Description of the issue."""
    suggested_resource_ids: Optional[list[str]] = rest_field(name="suggestedResourceIds", visibility=["read"])
    """Fully qualified resource IDs of suggested resources that can be associated to the network
     security perimeter (NSP) to remediate the issue."""
    suggested_access_rules: Optional[list["_models.AccessRule"]] = rest_field(
        name="suggestedAccessRules", visibility=["read"]
    )
    """Access rules that can be added to the network security profile (NSP) to remediate the issue."""


class QueryFailingPeriods(_Model):
    """Configuration for failing periods in query-based alerts.

    :ivar for_property: The amount of time (in ISO 8601 duration format) alert must be active
     before firing. Required.
    :vartype for_property: ~datetime.timedelta
    """

    for_property: datetime.timedelta = rest_field(
        name="for", visibility=["read", "create", "update", "delete", "query"]
    )
    """The amount of time (in ISO 8601 duration format) alert must be active before firing. Required."""

    @overload
    def __init__(
        self,
        *,
        for_property: datetime.timedelta,
    ) -> None: ...

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

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


class Recurrence(_Model):
    """The repeating times at which this profile begins. This element is not used if the FixedDate
    element is used.

    :ivar frequency: the recurrence frequency. How often the schedule profile should take effect.
     This value must be Week, meaning each week will have the same set of profiles. For example, to
     set a daily schedule, set **schedule** to every day of the week. The frequency property
     specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second",
     "Minute", "Hour", "Day", "Week", "Month", and "Year".
    :vartype frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency
    :ivar schedule: the scheduling constraints for when the profile begins. Required.
    :vartype schedule: ~azure.mgmt.monitor.models.RecurrentSchedule
    """

    frequency: Union[str, "_models.RecurrenceFrequency"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the recurrence frequency. How often the schedule profile should take effect. This value must be
     Week, meaning each week will have the same set of profiles. For example, to set a daily
     schedule, set **schedule** to every day of the week. The frequency property specifies that the
     schedule is repeated weekly. Required. Known values are: \"None\", \"Second\", \"Minute\",
     \"Hour\", \"Day\", \"Week\", \"Month\", and \"Year\"."""
    schedule: "_models.RecurrentSchedule" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the scheduling constraints for when the profile begins. Required."""

    @overload
    def __init__(
        self,
        *,
        frequency: Union[str, "_models.RecurrenceFrequency"],
        schedule: "_models.RecurrentSchedule",
    ) -> None: ...

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

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


class RecurrentSchedule(_Model):
    """The scheduling constraints for when the profile begins.

    :ivar time_zone: the timezone for the hours of the profile. Some examples of valid time zones
     are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific
     Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard
     Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time,
     Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern
     Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time,
     Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA
     Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard
     Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia
     Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard
     Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe
     Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard
     Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB
     Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe
     Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel
     Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab
     Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran
     Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius
     Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West
     Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time,
     Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard
     Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia
     Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W.
     Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time,
     Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard
     Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time,
     Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10,
     Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji
     Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands
     Standard Time. Required.
    :vartype time_zone: str
    :ivar days: the collection of days that the profile takes effect on. Possible values are Sunday
     through Saturday. Required.
    :vartype days: list[str]
    :ivar hours: A collection of hours that the profile takes effect on. Values supported are 0 to
     23 on the 24-hour clock (AM/PM times are not supported). Required.
    :vartype hours: list[int]
    :ivar minutes: A collection of minutes at which the profile takes effect at. Required.
    :vartype minutes: list[int]
    """

    time_zone: str = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"])
    """the timezone for the hours of the profile. Some examples of valid time zones are: Dateline
     Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time
     (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico),
     Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard
     Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time,
     US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard
     Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time,
     Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern
     Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02,
     Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard
     Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe
     Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa
     Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East
     Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa
     Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad
     Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard
     Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard
     Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard
     Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg
     Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal
     Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard
     Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard
     Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time,
     Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time,
     Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia
     Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time,
     Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard
     Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka
     Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time. Required."""
    days: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the collection of days that the profile takes effect on. Possible values are Sunday through
     Saturday. Required."""
    hours: list[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the
     24-hour clock (AM/PM times are not supported). Required."""
    minutes: list[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A collection of minutes at which the profile takes effect at. Required."""

    @overload
    def __init__(
        self,
        *,
        time_zone: str,
        days: list[str],
        hours: list[int],
        minutes: list[int],
    ) -> None: ...

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

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


class ReferencesSpecEnrichmentData(EnrichmentData):
    """All the enrichment data sources referenced in data flows.

    :ivar storage_blobs: All the storage blobs used as enrichment data sources.
    :vartype storage_blobs: list[~azure.mgmt.monitor.models.StorageBlob]
    """

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

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

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


class ResolveConfiguration(_Model):
    """ResolveConfiguration.

    :ivar auto_resolved: Indicates whether the alert should be auto resolved. Required.
    :vartype auto_resolved: bool
    :ivar time_to_resolve: The time (in ISO 8601 duration format) after which the alert should be
     auto resolved.
    :vartype time_to_resolve: ~datetime.timedelta
    """

    auto_resolved: bool = rest_field(name="autoResolved", visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the alert should be auto resolved. Required."""
    time_to_resolve: Optional[datetime.timedelta] = rest_field(
        name="timeToResolve", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time (in ISO 8601 duration format) after which the alert should be auto resolved."""

    @overload
    def __init__(
        self,
        *,
        auto_resolved: bool,
        time_to_resolve: Optional[datetime.timedelta] = None,
    ) -> None: ...

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

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


class ResourceAssociation(_Model):
    """Information about resource association.

    :ivar name: Name of the resource association.
    :vartype name: str
    :ivar access_mode: Known values are: "Enforced", "Learning", and "Audit".
    :vartype access_mode: str or ~azure.mgmt.monitor.models.ResourceAssociationAccessMode
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the resource association."""
    access_mode: Optional[Union[str, "_models.ResourceAssociationAccessMode"]] = rest_field(
        name="accessMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"Enforced\", \"Learning\", and \"Audit\"."""

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

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

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


class ResourceForUpdate(_Model):
    """Definition of ARM tracked top level resource properties for update operation.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar identity: Managed Service Identity.
    :vartype identity: ~azure.mgmt.monitor.models.ResourceForUpdateIdentity
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    identity: Optional["_models.ResourceForUpdateIdentity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Managed Service Identity."""

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

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

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


class ResourceForUpdateIdentity(ManagedServiceIdentity):
    """Managed Service Identity.

    :ivar principal_id: The service principal ID of the system assigned identity. This property
     will only be provided for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
     provided for a system assigned identity.
    :vartype tenant_id: str
    :ivar type: The type of managed identity assigned to this resource. Required. Known values are:
     "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
    :vartype type: str or ~azure.mgmt.monitor.models.ManagedServiceIdentityType
    :ivar user_assigned_identities: The identities assigned to this resource by the user.
    :vartype user_assigned_identities: dict[str, ~azure.mgmt.monitor.models.UserAssignedIdentity]
    """

    @overload
    def __init__(
        self,
        *,
        type: Union[str, "_models.ManagedServiceIdentityType"],
        user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None,
    ) -> None: ...

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

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


class Response(_Model):
    """The response to a metrics query.

    :ivar cost: The integer value representing the relative cost of the query.
    :vartype cost: int
    :ivar timespan: The timespan for which the data was retrieved. Its value consists of two
     datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back
     from what was originally requested. Required.
    :vartype timespan: str
    :ivar interval: The interval (window size) for which the metric data was returned in ISO 8601
     duration format with a special case for 'FULL' value that returns single datapoint for entire
     time span requested (*Examples: PT15M, PT1H, P1D, FULL*). This may be adjusted and different
     from what was originally requested if AutoAdjustTimegrain=true is specified. This is not
     present if a metadata request was made.
    :vartype interval: str
    :ivar namespace: The namespace of the metrics being queried.
    :vartype namespace: str
    :ivar resourceregion: The region of the resource being queried for metrics.
    :vartype resourceregion: str
    :ivar value: The value of the collection. Required.
    :vartype value: list[~azure.mgmt.monitor.models.Metric]
    """

    cost: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The integer value representing the relative cost of the query."""
    timespan: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The timespan for which the data was retrieved. Its value consists of two datetimes
     concatenated, separated by '/'.  This may be adjusted in the future and returned back from what
     was originally requested. Required."""
    interval: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The interval (window size) for which the metric data was returned in ISO 8601 duration format
     with a special case for 'FULL' value that returns single datapoint for entire time span
     requested (*Examples: PT15M, PT1H, P1D, FULL*). This may be adjusted and different from what
     was originally requested if AutoAdjustTimegrain=true is specified. This is not present if a
     metadata request was made."""
    namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace of the metrics being queried."""
    resourceregion: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The region of the resource being queried for metrics."""
    value: list["_models.Metric"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The value of the collection. Required."""

    @overload
    def __init__(
        self,
        *,
        timespan: str,
        value: list["_models.Metric"],
        cost: Optional[int] = None,
        interval: Optional[str] = None,
        namespace: Optional[str] = None,
        resourceregion: 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 RetentionPolicy(_Model):
    """Specifies the retention policy for the log.

    :ivar enabled: a value indicating whether the retention policy is enabled. Required.
    :vartype enabled: bool
    :ivar days: the number of days for the retention in days. A value of 0 will retain the events
     indefinitely. Required.
    :vartype days: int
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """a value indicating whether the retention policy is enabled. Required."""
    days: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the number of days for the retention in days. A value of 0 will retain the events indefinitely.
     Required."""

    @overload
    def __init__(
        self,
        *,
        enabled: bool,
        days: int,
    ) -> None: ...

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

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


class RuleResolveConfiguration(_Model):
    """TBD. Relevant only for rules of the kind LogAlert.

    :ivar auto_resolved: The flag that indicates whether or not to auto resolve a fired alert.
    :vartype auto_resolved: bool
    :ivar time_to_resolve: The duration a rule must evaluate as healthy before the fired alert is
     automatically resolved represented in ISO 8601 duration format.
    :vartype time_to_resolve: ~datetime.timedelta
    """

    auto_resolved: Optional[bool] = rest_field(
        name="autoResolved", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that indicates whether or not to auto resolve a fired alert."""
    time_to_resolve: Optional[datetime.timedelta] = rest_field(
        name="timeToResolve", visibility=["read", "create", "update", "delete", "query"]
    )
    """The duration a rule must evaluate as healthy before the fired alert is automatically resolved
     represented in ISO 8601 duration format."""

    @overload
    def __init__(
        self,
        *,
        auto_resolved: Optional[bool] = None,
        time_to_resolve: Optional[datetime.timedelta] = None,
    ) -> None: ...

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

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


class ScaleAction(_Model):
    """The parameters for the scaling action.

    :ivar direction: the scale direction. Whether the scaling action increases or decreases the
     number of instances. Required. Known values are: "None", "Increase", and "Decrease".
    :vartype direction: str or ~azure.mgmt.monitor.models.ScaleDirection
    :ivar type: the type of action that should occur when the scale rule fires. Required. Known
     values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue".
    :vartype type: str or ~azure.mgmt.monitor.models.ScaleType
    :ivar value: the number of instances that are involved in the scaling action. This value must
     be 1 or greater. The default value is 1.
    :vartype value: str
    :ivar cooldown: the amount of time to wait since the last scaling action before this action
     occurs. It must be between 1 week and 1 minute in ISO 8601 format. Required.
    :vartype cooldown: ~datetime.timedelta
    """

    direction: Union[str, "_models.ScaleDirection"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the scale direction. Whether the scaling action increases or decreases the number of instances.
     Required. Known values are: \"None\", \"Increase\", and \"Decrease\"."""
    type: Union[str, "_models.ScaleType"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the type of action that should occur when the scale rule fires. Required. Known values are:
     \"ChangeCount\", \"PercentChangeCount\", \"ExactCount\", and \"ServiceAllowedNextValue\"."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the number of instances that are involved in the scaling action. This value must be 1 or
     greater. The default value is 1."""
    cooldown: datetime.timedelta = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the amount of time to wait since the last scaling action before this action occurs. It must be
     between 1 week and 1 minute in ISO 8601 format. Required."""

    @overload
    def __init__(
        self,
        *,
        direction: Union[str, "_models.ScaleDirection"],
        type: Union[str, "_models.ScaleType"],
        cooldown: datetime.timedelta,
        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 ScaleCapacity(_Model):
    """The number of instances that can be used during this profile.

    :ivar minimum: the minimum number of instances for the resource. Required.
    :vartype minimum: str
    :ivar maximum: the maximum number of instances for the resource. The actual maximum number of
     instances is limited by the cores that are available in the subscription. Required.
    :vartype maximum: str
    :ivar default: the number of instances that will be set if metrics are not available for
     evaluation. The default is only used if the current instance count is lower than the default.
     Required.
    :vartype default: str
    """

    minimum: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the minimum number of instances for the resource. Required."""
    maximum: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the maximum number of instances for the resource. The actual maximum number of instances is
     limited by the cores that are available in the subscription. Required."""
    default: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the number of instances that will be set if metrics are not available for evaluation. The
     default is only used if the current instance count is lower than the default. Required."""

    @overload
    def __init__(
        self,
        *,
        minimum: str,
        maximum: str,
        default: 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 ScaleRule(_Model):
    """A rule that provide the triggers and parameters for the scaling action.

    :ivar metric_trigger: the trigger that results in a scaling action. Required.
    :vartype metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger
    :ivar scale_action: the parameters for the scaling action. Required.
    :vartype scale_action: ~azure.mgmt.monitor.models.ScaleAction
    """

    metric_trigger: "_models.MetricTrigger" = rest_field(
        name="metricTrigger", visibility=["read", "create", "update", "delete", "query"]
    )
    """the trigger that results in a scaling action. Required."""
    scale_action: "_models.ScaleAction" = rest_field(
        name="scaleAction", visibility=["read", "create", "update", "delete", "query"]
    )
    """the parameters for the scaling action. Required."""

    @overload
    def __init__(
        self,
        *,
        metric_trigger: "_models.MetricTrigger",
        scale_action: "_models.ScaleAction",
    ) -> None: ...

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

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


class ScaleRuleMetricDimension(_Model):
    """Specifies an auto scale rule metric dimension.

    :ivar dimension_name: Name of the dimension. Required.
    :vartype dimension_name: str
    :ivar operator: the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals'
     being equal to any of the values. 'NotEquals' being not equal to all of the values. Required.
     Known values are: "Equals" and "NotEquals".
    :vartype operator: str or ~azure.mgmt.monitor.models.ScaleRuleMetricDimensionOperationType
    :ivar values_property: list of dimension values. For example: ["App1","App2"]. Required.
    :vartype values_property: list[str]
    """

    dimension_name: str = rest_field(name="DimensionName", visibility=["read", "create", "update", "delete", "query"])
    """Name of the dimension. Required."""
    operator: Union[str, "_models.ScaleRuleMetricDimensionOperationType"] = rest_field(
        name="Operator", visibility=["read", "create", "update", "delete", "query"]
    )
    """the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to
     any of the values. 'NotEquals' being not equal to all of the values. Required. Known values
     are: \"Equals\" and \"NotEquals\"."""
    values_property: list[str] = rest_field(
        name="Values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values"
    )
    """list of dimension values. For example: [\"App1\",\"App2\"]. Required."""

    @overload
    def __init__(
        self,
        *,
        dimension_name: str,
        operator: Union[str, "_models.ScaleRuleMetricDimensionOperationType"],
        values_property: list[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 ScheduledQueryRuleCriteria(_Model):
    """The rule criteria that defines the conditions of the scheduled query rule.

    :ivar all_of: A list of conditions to evaluate against the specified scopes.
    :vartype all_of: list[~azure.mgmt.monitor.models.Condition]
    """

    all_of: Optional[list["_models.Condition"]] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of conditions to evaluate against the specified scopes."""

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

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

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


class ScheduledQueryRuleProperties(_Model):
    """scheduled query rule Definition.

    :ivar created_with_api_version: The api-version used when creating this alert rule.
    :vartype created_with_api_version: str
    :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule.
    :vartype is_legacy_log_analytics_rule: bool
    :ivar description: The description of the scheduled query rule.
    :vartype description: str
    :ivar display_name: The display name of the alert rule.
    :vartype display_name: str
    :ivar severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is
     severest. Relevant and required only for rules of the kind LogAlert. Known values are: 0, 1, 2,
     3, and 4.
    :vartype severity: int or ~azure.mgmt.monitor.models.AlertSeverity
    :ivar enabled: The flag which indicates whether this scheduled query rule is enabled. Value
     should be true or false.
    :vartype enabled: bool
    :ivar scopes: The list of resource id's that this scheduled query rule is scoped to.
    :vartype scopes: list[str]
    :ivar evaluation_frequency: How often the scheduled query rule is evaluated represented in ISO
     8601 duration format. Relevant and required only for rules of the kind LogAlert.
    :vartype evaluation_frequency: ~datetime.timedelta
    :ivar window_size: The period of time (in ISO 8601 duration format) on which the Alert query
     will be executed (bin size). Relevant and required only for rules of the kind LogAlert.
    :vartype window_size: ~datetime.timedelta
    :ivar override_query_time_range: If specified then overrides the query time range (default is
     WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
    :vartype override_query_time_range: ~datetime.timedelta
    :ivar target_resource_types: List of resource type of the target resource(s) on which the alert
     is created/updated. For example if the scope is a resource group and targetResourceTypes is
     Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual
     machine in the resource group which meet the alert criteria. Relevant only for rules of the
     kind LogAlert.
    :vartype target_resource_types: list[str]
    :ivar criteria: The rule criteria that defines the conditions of the scheduled query rule.
    :vartype criteria: ~azure.mgmt.monitor.models.ScheduledQueryRuleCriteria
    :ivar mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration
     format) after the alert is fired. Relevant only for rules of the kind LogAlert.
    :vartype mute_actions_duration: ~datetime.timedelta
    :ivar actions: Actions to invoke when the alert fires.
    :vartype actions: ~azure.mgmt.monitor.models.Actions
    :ivar is_workspace_alerts_storage_configured: The flag which indicates whether this scheduled
     query rule has been configured to be stored in the customer's storage. The default is false.
    :vartype is_workspace_alerts_storage_configured: bool
    :ivar check_workspace_alerts_storage_configured: The flag which indicates whether this
     scheduled query rule should be stored in the customer's storage. The default is false. Relevant
     only for rules of the kind LogAlert.
    :vartype check_workspace_alerts_storage_configured: bool
    :ivar skip_query_validation: The flag which indicates whether the provided query should be
     validated or not. The default is false. Relevant only for rules of the kind LogAlert.
    :vartype skip_query_validation: bool
    :ivar auto_mitigate: The flag that indicates whether the alert should be automatically resolved
     or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
    :vartype auto_mitigate: bool
    :ivar resolve_configuration: Defines the configuration for resolving fired alerts. Relevant
     only for rules of kinds LogAlert and SimpleLogAlert.
    :vartype resolve_configuration: ~azure.mgmt.monitor.models.RuleResolveConfiguration
    """

    created_with_api_version: Optional[str] = rest_field(name="createdWithApiVersion", visibility=["read"])
    """The api-version used when creating this alert rule."""
    is_legacy_log_analytics_rule: Optional[bool] = rest_field(name="isLegacyLogAnalyticsRule", visibility=["read"])
    """True if alert rule is legacy Log Analytic rule."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the scheduled query rule."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The display name of the alert rule."""
    severity: Optional[Union[int, "_models.AlertSeverity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and
     required only for rules of the kind LogAlert. Known values are: 0, 1, 2, 3, and 4."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The flag which indicates whether this scheduled query rule is enabled. Value should be true or
     false."""
    scopes: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of resource id's that this scheduled query rule is scoped to."""
    evaluation_frequency: Optional[datetime.timedelta] = rest_field(
        name="evaluationFrequency", visibility=["read", "create", "update", "delete", "query"]
    )
    """How often the scheduled query rule is evaluated represented in ISO 8601 duration format.
     Relevant and required only for rules of the kind LogAlert."""
    window_size: Optional[datetime.timedelta] = rest_field(
        name="windowSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin
     size). Relevant and required only for rules of the kind LogAlert."""
    override_query_time_range: Optional[datetime.timedelta] = rest_field(
        name="overrideQueryTimeRange", visibility=["read", "create", "update", "delete", "query"]
    )
    """If specified then overrides the query time range (default is
     WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert."""
    target_resource_types: Optional[list[str]] = rest_field(
        name="targetResourceTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of resource type of the target resource(s) on which the alert is created/updated. For
     example if the scope is a resource group and targetResourceTypes is
     Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual
     machine in the resource group which meet the alert criteria. Relevant only for rules of the
     kind LogAlert."""
    criteria: Optional["_models.ScheduledQueryRuleCriteria"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule criteria that defines the conditions of the scheduled query rule."""
    mute_actions_duration: Optional[datetime.timedelta] = rest_field(
        name="muteActionsDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is
     fired. Relevant only for rules of the kind LogAlert."""
    actions: Optional["_models.Actions"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Actions to invoke when the alert fires."""
    is_workspace_alerts_storage_configured: Optional[bool] = rest_field(
        name="isWorkspaceAlertsStorageConfigured", visibility=["read"]
    )
    """The flag which indicates whether this scheduled query rule has been configured to be stored in
     the customer's storage. The default is false."""
    check_workspace_alerts_storage_configured: Optional[bool] = rest_field(
        name="checkWorkspaceAlertsStorageConfigured", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag which indicates whether this scheduled query rule should be stored in the customer's
     storage. The default is false. Relevant only for rules of the kind LogAlert."""
    skip_query_validation: Optional[bool] = rest_field(
        name="skipQueryValidation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag which indicates whether the provided query should be validated or not. The default is
     false. Relevant only for rules of the kind LogAlert."""
    auto_mitigate: Optional[bool] = rest_field(
        name="autoMitigate", visibility=["read", "create", "update", "delete", "query"]
    )
    """The flag that indicates whether the alert should be automatically resolved or not. The default
     is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert."""
    resolve_configuration: Optional["_models.RuleResolveConfiguration"] = rest_field(
        name="resolveConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert
     and SimpleLogAlert."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        severity: Optional[Union[int, "_models.AlertSeverity"]] = None,
        enabled: Optional[bool] = None,
        scopes: Optional[list[str]] = None,
        evaluation_frequency: Optional[datetime.timedelta] = None,
        window_size: Optional[datetime.timedelta] = None,
        override_query_time_range: Optional[datetime.timedelta] = None,
        target_resource_types: Optional[list[str]] = None,
        criteria: Optional["_models.ScheduledQueryRuleCriteria"] = None,
        mute_actions_duration: Optional[datetime.timedelta] = None,
        actions: Optional["_models.Actions"] = None,
        check_workspace_alerts_storage_configured: Optional[bool] = None,
        skip_query_validation: Optional[bool] = None,
        auto_mitigate: Optional[bool] = None,
        resolve_configuration: Optional["_models.RuleResolveConfiguration"] = None,
    ) -> None: ...

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

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


class ScheduledQueryRuleResource(ProxyResource):
    """The scheduled query rule 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.monitor.models.SystemData
    :ivar properties: The rule properties of the resource. Required.
    :vartype properties: ~azure.mgmt.monitor.models.ScheduledQueryRuleProperties
    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.Identity
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives. Required.
    :vartype location: str
    :ivar kind: Indicates the type of scheduled query rule. The default is LogAlert. Known values
     are: "LogAlert", "SimpleLogAlert", and "LogToMetric".
    :vartype kind: str or ~azure.mgmt.monitor.models.Kind
    :ivar etag: Resource entity tag (ETag).
    :vartype etag: str
    """

    properties: "_models.ScheduledQueryRuleProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule properties of the resource. Required."""
    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"])
    """Resource tags."""
    location: str = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives. Required."""
    kind: Optional[Union[str, "_models.Kind"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates the type of scheduled query rule. The default is LogAlert. Known values are:
     \"LogAlert\", \"SimpleLogAlert\", and \"LogToMetric\"."""
    etag: Optional[str] = rest_field(visibility=["read"])
    """Resource entity tag (ETag)."""

    __flattened_items = [
        "created_with_api_version",
        "is_legacy_log_analytics_rule",
        "description",
        "display_name",
        "severity",
        "enabled",
        "scopes",
        "evaluation_frequency",
        "window_size",
        "override_query_time_range",
        "target_resource_types",
        "criteria",
        "mute_actions_duration",
        "actions",
        "is_workspace_alerts_storage_configured",
        "check_workspace_alerts_storage_configured",
        "skip_query_validation",
        "auto_mitigate",
        "resolve_configuration",
    ]

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

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

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

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

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


class ScheduledQueryRuleResourcePatch(_Model):
    """The scheduled query rule resource for patch operations.

    :ivar identity: The identity of the resource.
    :vartype identity: ~azure.mgmt.monitor.models.Identity
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The scheduled query rule properties of the resource.
    :vartype properties: ~azure.mgmt.monitor.models.ScheduledQueryRuleProperties
    """

    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the resource."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    properties: Optional["_models.ScheduledQueryRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The scheduled query rule properties of the resource."""

    __flattened_items = [
        "created_with_api_version",
        "is_legacy_log_analytics_rule",
        "description",
        "display_name",
        "severity",
        "enabled",
        "scopes",
        "evaluation_frequency",
        "window_size",
        "override_query_time_range",
        "target_resource_types",
        "criteria",
        "mute_actions_duration",
        "actions",
        "is_workspace_alerts_storage_configured",
        "check_workspace_alerts_storage_configured",
        "skip_query_validation",
        "auto_mitigate",
        "resolve_configuration",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ScopedResource(ProxyResource):
    """A private link scoped 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.monitor.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.monitor.models.ScopedResourceProperties
    """

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

    __flattened_items = ["kind", "linked_resource_id", "subscription_location", "provisioning_state"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ScopedResourceProperties(_Model):
    """Properties of a private link scoped resource.

    :ivar kind: The kind of scoped Azure monitor resource. Known values are: "Resource" and
     "Metrics".
    :vartype kind: str or ~azure.mgmt.monitor.models.ScopedResourceKind
    :ivar linked_resource_id: The resource id of the scoped Azure monitor resource.
    :vartype linked_resource_id: str
    :ivar subscription_location: The location of a scoped subscription. Only needs to be specified
     for metric dataplane subscriptions.
    :vartype subscription_location: str
    :ivar provisioning_state: State of the Azure monitor resource. Known values are: "Succeeded",
     "Provisioning", "Failed", and "Canceled".
    :vartype provisioning_state: str or ~azure.mgmt.monitor.models.ScopedResourceProvisioningState
    """

    kind: Optional[Union[str, "_models.ScopedResourceKind"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The kind of scoped Azure monitor resource. Known values are: \"Resource\" and \"Metrics\"."""
    linked_resource_id: Optional[str] = rest_field(
        name="linkedResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource id of the scoped Azure monitor resource."""
    subscription_location: Optional[str] = rest_field(
        name="subscriptionLocation", visibility=["read", "create", "update", "delete", "query"]
    )
    """The location of a scoped subscription. Only needs to be specified for metric dataplane
     subscriptions."""
    provisioning_state: Optional[Union[str, "_models.ScopedResourceProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """State of the Azure monitor resource. Known values are: \"Succeeded\", \"Provisioning\",
     \"Failed\", and \"Canceled\"."""

    @overload
    def __init__(
        self,
        *,
        kind: Optional[Union[str, "_models.ScopedResourceKind"]] = None,
        linked_resource_id: Optional[str] = None,
        subscription_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 SenderAuthorization(_Model):
    """the authorization used by the user who has performed the operation that led to this event. This
    captures the RBAC properties of the event. These usually include the 'action', 'role' and the
    'scope'.

    :ivar action: the permissible actions. For instance: microsoft.support/supporttickets/write.
    :vartype action: str
    :ivar role: the role of the user. For instance: Subscription Admin.
    :vartype role: str
    :ivar scope: the scope.
    :vartype scope: str
    """

    action: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the permissible actions. For instance: microsoft.support/supporttickets/write."""
    role: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the role of the user. For instance: Subscription Admin."""
    scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the scope."""

    @overload
    def __init__(
        self,
        *,
        action: Optional[str] = None,
        role: Optional[str] = None,
        scope: 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 ServiceDiagnosticSettings(_Model):
    """The diagnostic settings for service.

    :ivar storage_account_id: The resource ID of the storage account to which you would like to
     send Diagnostic Logs.
    :vartype storage_account_id: str
    :ivar service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
     would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the
     format: '{service bus resource ID}/authorizationrules/{key name}'.
    :vartype service_bus_rule_id: str
    :ivar event_hub_authorization_rule_id: The resource Id for the event hub namespace
     authorization rule.
    :vartype event_hub_authorization_rule_id: str
    :ivar metrics: the list of metric settings.
    :vartype metrics: list[~azure.mgmt.monitor.models.MetricSettings]
    :ivar logs: the list of logs settings.
    :vartype logs: list[~azure.mgmt.monitor.models.LogSettings]
    :ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log
     Analytics workspace to which you would like to send Diagnostic Logs. Example:
     /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2.
    :vartype workspace_id: str
    """

    storage_account_id: Optional[str] = rest_field(
        name="storageAccountId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the storage account to which you would like to send Diagnostic Logs."""
    service_bus_rule_id: Optional[str] = rest_field(
        name="serviceBusRuleId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service bus rule ID of the service bus namespace in which you would like to have Event Hubs
     created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource
     ID}/authorizationrules/{key name}'."""
    event_hub_authorization_rule_id: Optional[str] = rest_field(
        name="eventHubAuthorizationRuleId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource Id for the event hub namespace authorization rule."""
    metrics: Optional[list["_models.MetricSettings"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the list of metric settings."""
    logs: Optional[list["_models.LogSettings"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """the list of logs settings."""
    workspace_id: Optional[str] = rest_field(
        name="workspaceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to
     which you would like to send Diagnostic Logs. Example:
     /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2."""

    @overload
    def __init__(
        self,
        *,
        storage_account_id: Optional[str] = None,
        service_bus_rule_id: Optional[str] = None,
        event_hub_authorization_rule_id: Optional[str] = None,
        metrics: Optional[list["_models.MetricSettings"]] = None,
        logs: Optional[list["_models.LogSettings"]] = None,
        workspace_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 ServiceDiagnosticSettingsResource(ExtensionResource):
    """Description of a service diagnostic setting.

    :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.monitor.models.SystemData
    :ivar properties: The service diagnostics settings of the resource.
    :vartype properties: ~azure.mgmt.monitor.models.ServiceDiagnosticSettings
    :ivar location: Resource location. Required.
    :vartype location: str
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.ServiceDiagnosticSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The service diagnostics settings of the resource."""
    location: str = rest_field(visibility=["read", "create"])
    """Resource location. Required."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    __flattened_items = [
        "storage_account_id",
        "service_bus_rule_id",
        "event_hub_authorization_rule_id",
        "metrics",
        "logs",
        "workspace_id",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: Optional["_models.ServiceDiagnosticSettings"] = 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 ServiceDiagnosticSettingsResourcePatch(_Model):
    """Service diagnostic setting resource for patch operations.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: The service diagnostics settings for an update operation.
    :vartype properties: ~azure.mgmt.monitor.models.ServiceDiagnosticSettings
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    properties: Optional["_models.ServiceDiagnosticSettings"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The service diagnostics settings for an update operation."""

    __flattened_items = [
        "storage_account_id",
        "service_bus_rule_id",
        "event_hub_authorization_rule_id",
        "metrics",
        "logs",
        "workspace_id",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SingleBaseline(_Model):
    """The baseline values for a single sensitivity value.

    :ivar sensitivity: the sensitivity of the baseline. Required. Known values are: "Low",
     "Medium", and "High".
    :vartype sensitivity: str or ~azure.mgmt.monitor.models.BaselineSensitivity
    :ivar low_thresholds: The low thresholds of the baseline. Required.
    :vartype low_thresholds: list[float]
    :ivar high_thresholds: The high thresholds of the baseline. Required.
    :vartype high_thresholds: list[float]
    """

    sensitivity: Union[str, "_models.BaselineSensitivity"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """the sensitivity of the baseline. Required. Known values are: \"Low\", \"Medium\", and \"High\"."""
    low_thresholds: list[float] = rest_field(
        name="lowThresholds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The low thresholds of the baseline. Required."""
    high_thresholds: list[float] = rest_field(
        name="highThresholds", visibility=["read", "create", "update", "delete", "query"]
    )
    """The high thresholds of the baseline. Required."""

    @overload
    def __init__(
        self,
        *,
        sensitivity: Union[str, "_models.BaselineSensitivity"],
        low_thresholds: list[float],
        high_thresholds: list[float],
    ) -> None: ...

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

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


class SingleMetricBaseline(_Model):
    """The baseline results of a single metric.

    :ivar id: The metric baseline Id. Required.
    :vartype id: str
    :ivar type: The resource type of the metric baseline resource. Required.
    :vartype type: str
    :ivar name: The name of the metric for which the baselines were retrieved. Required.
    :vartype name: str
    :ivar properties: The metric baseline properties of the metric. Required.
    :vartype properties: ~azure.mgmt.monitor.models.MetricBaselinesProperties
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The metric baseline Id. Required."""
    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource type of the metric baseline resource. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the metric for which the baselines were retrieved. Required."""
    properties: "_models.MetricBaselinesProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The metric baseline properties of the metric. Required."""

    __flattened_items = ["timespan", "interval", "namespace", "baselines"]

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        type: str,
        name: str,
        properties: "_models.MetricBaselinesProperties",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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 SmsReceiver(_Model):
    """An SMS receiver.

    :ivar name: The name of the SMS receiver. Names must be unique across all receivers within an
     action group. Required.
    :vartype name: str
    :ivar country_code: The country code of the SMS receiver. Required.
    :vartype country_code: str
    :ivar phone_number: The phone number of the SMS receiver. Required.
    :vartype phone_number: str
    :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and
     "Disabled".
    :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the SMS receiver. Names must be unique across all receivers within an action group.
     Required."""
    country_code: str = rest_field(name="countryCode", visibility=["read", "create", "update", "delete", "query"])
    """The country code of the SMS receiver. Required."""
    phone_number: str = rest_field(name="phoneNumber", visibility=["read", "create", "update", "delete", "query"])
    """The phone number of the SMS receiver. Required."""
    status: Optional[Union[str, "_models.ReceiverStatus"]] = rest_field(visibility=["read"])
    """The status of the receiver. Known values are: \"NotSpecified\", \"Enabled\", and \"Disabled\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        country_code: str,
        phone_number: 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 StaticPromQLCriteria(MultiPromQLCriteria, discriminator="StaticThresholdCriterion"):
    """The criterion for static prom query.

    :ivar name: Name of the criteria. Required.
    :vartype name: str
    :ivar query: The query used to evaluate the alert rule. Required.
    :vartype query: str
    :ivar criterion_type: Specifies the type of threshold criteria. Previously undocumented values
     might be returned. Required. StaticThresholdCriterion.
    :vartype criterion_type: str or ~azure.mgmt.monitor.models.STATIC_THRESHOLD_CRITERION
    """

    criterion_type: Literal[CriterionType.STATIC_THRESHOLD_CRITERION] = rest_discriminator(name="criterionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of threshold criteria. Previously undocumented values might be returned.
     Required. StaticThresholdCriterion."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        query: 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)
        self.criterion_type = CriterionType.STATIC_THRESHOLD_CRITERION  # type: ignore


class StorageBlob(_Model):
    """StorageBlob.

    :ivar resource_id: Resource Id of the storage account that hosts the blob.
    :vartype resource_id: str
    :ivar blob_url: Url of the storage blob.
    :vartype blob_url: str
    :ivar lookup_type: The type of lookup to perform on the blob. Known values are: "String" and
     "Cidr".
    :vartype lookup_type: str or ~azure.mgmt.monitor.models.KnownStorageBlobLookupType
    :ivar name: The name of the enrichment data source used as an alias when referencing this data
     source in data flows.
    :vartype name: str
    """

    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Resource Id of the storage account that hosts the blob."""
    blob_url: Optional[str] = rest_field(name="blobUrl", visibility=["read", "create", "update", "delete", "query"])
    """Url of the storage blob."""
    lookup_type: Optional[Union[str, "_models.KnownStorageBlobLookupType"]] = rest_field(
        name="lookupType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of lookup to perform on the blob. Known values are: \"String\" and \"Cidr\"."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the enrichment data source used as an alias when referencing this data source in
     data flows."""

    @overload
    def __init__(
        self,
        *,
        resource_id: Optional[str] = None,
        blob_url: Optional[str] = None,
        lookup_type: Optional[Union[str, "_models.KnownStorageBlobLookupType"]] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class StorageBlobDestination(_Model):
    """StorageBlobDestination.

    :ivar container_name: The container name of the Storage Blob.
    :vartype container_name: str
    :ivar storage_account_resource_id: The resource ID of the storage account.
    :vartype storage_account_resource_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    container_name: Optional[str] = rest_field(
        name="containerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The container name of the Storage Blob."""
    storage_account_resource_id: Optional[str] = rest_field(
        name="storageAccountResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the storage account."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class StorageTableDestination(_Model):
    """StorageTableDestination.

    :ivar table_name: The name of the Storage Table.
    :vartype table_name: str
    :ivar storage_account_resource_id: The resource ID of the storage account.
    :vartype storage_account_resource_id: str
    :ivar name: A friendly name for the destination. This name should be unique across all
     destinations (regardless of type) within the data collection rule.
    :vartype name: str
    """

    table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the Storage Table."""
    storage_account_resource_id: Optional[str] = rest_field(
        name="storageAccountResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource ID of the storage account."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the destination. This name should be unique across all destinations
     (regardless of type) within the data collection rule."""

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

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

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


class StreamDeclaration(_Model):
    """Declaration of a custom stream.

    :ivar columns: List of columns used by data in this stream.
    :vartype columns: list[~azure.mgmt.monitor.models.ColumnDefinition]
    """

    columns: Optional[list["_models.ColumnDefinition"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of columns used by data in this stream."""

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

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

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


class SubscriptionScopeMetricDefinition(_Model):
    """Metric definition class specifies the metadata for a metric.

    :ivar is_dimension_required: Flag to indicate whether the dimension is required.
    :vartype is_dimension_required: bool
    :ivar resource_id: The resource identifier of the resource that emitted the metric.
    :vartype resource_id: str
    :ivar namespace: The namespace the metric belongs to.
    :vartype namespace: str
    :ivar name: The name and the display name of the metric, i.e. it is a localizable string.
    :vartype name: ~azure.mgmt.monitor.models.LocalizableString
    :ivar display_description: Detailed description of this metric.
    :vartype display_description: str
    :ivar category: Custom category name for this metric.
    :vartype category: str
    :ivar metric_class: The class of the metric. Known values are: "Availability", "Transactions",
     "Errors", "Latency", and "Saturation".
    :vartype metric_class: str or ~azure.mgmt.monitor.models.MetricClass
    :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds",
     "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified",
     "Cores", "MilliCores", "NanoCores", and "BitsPerSecond".
    :vartype unit: str or ~azure.mgmt.monitor.models.MetricUnit
    :ivar primary_aggregation_type: The primary aggregation type value defining how to use the
     values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and
     "Total".
    :vartype primary_aggregation_type: str or ~azure.mgmt.monitor.models.MetricAggregationType
    :ivar supported_aggregation_types: The collection of what aggregation types are supported.
    :vartype supported_aggregation_types: list[str or
     ~azure.mgmt.monitor.models.MetricAggregationType]
    :ivar metric_availabilities: The collection of what aggregation intervals are available to be
     queried.
    :vartype metric_availabilities: list[~azure.mgmt.monitor.models.MetricAvailability]
    :ivar id: The resource identifier of the metric definition.
    :vartype id: str
    :ivar dimensions: The name and the display name of the dimension, i.e. it is a localizable
     string.
    :vartype dimensions: list[~azure.mgmt.monitor.models.LocalizableString]
    """

    is_dimension_required: Optional[bool] = rest_field(
        name="isDimensionRequired", visibility=["read", "create", "update", "delete", "query"]
    )
    """Flag to indicate whether the dimension is required."""
    resource_id: Optional[str] = rest_field(
        name="resourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource identifier of the resource that emitted the metric."""
    namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace the metric belongs to."""
    name: Optional["_models.LocalizableString"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name and the display name of the metric, i.e. it is a localizable string."""
    display_description: Optional[str] = rest_field(
        name="displayDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """Detailed description of this metric."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Custom category name for this metric."""
    metric_class: Optional[Union[str, "_models.MetricClass"]] = rest_field(
        name="metricClass", visibility=["read", "create", "update", "delete", "query"]
    )
    """The class of the metric. Known values are: \"Availability\", \"Transactions\", \"Errors\",
     \"Latency\", and \"Saturation\"."""
    unit: Optional[Union[str, "_models.MetricUnit"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The unit of the metric. Known values are: \"Count\", \"Bytes\", \"Seconds\",
     \"CountPerSecond\", \"BytesPerSecond\", \"Percent\", \"MilliSeconds\", \"ByteSeconds\",
     \"Unspecified\", \"Cores\", \"MilliCores\", \"NanoCores\", and \"BitsPerSecond\"."""
    primary_aggregation_type: Optional[Union[str, "_models.MetricAggregationType"]] = rest_field(
        name="primaryAggregationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The primary aggregation type value defining how to use the values for display. Known values
     are: \"None\", \"Average\", \"Count\", \"Minimum\", \"Maximum\", and \"Total\"."""
    supported_aggregation_types: Optional[list[Union[str, "_models.MetricAggregationType"]]] = rest_field(
        name="supportedAggregationTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The collection of what aggregation types are supported."""
    metric_availabilities: Optional[list["_models.MetricAvailability"]] = rest_field(
        name="metricAvailabilities", visibility=["read", "create", "update", "delete", "query"]
    )
    """The collection of what aggregation intervals are available to be queried."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource identifier of the metric definition."""
    dimensions: Optional[list["_models.LocalizableString"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The name and the display name of the dimension, i.e. it is a localizable string."""

    @overload
    def __init__(
        self,
        *,
        is_dimension_required: Optional[bool] = None,
        resource_id: Optional[str] = None,
        namespace: Optional[str] = None,
        name: Optional["_models.LocalizableString"] = None,
        display_description: Optional[str] = None,
        category: Optional[str] = None,
        metric_class: Optional[Union[str, "_models.MetricClass"]] = None,
        unit: Optional[Union[str, "_models.MetricUnit"]] = None,
        primary_aggregation_type: Optional[Union[str, "_models.MetricAggregationType"]] = None,
        supported_aggregation_types: Optional[list[Union[str, "_models.MetricAggregationType"]]] = None,
        metric_availabilities: Optional[list["_models.MetricAvailability"]] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        dimensions: Optional[list["_models.LocalizableString"]] = None,
    ) -> None: ...

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

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


class SubscriptionScopeMetricsRequestBodyParameters(_Model):  # pylint: disable=name-too-long
    """Query parameters can also be specified in the body, specifying the same parameter in both the
    body and query parameters will result in an error.

    :ivar timespan: The timespan of the query. It is a string with the following format
     'startDateTime_ISO/endDateTime_ISO'.
    :vartype timespan: str
    :ivar interval: The interval (i.e. timegrain) of the query in ISO 8601 duration format.
     Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time
     span requested. *Examples: PT15M, PT1H, P1D, FULL*.
    :vartype interval: str
    :ivar metric_names: The names of the metrics (comma separated) to retrieve.
    :vartype metric_names: str
    :ivar aggregation: The list of aggregation types (comma separated) to retrieve.
    :vartype aggregation: str
    :ivar filter: The **$filter** is used to reduce the set of metric data
     returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C
     where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq
     ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B =
     ‘b2’**<br>This is invalid because the logical or operator cannot separate two different
     metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq
     ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq
     ‘a1’ and B eq ‘*’ and C eq ‘*’**.
    :vartype filter: str
    :ivar top: The maximum number of records to retrieve. Valid only if $filter is specified.
     Defaults to 10.
    :vartype top: int
    :ivar order_by: The aggregation to use for sorting results and the direction of the sort. Only
     one order can be specified. Examples: sum asc.
    :vartype order_by: str
    :ivar roll_up_by: Dimension name(s) to rollup results by. For example if you only want to see
     metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see
     separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle
     and Tacoma rolled up into one timeseries.
    :vartype roll_up_by: str
    :ivar result_type: Reduces the set of data collected. The syntax allowed depends on the
     operation. See the operation's description for details. Known values are: "Data" and
     "Metadata".
    :vartype result_type: str or ~azure.mgmt.monitor.models.MetricResultType
    :ivar metric_namespace: Metric namespace where the metrics you want reside.
    :vartype metric_namespace: str
    :ivar auto_adjust_timegrain: When set to true, if the timespan passed in is not supported by
     this metric, the API will return the result using the closest supported timespan. When set to
     false, an error is returned for invalid timespan parameters. Defaults to false.
    :vartype auto_adjust_timegrain: bool
    :ivar validate_dimensions: When set to false, invalid filter parameter values will be ignored.
     When set to true, an error is returned for invalid filter parameters. Defaults to true.
    :vartype validate_dimensions: bool
    """

    timespan: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The timespan of the query. It is a string with the following format
     'startDateTime_ISO/endDateTime_ISO'."""
    interval: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M.
     Special case for 'FULL' value that returns single datapoint for entire time span requested.
     *Examples: PT15M, PT1H, P1D, FULL*."""
    metric_names: Optional[str] = rest_field(
        name="metricNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The names of the metrics (comma separated) to retrieve."""
    aggregation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The list of aggregation types (comma separated) to retrieve."""
    filter: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric
     contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or
     b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid
     variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid
     because the logical or operator cannot separate two different metadata names.<br>- Return all
     time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq
     ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq
     ‘*’**."""
    top: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10."""
    order_by: Optional[str] = rest_field(name="orderBy", visibility=["read", "create", "update", "delete", "query"])
    """The aggregation to use for sorting results and the direction of the sort. Only one order can be
     specified. Examples: sum asc."""
    roll_up_by: Optional[str] = rest_field(name="rollUpBy", visibility=["read", "create", "update", "delete", "query"])
    """Dimension name(s) to rollup results by. For example if you only want to see metric values with
     a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for
     each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up
     into one timeseries."""
    result_type: Optional[Union[str, "_models.MetricResultType"]] = rest_field(
        name="resultType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Reduces the set of data collected. The syntax allowed depends on the operation. See the
     operation's description for details. Known values are: \"Data\" and \"Metadata\"."""
    metric_namespace: Optional[str] = rest_field(
        name="metricNamespace", visibility=["read", "create", "update", "delete", "query"]
    )
    """Metric namespace where the metrics you want reside."""
    auto_adjust_timegrain: Optional[bool] = rest_field(
        name="autoAdjustTimegrain", visibility=["read", "create", "update", "delete", "query"]
    )
    """When set to true, if the timespan passed in is not supported by this metric, the API will
     return the result using the closest supported timespan. When set to false, an error is returned
     for invalid timespan parameters. Defaults to false."""
    validate_dimensions: Optional[bool] = rest_field(
        name="validateDimensions", visibility=["read", "create", "update", "delete", "query"]
    )
    """When set to false, invalid filter parameter values will be ignored. When set to true, an error
     is returned for invalid filter parameters. Defaults to true."""

    @overload
    def __init__(
        self,
        *,
        timespan: Optional[str] = None,
        interval: Optional[str] = None,
        metric_names: Optional[str] = None,
        aggregation: Optional[str] = None,
        filter: Optional[str] = None,  # pylint: disable=redefined-builtin
        top: Optional[int] = None,
        order_by: Optional[str] = None,
        roll_up_by: Optional[str] = None,
        result_type: Optional[Union[str, "_models.MetricResultType"]] = None,
        metric_namespace: Optional[str] = None,
        auto_adjust_timegrain: Optional[bool] = None,
        validate_dimensions: 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 SyslogDataSource(_Model):
    """Definition of which syslog data will be collected and how it will be collected. Only collected
    from Linux machines.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownSyslogDataSourceStreams]
    :ivar facility_names: The list of facility names.
    :vartype facility_names: list[str or
     ~azure.mgmt.monitor.models.KnownSyslogDataSourceFacilityNames]
    :ivar log_levels: The log levels to collect.
    :vartype log_levels: list[str or ~azure.mgmt.monitor.models.KnownSyslogDataSourceLogLevels]
    :ivar transform_kql: The KQL query to transform the data source. This is a deprecated property
     and will be removed in future versions.
    :vartype transform_kql: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownSyslogDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to."""
    facility_names: Optional[list[Union[str, "_models.KnownSyslogDataSourceFacilityNames"]]] = rest_field(
        name="facilityNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of facility names."""
    log_levels: Optional[list[Union[str, "_models.KnownSyslogDataSourceLogLevels"]]] = rest_field(
        name="logLevels", visibility=["read", "create", "update", "delete", "query"]
    )
    """The log levels to collect."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform the data source. This is a deprecated property and will be removed
     in future versions."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownSyslogDataSourceStreams"]]] = None,
        facility_names: Optional[list[Union[str, "_models.KnownSyslogDataSourceFacilityNames"]]] = None,
        log_levels: Optional[list[Union[str, "_models.KnownSyslogDataSourceLogLevels"]]] = None,
        transform_kql: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class 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.monitor.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.monitor.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 TagsResource(_Model):
    """A container holding only the Tags for a resource, allowing the user to update the tags on a
    PrivateLinkScope instance.

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

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """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 TestNotificationDetailsResponse(_Model):
    """The details of the test notification results.

    :ivar context: The context info.
    :vartype context: ~azure.mgmt.monitor.models.Context
    :ivar state: The overall state. Required.
    :vartype state: str
    :ivar completed_time: The completed time.
    :vartype completed_time: str
    :ivar created_time: The created time.
    :vartype created_time: str
    :ivar action_details: The list of action detail.
    :vartype action_details: list[~azure.mgmt.monitor.models.ActionDetail]
    """

    context: Optional["_models.Context"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The context info."""
    state: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The overall state. Required."""
    completed_time: Optional[str] = rest_field(
        name="completedTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The completed time."""
    created_time: Optional[str] = rest_field(
        name="createdTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The created time."""
    action_details: Optional[list["_models.ActionDetail"]] = rest_field(
        name="actionDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of action detail."""

    @overload
    def __init__(
        self,
        *,
        state: str,
        context: Optional["_models.Context"] = None,
        completed_time: Optional[str] = None,
        created_time: Optional[str] = None,
        action_details: Optional[list["_models.ActionDetail"]] = None,
    ) -> None: ...

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

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


class TimeSeriesBaseline(_Model):
    """The baseline values for a single time series.

    :ivar aggregation: The aggregation type of the metric. Required.
    :vartype aggregation: str
    :ivar dimensions: The dimensions of this time series.
    :vartype dimensions: list[~azure.mgmt.monitor.models.MetricSingleDimension]
    :ivar timestamps: The list of timestamps of the baselines. Required.
    :vartype timestamps: list[~datetime.datetime]
    :ivar data: The baseline values for each sensitivity. Required.
    :vartype data: list[~azure.mgmt.monitor.models.SingleBaseline]
    :ivar metadata_values: The baseline metadata values.
    :vartype metadata_values: list[~azure.mgmt.monitor.models.BaselineMetadata]
    """

    aggregation: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The aggregation type of the metric. Required."""
    dimensions: Optional[list["_models.MetricSingleDimension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The dimensions of this time series."""
    timestamps: list[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The list of timestamps of the baselines. Required."""
    data: list["_models.SingleBaseline"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The baseline values for each sensitivity. Required."""
    metadata_values: Optional[list["_models.BaselineMetadata"]] = rest_field(
        name="metadataValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The baseline metadata values."""

    @overload
    def __init__(
        self,
        *,
        aggregation: str,
        timestamps: list[datetime.datetime],
        data: list["_models.SingleBaseline"],
        dimensions: Optional[list["_models.MetricSingleDimension"]] = None,
        metadata_values: Optional[list["_models.BaselineMetadata"]] = None,
    ) -> None: ...

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

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


class TimeSeriesElement(_Model):
    """A time series result type. The discriminator value is always TimeSeries in this case.

    :ivar metadatavalues: The metadata values returned if $filter was specified in the call.
    :vartype metadatavalues: list[~azure.mgmt.monitor.models.MetadataValue]
    :ivar data: An array of data points representing the metric values.  This is only returned if a
     result type of data is specified.
    :vartype data: list[~azure.mgmt.monitor.models.MetricValue]
    """

    metadatavalues: Optional[list["_models.MetadataValue"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The metadata values returned if $filter was specified in the call."""
    data: Optional[list["_models.MetricValue"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An array of data points representing the metric values.  This is only returned if a result type
     of data is specified."""

    @overload
    def __init__(
        self,
        *,
        metadatavalues: Optional[list["_models.MetadataValue"]] = None,
        data: Optional[list["_models.MetricValue"]] = None,
    ) -> None: ...

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

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


class TimeWindow(_Model):
    """A specific date-time for the profile.

    :ivar time_zone: the timezone of the start and end times for the profile. Some examples of
     valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard
     Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time,
     Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central
     Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific
     Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time,
     Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western
     Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard
     Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo
     Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time,
     Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard
     Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central
     European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard
     Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time,
     E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time,
     Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time,
     Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran
     Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius
     Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West
     Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time,
     Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard
     Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia
     Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W.
     Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time,
     Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard
     Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time,
     Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10,
     Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji
     Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands
     Standard Time.
    :vartype time_zone: str
    :ivar start: the start time for the profile in ISO 8601 format. Required.
    :vartype start: ~datetime.datetime
    :ivar end: the end time for the profile in ISO 8601 format. Required.
    :vartype end: ~datetime.datetime
    """

    time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"])
    """the timezone of the start and end times for the profile. Some examples of valid time zones are:
     Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard
     Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time
     (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central
     Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern
     Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time,
     Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA
     Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard
     Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia
     Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard
     Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe
     Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard
     Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB
     Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe
     Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel
     Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab
     Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran
     Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius
     Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West
     Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time,
     Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard
     Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia
     Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W.
     Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time,
     Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard
     Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time,
     Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10,
     Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji
     Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands
     Standard Time."""
    start: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339")
    """the start time for the profile in ISO 8601 format. Required."""
    end: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339")
    """the end time for the profile in ISO 8601 format. Required."""

    @overload
    def __init__(
        self,
        *,
        start: datetime.datetime,
        end: datetime.datetime,
        time_zone: Optional[str] = None,
    ) -> None: ...

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

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


class UserAssignedIdentity(_Model):
    """User assigned identity properties.

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

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


class UserIdentityProperties(_Model):
    """Properties of the user assigned identity.

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

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


class VoiceReceiver(_Model):
    """A voice receiver.

    :ivar name: The name of the voice receiver. Names must be unique across all receivers within an
     action group. Required.
    :vartype name: str
    :ivar country_code: The country code of the voice receiver. Required.
    :vartype country_code: str
    :ivar phone_number: The phone number of the voice receiver. Required.
    :vartype phone_number: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the voice receiver. Names must be unique across all receivers within an action
     group. Required."""
    country_code: str = rest_field(name="countryCode", visibility=["read", "create", "update", "delete", "query"])
    """The country code of the voice receiver. Required."""
    phone_number: str = rest_field(name="phoneNumber", visibility=["read", "create", "update", "delete", "query"])
    """The phone number of the voice receiver. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        country_code: str,
        phone_number: 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 WebhookNotification(_Model):
    """Webhook notification of an autoscale event.

    :ivar service_uri: the service address to receive the notification.
    :vartype service_uri: str
    :ivar properties: a property bag of settings. This value can be empty.
    :vartype properties: dict[str, str]
    """

    service_uri: Optional[str] = rest_field(
        name="serviceUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """the service address to receive the notification."""
    properties: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """a property bag of settings. This value can be empty."""

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

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

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


class WebhookReceiver(_Model):
    """A webhook receiver.

    :ivar name: The name of the webhook receiver. Names must be unique across all receivers within
     an action group. Required.
    :vartype name: str
    :ivar service_uri: The URI where webhooks should be sent. Required.
    :vartype service_uri: str
    :ivar use_common_alert_schema: Indicates whether to use common alert schema.
    :vartype use_common_alert_schema: bool
    :ivar use_aad_auth: Indicates whether or not use AAD authentication.
    :vartype use_aad_auth: bool
    :ivar object_id: Indicates the webhook app object Id for aad auth.
    :vartype object_id: str
    :ivar identifier_uri: Indicates the identifier uri for aad auth.
    :vartype identifier_uri: str
    :ivar tenant_id: Indicates the tenant id for aad auth.
    :vartype tenant_id: str
    :ivar managed_identity: The principal id of the managed identity. The value can be "None",
     "SystemAssigned".
    :vartype managed_identity: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the webhook receiver. Names must be unique across all receivers within an action
     group. Required."""
    service_uri: str = rest_field(name="serviceUri", visibility=["read", "create", "update", "delete", "query"])
    """The URI where webhooks should be sent. Required."""
    use_common_alert_schema: Optional[bool] = rest_field(
        name="useCommonAlertSchema", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether to use common alert schema."""
    use_aad_auth: Optional[bool] = rest_field(
        name="useAadAuth", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether or not use AAD authentication."""
    object_id: Optional[str] = rest_field(name="objectId", visibility=["read", "create", "update", "delete", "query"])
    """Indicates the webhook app object Id for aad auth."""
    identifier_uri: Optional[str] = rest_field(
        name="identifierUri", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates the identifier uri for aad auth."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """Indicates the tenant id for aad auth."""
    managed_identity: Optional[str] = rest_field(
        name="managedIdentity", visibility=["read", "create", "update", "delete", "query"]
    )
    """The principal id of the managed identity. The value can be \"None\", \"SystemAssigned\"."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        service_uri: str,
        use_common_alert_schema: Optional[bool] = None,
        use_aad_auth: Optional[bool] = None,
        object_id: Optional[str] = None,
        identifier_uri: Optional[str] = None,
        tenant_id: Optional[str] = None,
        managed_identity: Optional[str] = None,
    ) -> None: ...

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

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


class WebtestLocationAvailabilityCriteria(
    MetricAlertCriteria, discriminator="Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"
):
    """Specifies the metric alert rule criteria for a web test resource.

    :ivar web_test_id: The Application Insights web test Id. Required.
    :vartype web_test_id: str
    :ivar component_id: The Application Insights resource Id. Required.
    :vartype component_id: str
    :ivar failed_location_count: The number of failed locations. Required.
    :vartype failed_location_count: float
    :ivar odata_type: Specifies the type of the alert criteria. Previously undocumented values
     might be returned. Required. Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria.
    :vartype odata_type: str or
     ~azure.mgmt.monitor.models.MICROSOFT_AZURE_MONITOR_WEBTEST_LOCATION_AVAILABILITY_CRITERIA
    """

    web_test_id: str = rest_field(name="webTestId", visibility=["read", "create", "update", "delete", "query"])
    """The Application Insights web test Id. Required."""
    component_id: str = rest_field(name="componentId", visibility=["read", "create", "update", "delete", "query"])
    """The Application Insights resource Id. Required."""
    failed_location_count: float = rest_field(
        name="failedLocationCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed locations. Required."""
    odata_type: Literal[Odatatype.MICROSOFT_AZURE_MONITOR_WEBTEST_LOCATION_AVAILABILITY_CRITERIA] = rest_discriminator(name="odata.type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the type of the alert criteria. Previously undocumented values might be returned.
     Required. Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria."""

    @overload
    def __init__(
        self,
        *,
        web_test_id: str,
        component_id: str,
        failed_location_count: float,
    ) -> None: ...

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


class WindowsEventLogDataSource(_Model):
    """Definition of which Windows Event Log events will be collected and how they will be collected.
    Only collected from Windows machines.

    :ivar streams: List of streams that this data source will be sent to. A stream indicates what
     schema will be used for this data and usually what table in Log Analytics the data will be sent
     to.
    :vartype streams: list[str or ~azure.mgmt.monitor.models.KnownWindowsEventLogDataSourceStreams]
    :ivar x_path_queries: A list of Windows Event Log queries in XPATH format.
    :vartype x_path_queries: list[str]
    :ivar transform_kql: The KQL query to transform the data source. This is a deprecated property
     and will be removed in future versions.
    :vartype transform_kql: str
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: Optional[list[Union[str, "_models.KnownWindowsEventLogDataSourceStreams"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of streams that this data source will be sent to. A stream indicates what schema will be
     used for this data and usually what table in Log Analytics the data will be sent to."""
    x_path_queries: Optional[list[str]] = rest_field(
        name="xPathQueries", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of Windows Event Log queries in XPATH format."""
    transform_kql: Optional[str] = rest_field(
        name="transformKql", visibility=["read", "create", "update", "delete", "query"]
    )
    """The KQL query to transform the data source. This is a deprecated property and will be removed
     in future versions."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: Optional[list[Union[str, "_models.KnownWindowsEventLogDataSourceStreams"]]] = None,
        x_path_queries: Optional[list[str]] = None,
        transform_kql: Optional[str] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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


class WindowsFirewallLogsDataSource(_Model):
    """Enables Firewall logs to be collected by this data collection rule.

    :ivar streams: Firewall logs streams. Required.
    :vartype streams: list[str]
    :ivar profile_filter: Firewall logs profile filter.
    :vartype profile_filter: list[str or
     ~azure.mgmt.monitor.models.KnownWindowsFirewallLogsDataSourceProfileFilter]
    :ivar name: A friendly name for the data source. This name should be unique across all data
     sources (regardless of type) within the data collection rule.
    :vartype name: str
    """

    streams: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Firewall logs streams. Required."""
    profile_filter: Optional[list[Union[str, "_models.KnownWindowsFirewallLogsDataSourceProfileFilter"]]] = rest_field(
        name="profileFilter", visibility=["read", "create", "update", "delete", "query"]
    )
    """Firewall logs profile filter."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A friendly name for the data source. This name should be unique across all data sources
     (regardless of type) within the data collection rule."""

    @overload
    def __init__(
        self,
        *,
        streams: list[str],
        profile_filter: Optional[list[Union[str, "_models.KnownWindowsFirewallLogsDataSourceProfileFilter"]]] = None,
        name: Optional[str] = None,
    ) -> None: ...

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

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