# 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 (
    ActionType,
    AssessedResourceType,
    AuthenticationType,
    EnvironmentType,
    ExternalSecuritySolutionKindEnum,
    KindEnum,
    OfferingType,
    OrganizationMembershipType,
    ResourceIdentifierType,
    ServerVulnerabilityAssessmentsSettingKind,
    SettingKind,
    Source,
    SourceType,
)

if TYPE_CHECKING:
    from .. import models as _models


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

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


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

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


class ExternalSecuritySolution(ProxyResource):
    """Represents a security solution external to Microsoft Defender for Cloud which sends information
    to an OMS workspace and whose data is displayed by Microsoft Defender for Cloud.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AadExternalSecuritySolution, AtaExternalSecuritySolution, CefExternalSecuritySolution

    :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.security.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: any
    :ivar kind: The kind of the external solution. Known values are: "CEF", "ATA", and "AAD".
    :vartype kind: str or ~azure.mgmt.security.models.ExternalSecuritySolutionKindEnum
    :ivar location: Location where the resource is stored.
    :vartype location: str
    """

    __mapping__: dict[str, _Model] = {}
    properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource-specific properties for this resource."""
    kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
    """The kind of the external solution. Known values are: \"CEF\", \"ATA\", and \"AAD\"."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Location where the resource is stored."""

    @overload
    def __init__(
        self,
        *,
        properties: Optional[Any] = None,
        kind: 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 AadExternalSecuritySolution(ExternalSecuritySolution, discriminator="AAD"):
    """Represents an AAD identity protection solution which sends logs to an OMS workspace.

    :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.security.models.SystemData
    :ivar location: Location where the resource is stored.
    :vartype location: str
    :ivar properties: The external security solution properties for AAD solutions.
    :vartype properties: ~azure.mgmt.security.models.AadSolutionProperties
    :ivar kind: Required. AAD.
    :vartype kind: str or ~azure.mgmt.security.models.AAD
    """

    properties: Optional["_models.AadSolutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The external security solution properties for AAD solutions."""
    kind: Literal[ExternalSecuritySolutionKindEnum.AAD] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. AAD."""

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

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


class ExternalSecuritySolutionProperties(_Model):
    """The solution properties (correspond to the solution kind).

    :ivar device_vendor:
    :vartype device_vendor: str
    :ivar device_type:
    :vartype device_type: str
    :ivar workspace: Represents an OMS workspace to which the solution is connected.
    :vartype workspace: ~azure.mgmt.security.models.ConnectedWorkspace
    """

    device_vendor: Optional[str] = rest_field(
        name="deviceVendor", visibility=["read", "create", "update", "delete", "query"]
    )
    device_type: Optional[str] = rest_field(
        name="deviceType", visibility=["read", "create", "update", "delete", "query"]
    )
    workspace: Optional["_models.ConnectedWorkspace"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Represents an OMS workspace to which the solution is connected."""

    @overload
    def __init__(
        self,
        *,
        device_vendor: Optional[str] = None,
        device_type: Optional[str] = None,
        workspace: Optional["_models.ConnectedWorkspace"] = None,
    ) -> None: ...

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

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


class AadSolutionProperties(ExternalSecuritySolutionProperties):
    """The external security solution properties for AAD solutions.

    :ivar device_vendor:
    :vartype device_vendor: str
    :ivar device_type:
    :vartype device_type: str
    :ivar workspace: Represents an OMS workspace to which the solution is connected.
    :vartype workspace: ~azure.mgmt.security.models.ConnectedWorkspace
    :ivar connectivity_state: The connectivity state of the external AAD solution. Known values
     are: "Discovered", "NotLicensed", and "Connected".
    :vartype connectivity_state: str or ~azure.mgmt.security.models.AadConnectivityStateEnum
    """

    connectivity_state: Optional[Union[str, "_models.AadConnectivityStateEnum"]] = rest_field(
        name="connectivityState", visibility=["read", "create", "update", "delete", "query"]
    )
    """The connectivity state of the external AAD solution. Known values are: \"Discovered\",
     \"NotLicensed\", and \"Connected\"."""

    @overload
    def __init__(
        self,
        *,
        device_vendor: Optional[str] = None,
        device_type: Optional[str] = None,
        workspace: Optional["_models.ConnectedWorkspace"] = None,
        connectivity_state: Optional[Union[str, "_models.AadConnectivityStateEnum"]] = None,
    ) -> None: ...

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

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


class Authentication(_Model):
    """The environment authentication details.

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

    :ivar authentication_type: The authentication type. Required. "AccessToken"
    :vartype authentication_type: str or ~azure.mgmt.security.models.AuthenticationType
    """

    __mapping__: dict[str, _Model] = {}
    authentication_type: str = rest_discriminator(
        name="authenticationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The authentication type. Required. \"AccessToken\""""

    @overload
    def __init__(
        self,
        *,
        authentication_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 AccessTokenAuthentication(Authentication, discriminator="AccessToken"):
    """The environment authentication details.

    :ivar username: The user name that will be used while authenticating with the onboarded
     environment.
    :vartype username: str
    :ivar access_token: The access token that will be used while authenticating with the onboarded
     environment.
    :vartype access_token: str
    :ivar authentication_type: The authentication type. Required. AccessToken.
    :vartype authentication_type: str or ~azure.mgmt.security.models.ACCESS_TOKEN
    """

    username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The user name that will be used while authenticating with the onboarded environment."""
    access_token: Optional[str] = rest_field(
        name="accessToken", visibility=["read", "create", "update", "delete", "query"]
    )
    """The access token that will be used while authenticating with the onboarded environment."""
    authentication_type: Literal[AuthenticationType.ACCESS_TOKEN] = rest_discriminator(name="authenticationType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The authentication type. Required. AccessToken."""

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

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

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


class ActionableRemediation(_Model):
    """Configuration payload for PR Annotations.

    :ivar state: ActionableRemediation Setting. None - the setting was never set. Enabled -
     ActionableRemediation is enabled. Disabled - ActionableRemediation is disabled. Known values
     are: "None", "Disabled", and "Enabled".
    :vartype state: str or ~azure.mgmt.security.models.ActionableRemediationState
    :ivar category_configurations: Gets or sets list of categories and severity levels.
    :vartype category_configurations: list[~azure.mgmt.security.models.CategoryConfiguration]
    :ivar branch_configuration: Repository branch configuration for PR Annotations.
    :vartype branch_configuration: ~azure.mgmt.security.models.TargetBranchConfiguration
    :ivar inherit_from_parent_state: Update Settings.

     Enabled - Resource should inherit configurations from parent.
     Disabled - Resource should not inherit configurations from parent. Known values are: "Disabled"
     and "Enabled".
    :vartype inherit_from_parent_state: str or ~azure.mgmt.security.models.InheritFromParentState
    """

    state: Optional[Union[str, "_models.ActionableRemediationState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """ActionableRemediation Setting. None - the setting was never set. Enabled -
     ActionableRemediation is enabled. Disabled - ActionableRemediation is disabled. Known values
     are: \"None\", \"Disabled\", and \"Enabled\"."""
    category_configurations: Optional[list["_models.CategoryConfiguration"]] = rest_field(
        name="categoryConfigurations", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets list of categories and severity levels."""
    branch_configuration: Optional["_models.TargetBranchConfiguration"] = rest_field(
        name="branchConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Repository branch configuration for PR Annotations."""
    inherit_from_parent_state: Optional[Union[str, "_models.InheritFromParentState"]] = rest_field(
        name="inheritFromParentState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Update Settings.
     
     Enabled - Resource should inherit configurations from parent.
     Disabled - Resource should not inherit configurations from parent. Known values are:
     \"Disabled\" and \"Enabled\"."""

    @overload
    def __init__(
        self,
        *,
        state: Optional[Union[str, "_models.ActionableRemediationState"]] = None,
        category_configurations: Optional[list["_models.CategoryConfiguration"]] = None,
        branch_configuration: Optional["_models.TargetBranchConfiguration"] = None,
        inherit_from_parent_state: Optional[Union[str, "_models.InheritFromParentState"]] = None,
    ) -> None: ...

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

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


class AdditionalData(_Model):
    """Details of the sub-assessment.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ContainerRegistryVulnerabilityProperties, ServerVulnerabilityProperties,
    SqlServerVulnerabilityProperties

    :ivar assessed_resource_type: Sub-assessment resource type. Required. Known values are:
     "SqlServerVulnerability", "ContainerRegistryVulnerability", "ServerVulnerability", and
     "ServerVulnerabilityAssessment".
    :vartype assessed_resource_type: str or ~azure.mgmt.security.models.AssessedResourceType
    """

    __mapping__: dict[str, _Model] = {}
    assessed_resource_type: str = rest_discriminator(
        name="assessedResourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Sub-assessment resource type. Required. Known values are: \"SqlServerVulnerability\",
     \"ContainerRegistryVulnerability\", \"ServerVulnerability\", and
     \"ServerVulnerabilityAssessment\"."""

    @overload
    def __init__(
        self,
        *,
        assessed_resource_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 AdditionalWorkspacesProperties(_Model):
    """Properties of the additional workspaces.

    :ivar workspace: Workspace resource id.
    :vartype workspace: str
    :ivar type: Workspace type. "Sentinel"
    :vartype type: str or ~azure.mgmt.security.models.AdditionalWorkspaceType
    :ivar data_types: List of data types sent to workspace.
    :vartype data_types: list[str or ~azure.mgmt.security.models.AdditionalWorkspaceDataType]
    """

    workspace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Workspace resource id."""
    type: Optional[Union[str, "_models.AdditionalWorkspaceType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Workspace type. \"Sentinel\""""
    data_types: Optional[list[Union[str, "_models.AdditionalWorkspaceDataType"]]] = rest_field(
        name="dataTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of data types sent to workspace."""

    @overload
    def __init__(
        self,
        *,
        workspace: Optional[str] = None,
        type: Optional[Union[str, "_models.AdditionalWorkspaceType"]] = None,
        data_types: Optional[list[Union[str, "_models.AdditionalWorkspaceDataType"]]] = None,
    ) -> None: ...

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

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


class AdvancedThreatProtectionProperties(_Model):
    """The Advanced Threat Protection settings.

    :ivar is_enabled: Indicates whether Advanced Threat Protection is enabled.
    :vartype is_enabled: bool
    """

    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Advanced Threat Protection is enabled."""

    @overload
    def __init__(
        self,
        *,
        is_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 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.security.models.SystemData
    """


class AdvancedThreatProtectionSetting(ExtensionResource):
    """The Advanced Threat Protection 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.security.models.SystemData
    :ivar properties: The Advanced Threat Protection settings.
    :vartype properties: ~azure.mgmt.security.models.AdvancedThreatProtectionProperties
    """

    properties: Optional["_models.AdvancedThreatProtectionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Advanced Threat Protection settings."""

    __flattened_items = ["is_enabled"]

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

    @overload
    def __init__(self, mapping: Mapping[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 AgentlessConfiguration(_Model):
    """Details about Agentless configuration.

    :ivar agentless_enabled: Agentless Enablement states. Known values are: "Disabled", "Enabled",
     and "NotApplicable".
    :vartype agentless_enabled: str or ~azure.mgmt.security.models.AgentlessEnablement
    :ivar agentless_auto_discovery: AutoDiscovery states. Known values are: "Disabled", "Enabled",
     and "NotApplicable".
    :vartype agentless_auto_discovery: str or ~azure.mgmt.security.models.AutoDiscovery
    :ivar scanners: Gets or sets the scanners for the connector.
    :vartype scanners: list[str]
    :ivar inventory_list_type: Types for inventory list. Known values are: "Inclusion" and
     "Exclusion".
    :vartype inventory_list_type: str or ~azure.mgmt.security.models.InventoryListKind
    :ivar inventory_list: Gets or sets the inventory list for inclusion or exclusion from
     Agentless. Will be ignored if agentless auto-discovery is enabled.
    :vartype inventory_list: list[~azure.mgmt.security.models.InventoryList]
    """

    agentless_enabled: Optional[Union[str, "_models.AgentlessEnablement"]] = rest_field(
        name="agentlessEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Agentless Enablement states. Known values are: \"Disabled\", \"Enabled\", and
     \"NotApplicable\"."""
    agentless_auto_discovery: Optional[Union[str, "_models.AutoDiscovery"]] = rest_field(
        name="agentlessAutoDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """AutoDiscovery states. Known values are: \"Disabled\", \"Enabled\", and \"NotApplicable\"."""
    scanners: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the scanners for the connector."""
    inventory_list_type: Optional[Union[str, "_models.InventoryListKind"]] = rest_field(
        name="inventoryListType", visibility=["read", "create", "update", "delete", "query"]
    )
    """Types for inventory list. Known values are: \"Inclusion\" and \"Exclusion\"."""
    inventory_list: Optional[list["_models.InventoryList"]] = rest_field(
        name="inventoryList", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the inventory list for inclusion or exclusion from Agentless. Will be ignored if
     agentless auto-discovery is enabled."""

    @overload
    def __init__(
        self,
        *,
        agentless_enabled: Optional[Union[str, "_models.AgentlessEnablement"]] = None,
        agentless_auto_discovery: Optional[Union[str, "_models.AutoDiscovery"]] = None,
        scanners: Optional[list[str]] = None,
        inventory_list_type: Optional[Union[str, "_models.InventoryListKind"]] = None,
        inventory_list: Optional[list["_models.InventoryList"]] = None,
    ) -> None: ...

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

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


class Alert(ProxyResource):
    """Security alert.

    :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.security.models.SystemData
    :ivar properties: describes security alert properties.
    :vartype properties: ~azure.mgmt.security.models.AlertProperties
    """

    properties: Optional["_models.AlertProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """describes security alert properties."""

    __flattened_items = [
        "version",
        "alert_type",
        "system_alert_id",
        "product_component_name",
        "alert_display_name",
        "description",
        "severity",
        "intent",
        "start_time_utc",
        "end_time_utc",
        "resource_identifiers",
        "remediation_steps",
        "vendor_name",
        "status",
        "extended_links",
        "alert_uri",
        "time_generated_utc",
        "product_name",
        "processing_end_time_utc",
        "entities",
        "is_incident",
        "correlation_key",
        "extended_properties",
        "compromised_entity",
        "techniques",
        "sub_techniques",
        "supporting_evidence",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 AlertEntity(_Model):
    """Changing set of properties depending on the entity type.

    :ivar type: Type of entity.
    :vartype type: str
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """Type of entity."""


class AlertProperties(_Model):
    """describes security alert properties.

    :ivar version: Schema version.
    :vartype version: str
    :ivar alert_type: Unique identifier for the detection logic (all alert instances from the same
     detection logic will have the same alertType).
    :vartype alert_type: str
    :ivar system_alert_id: Unique identifier for the alert.
    :vartype system_alert_id: str
    :ivar product_component_name: The name of Azure Security Center pricing tier which powering
     this alert. Learn more:
     `https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing
     <https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing>`_.
    :vartype product_component_name: str
    :ivar alert_display_name: The display name of the alert.
    :vartype alert_display_name: str
    :ivar description: Description of the suspicious activity that was detected.
    :vartype description: str
    :ivar severity: The risk level of the threat that was detected. Learn more:
     `https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified
     <https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified>`_.
     Known values are: "Informational", "Low", "Medium", and "High".
    :vartype severity: str or ~azure.mgmt.security.models.AlertSeverity
    :ivar intent: The kill chain related intent behind the alert. For list of supported values, and
     explanations of Azure Security Center's supported kill chain intents. Known values are:
     "Unknown", "PreAttack", "InitialAccess", "Persistence", "PrivilegeEscalation",
     "DefenseEvasion", "CredentialAccess", "Discovery", "LateralMovement", "Execution",
     "Collection", "Exfiltration", "CommandAndControl", "Impact", "Probing", and "Exploitation".
    :vartype intent: str or ~azure.mgmt.security.models.Intent
    :ivar start_time_utc: The UTC time of the first event or activity included in the alert in
     ISO8601 format.
    :vartype start_time_utc: ~datetime.datetime
    :ivar end_time_utc: The UTC time of the last event or activity included in the alert in ISO8601
     format.
    :vartype end_time_utc: ~datetime.datetime
    :ivar resource_identifiers: The resource identifiers that can be used to direct the alert to
     the right product exposure group (tenant, workspace, subscription etc.). There can be multiple
     identifiers of different type per alert.
    :vartype resource_identifiers: list[~azure.mgmt.security.models.ResourceIdentifier]
    :ivar remediation_steps: Manual action items to take to remediate the alert.
    :vartype remediation_steps: list[str]
    :ivar vendor_name: The name of the vendor that raises the alert.
    :vartype vendor_name: str
    :ivar status: The life cycle status of the alert. Known values are: "Active", "InProgress",
     "Resolved", and "Dismissed".
    :vartype status: str or ~azure.mgmt.security.models.AlertStatus
    :ivar extended_links: Links related to the alert.
    :vartype extended_links: list[dict[str, str]]
    :ivar alert_uri: A direct link to the alert page in Azure Portal.
    :vartype alert_uri: str
    :ivar time_generated_utc: The UTC time the alert was generated in ISO8601 format.
    :vartype time_generated_utc: ~datetime.datetime
    :ivar product_name: The name of the product which published this alert (Microsoft Sentinel,
     Microsoft Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for
     Office, Microsoft Defender for Cloud Apps, and so on).
    :vartype product_name: str
    :ivar processing_end_time_utc: The UTC processing end time of the alert in ISO8601 format.
    :vartype processing_end_time_utc: ~datetime.datetime
    :ivar entities: A list of entities related to the alert.
    :vartype entities: list[~azure.mgmt.security.models.AlertEntity]
    :ivar is_incident: This field determines whether the alert is an incident (a compound grouping
     of several alerts) or a single alert.
    :vartype is_incident: bool
    :ivar correlation_key: Key for corelating related alerts. Alerts with the same correlation key
     considered to be related.
    :vartype correlation_key: str
    :ivar extended_properties: Custom properties for the alert.
    :vartype extended_properties: dict[str, str]
    :ivar compromised_entity: The display name of the resource most related to this alert.
    :vartype compromised_entity: str
    :ivar techniques: kill chain related techniques behind the alert.
    :vartype techniques: list[str]
    :ivar sub_techniques: Kill chain related sub-techniques behind the alert.
    :vartype sub_techniques: list[str]
    :ivar supporting_evidence: Changing set of properties depending on the supportingEvidence type.
    :vartype supporting_evidence: ~azure.mgmt.security.models.AlertPropertiesSupportingEvidence
    """

    version: Optional[str] = rest_field(visibility=["read"])
    """Schema version."""
    alert_type: Optional[str] = rest_field(name="alertType", visibility=["read"])
    """Unique identifier for the detection logic (all alert instances from the same detection logic
     will have the same alertType)."""
    system_alert_id: Optional[str] = rest_field(name="systemAlertId", visibility=["read"])
    """Unique identifier for the alert."""
    product_component_name: Optional[str] = rest_field(name="productComponentName", visibility=["read"])
    """The name of Azure Security Center pricing tier which powering this alert. Learn more:
     `https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing
     <https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing>`_."""
    alert_display_name: Optional[str] = rest_field(name="alertDisplayName", visibility=["read"])
    """The display name of the alert."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Description of the suspicious activity that was detected."""
    severity: Optional[Union[str, "_models.AlertSeverity"]] = rest_field(visibility=["read"])
    """The risk level of the threat that was detected. Learn more:
     `https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified
     <https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified>`_.
     Known values are: \"Informational\", \"Low\", \"Medium\", and \"High\"."""
    intent: Optional[Union[str, "_models.Intent"]] = rest_field(visibility=["read"])
    """The kill chain related intent behind the alert. For list of supported values, and explanations
     of Azure Security Center's supported kill chain intents. Known values are: \"Unknown\",
     \"PreAttack\", \"InitialAccess\", \"Persistence\", \"PrivilegeEscalation\", \"DefenseEvasion\",
     \"CredentialAccess\", \"Discovery\", \"LateralMovement\", \"Execution\", \"Collection\",
     \"Exfiltration\", \"CommandAndControl\", \"Impact\", \"Probing\", and \"Exploitation\"."""
    start_time_utc: Optional[datetime.datetime] = rest_field(name="startTimeUtc", visibility=["read"], format="rfc3339")
    """The UTC time of the first event or activity included in the alert in ISO8601 format."""
    end_time_utc: Optional[datetime.datetime] = rest_field(name="endTimeUtc", visibility=["read"], format="rfc3339")
    """The UTC time of the last event or activity included in the alert in ISO8601 format."""
    resource_identifiers: Optional[list["_models.ResourceIdentifier"]] = rest_field(
        name="resourceIdentifiers", visibility=["read"]
    )
    """The resource identifiers that can be used to direct the alert to the right product exposure
     group (tenant, workspace, subscription etc.). There can be multiple identifiers of different
     type per alert."""
    remediation_steps: Optional[list[str]] = rest_field(name="remediationSteps", visibility=["read"])
    """Manual action items to take to remediate the alert."""
    vendor_name: Optional[str] = rest_field(name="vendorName", visibility=["read"])
    """The name of the vendor that raises the alert."""
    status: Optional[Union[str, "_models.AlertStatus"]] = rest_field(visibility=["read"])
    """The life cycle status of the alert. Known values are: \"Active\", \"InProgress\", \"Resolved\",
     and \"Dismissed\"."""
    extended_links: Optional[list[dict[str, str]]] = rest_field(name="extendedLinks", visibility=["read"])
    """Links related to the alert."""
    alert_uri: Optional[str] = rest_field(name="alertUri", visibility=["read"])
    """A direct link to the alert page in Azure Portal."""
    time_generated_utc: Optional[datetime.datetime] = rest_field(
        name="timeGeneratedUtc", visibility=["read"], format="rfc3339"
    )
    """The UTC time the alert was generated in ISO8601 format."""
    product_name: Optional[str] = rest_field(name="productName", visibility=["read"])
    """The name of the product which published this alert (Microsoft Sentinel, Microsoft Defender for
     Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender
     for Cloud Apps, and so on)."""
    processing_end_time_utc: Optional[datetime.datetime] = rest_field(
        name="processingEndTimeUtc", visibility=["read"], format="rfc3339"
    )
    """The UTC processing end time of the alert in ISO8601 format."""
    entities: Optional[list["_models.AlertEntity"]] = rest_field(visibility=["read"])
    """A list of entities related to the alert."""
    is_incident: Optional[bool] = rest_field(name="isIncident", visibility=["read"])
    """This field determines whether the alert is an incident (a compound grouping of several alerts)
     or a single alert."""
    correlation_key: Optional[str] = rest_field(name="correlationKey", visibility=["read"])
    """Key for corelating related alerts. Alerts with the same correlation key considered to be
     related."""
    extended_properties: Optional[dict[str, str]] = rest_field(
        name="extendedProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Custom properties for the alert."""
    compromised_entity: Optional[str] = rest_field(name="compromisedEntity", visibility=["read"])
    """The display name of the resource most related to this alert."""
    techniques: Optional[list[str]] = rest_field(visibility=["read"])
    """kill chain related techniques behind the alert."""
    sub_techniques: Optional[list[str]] = rest_field(name="subTechniques", visibility=["read"])
    """Kill chain related sub-techniques behind the alert."""
    supporting_evidence: Optional["_models.AlertPropertiesSupportingEvidence"] = rest_field(
        name="supportingEvidence", visibility=["read", "create", "update", "delete", "query"]
    )
    """Changing set of properties depending on the supportingEvidence type."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        extended_properties: Optional[dict[str, str]] = None,
        supporting_evidence: Optional["_models.AlertPropertiesSupportingEvidence"] = None,
    ) -> None: ...

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

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


class AlertPropertiesSupportingEvidence(_Model):
    """Changing set of properties depending on the supportingEvidence type.

    :ivar type: Type of the supportingEvidence.
    :vartype type: str
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """Type of the supportingEvidence."""


class AlertSimulatorRequestProperties(_Model):
    """Describes properties of an alert simulation request.

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

    :ivar kind: The kind of alert simulation. Required. "Bundles"
    :vartype kind: str or ~azure.mgmt.security.models.KindEnum
    """

    __mapping__: dict[str, _Model] = {}
    kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
    """The kind of alert simulation. Required. \"Bundles\""""

    @overload
    def __init__(
        self,
        *,
        kind: 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 AlertSimulatorBundlesRequestProperties(AlertSimulatorRequestProperties, discriminator="Bundles"):
    """Simulate alerts according to this bundles.

    :ivar bundles: Bundles list.
    :vartype bundles: list[str or ~azure.mgmt.security.models.BundleType]
    :ivar kind: The kind of alert simulation. Required. Simulate alerts according to bundles.
    :vartype kind: str or ~azure.mgmt.security.models.BUNDLES
    """

    bundles: Optional[list[Union[str, "_models.BundleType"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Bundles list."""
    kind: Literal[KindEnum.BUNDLES] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The kind of alert simulation. Required. Simulate alerts according to bundles."""

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

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


class AlertSimulatorRequestBody(_Model):
    """Alert Simulator request body.

    :ivar properties: Alert Simulator request body data.
    :vartype properties: ~azure.mgmt.security.models.AlertSimulatorRequestProperties
    """

    properties: Optional["_models.AlertSimulatorRequestProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Alert Simulator request body data."""

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

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

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


class AlertsSuppressionRule(ProxyResource):
    """Describes the suppression rule.

    :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.security.models.SystemData
    :ivar properties: describes AlertsSuppressionRule properties.
    :vartype properties: ~azure.mgmt.security.models.AlertsSuppressionRuleProperties
    """

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

    __flattened_items = [
        "alert_type",
        "last_modified_utc",
        "expiration_date_utc",
        "reason",
        "state",
        "comment",
        "suppression_alerts_scope",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 AlertsSuppressionRuleProperties(_Model):
    """describes AlertsSuppressionRule properties.

    :ivar alert_type: Type of the alert to automatically suppress. For all alert types, use '*'.
     Required.
    :vartype alert_type: str
    :ivar last_modified_utc: The last time this rule was modified.
    :vartype last_modified_utc: ~datetime.datetime
    :ivar expiration_date_utc: Expiration date of the rule, if value is not provided or provided as
     null there will no expiration at all.
    :vartype expiration_date_utc: ~datetime.datetime
    :ivar reason: The reason for dismissing the alert. Required.
    :vartype reason: str
    :ivar state: Possible states of the rule. Required. Known values are: "Enabled", "Disabled",
     and "Expired".
    :vartype state: str or ~azure.mgmt.security.models.RuleState
    :ivar comment: Any comment regarding the rule.
    :vartype comment: str
    :ivar suppression_alerts_scope: The suppression conditions.
    :vartype suppression_alerts_scope: ~azure.mgmt.security.models.SuppressionAlertsScope
    """

    alert_type: str = rest_field(name="alertType", visibility=["read", "create", "update", "delete", "query"])
    """Type of the alert to automatically suppress. For all alert types, use '*'. Required."""
    last_modified_utc: Optional[datetime.datetime] = rest_field(
        name="lastModifiedUtc", visibility=["read"], format="rfc3339"
    )
    """The last time this rule was modified."""
    expiration_date_utc: Optional[datetime.datetime] = rest_field(
        name="expirationDateUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Expiration date of the rule, if value is not provided or provided as null there will no
     expiration at all."""
    reason: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The reason for dismissing the alert. Required."""
    state: Union[str, "_models.RuleState"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Possible states of the rule. Required. Known values are: \"Enabled\", \"Disabled\", and
     \"Expired\"."""
    comment: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Any comment regarding the rule."""
    suppression_alerts_scope: Optional["_models.SuppressionAlertsScope"] = rest_field(
        name="suppressionAlertsScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """The suppression conditions."""

    @overload
    def __init__(
        self,
        *,
        alert_type: str,
        reason: str,
        state: Union[str, "_models.RuleState"],
        expiration_date_utc: Optional[datetime.datetime] = None,
        comment: Optional[str] = None,
        suppression_alerts_scope: Optional["_models.SuppressionAlertsScope"] = None,
    ) -> None: ...

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

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


class AlertSyncSettingProperties(_Model):
    """The alert sync setting properties.

    :ivar enabled: Is the alert sync setting enabled. Required.
    :vartype enabled: bool
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is the alert sync setting enabled. Required."""

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

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

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


class Setting(ProxyResource):
    """The kind of the security setting.

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

    :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.security.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: any
    :ivar kind: the kind of the settings string. Required. Known values are: "DataExportSettings",
     "AlertSuppressionSetting", and "AlertSyncSettings".
    :vartype kind: str or ~azure.mgmt.security.models.SettingKind
    """

    __mapping__: dict[str, _Model] = {}
    properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource-specific properties for this resource."""
    kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
    """the kind of the settings string. Required. Known values are: \"DataExportSettings\",
     \"AlertSuppressionSetting\", and \"AlertSyncSettings\"."""

    @overload
    def __init__(
        self,
        *,
        kind: str,
        properties: Optional[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 AlertSyncSettings(Setting, discriminator="AlertSyncSettings"):
    """Represents an alert sync 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.security.models.SystemData
    :ivar properties: Alert sync setting data.
    :vartype properties: ~azure.mgmt.security.models.AlertSyncSettingProperties
    :ivar kind: the kind of the settings string. Required. AlertSyncSettings.
    :vartype kind: str or ~azure.mgmt.security.models.ALERT_SYNC_SETTINGS
    """

    properties: Optional["_models.AlertSyncSettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Alert sync setting data."""
    kind: Literal[SettingKind.ALERT_SYNC_SETTINGS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """the kind of the settings string. Required. AlertSyncSettings."""

    __flattened_items = ["enabled"]

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

    @overload
    def __init__(self, mapping: Mapping[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 AllowedConnectionsResource(ProxyResource):
    """The resource whose properties describes the allowed traffic between Azure resources.

    :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.security.models.SystemData
    :ivar properties: Describes the allowed traffic between Azure resources.
    :vartype properties: ~azure.mgmt.security.models.AllowedConnectionsResourceProperties
    :ivar location: Location where the resource is stored. Required.
    :vartype location: str
    """

    properties: Optional["_models.AllowedConnectionsResourceProperties"] = rest_field(visibility=["read"])
    """Describes the allowed traffic between Azure resources."""
    location: str = rest_field(visibility=["read"])
    """Location where the resource is stored. Required."""

    __flattened_items = ["calculated_date_time", "connectable_resources"]


class AllowedConnectionsResourceProperties(_Model):
    """Describes the allowed traffic between Azure resources.

    :ivar calculated_date_time: The UTC time on which the allowed connections resource was
     calculated.
    :vartype calculated_date_time: ~datetime.datetime
    :ivar connectable_resources: List of connectable resources.
    :vartype connectable_resources: list[~azure.mgmt.security.models.ConnectableResource]
    """

    calculated_date_time: Optional[datetime.datetime] = rest_field(
        name="calculatedDateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC time on which the allowed connections resource was calculated."""
    connectable_resources: Optional[list["_models.ConnectableResource"]] = rest_field(
        name="connectableResources", visibility=["read"]
    )
    """List of connectable resources."""


class CustomAlertRule(_Model):
    """A custom alert rule.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AllowlistCustomAlertRule, DenylistCustomAlertRule, ListCustomAlertRule,
    ThresholdCustomAlertRule, TimeWindowCustomAlertRule

    :ivar display_name: The display name of the custom alert.
    :vartype display_name: str
    :ivar description: The description of the custom alert.
    :vartype description: str
    :ivar is_enabled: Status of the custom alert. Required.
    :vartype is_enabled: bool
    :ivar rule_type: The type of the custom alert rule. Required. Default value is None.
    :vartype rule_type: str
    """

    __mapping__: dict[str, _Model] = {}
    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """The display name of the custom alert."""
    description: Optional[str] = rest_field(visibility=["read"])
    """The description of the custom alert."""
    is_enabled: bool = rest_field(name="isEnabled", visibility=["read", "create", "update", "delete", "query"])
    """Status of the custom alert. Required."""
    rule_type: str = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])
    """The type of the custom alert rule. Required. Default value is None."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: bool,
        rule_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 ListCustomAlertRule(CustomAlertRule, discriminator="ListCustomAlertRule"):
    """A List custom alert rule.

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

    :ivar display_name: The display name of the custom alert.
    :vartype display_name: str
    :ivar description: The description of the custom alert.
    :vartype description: str
    :ivar is_enabled: Status of the custom alert. Required.
    :vartype is_enabled: bool
    :ivar value_type: The value type of the items in the list. Known values are: "IpCidr" and
     "String".
    :vartype value_type: str or ~azure.mgmt.security.models.ValueType
    :ivar rule_type: Required. Default value is "ListCustomAlertRule".
    :vartype rule_type: str
    """

    __mapping__: dict[str, _Model] = {}
    value_type: Optional[Union[str, "_models.ValueType"]] = rest_field(name="valueType", visibility=["read"])
    """The value type of the items in the list. Known values are: \"IpCidr\" and \"String\"."""
    rule_type: Literal["ListCustomAlertRule"] = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. Default value is \"ListCustomAlertRule\"."""

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

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


class AllowlistCustomAlertRule(ListCustomAlertRule, discriminator="AllowlistCustomAlertRule"):
    """A custom alert rule that checks if a value (depends on the custom alert type) is allowed.

    :ivar display_name: The display name of the custom alert.
    :vartype display_name: str
    :ivar description: The description of the custom alert.
    :vartype description: str
    :ivar is_enabled: Status of the custom alert. Required.
    :vartype is_enabled: bool
    :ivar value_type: The value type of the items in the list. Known values are: "IpCidr" and
     "String".
    :vartype value_type: str or ~azure.mgmt.security.models.ValueType
    :ivar allowlist_values: The values to allow. The format of the values depends on the rule type.
     Required.
    :vartype allowlist_values: list[str]
    :ivar rule_type: Required. Default value is "AllowlistCustomAlertRule".
    :vartype rule_type: str
    """

    allowlist_values: list[str] = rest_field(
        name="allowlistValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The values to allow. The format of the values depends on the rule type. Required."""
    rule_type: Literal["AllowlistCustomAlertRule"] = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. Default value is \"AllowlistCustomAlertRule\"."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: bool,
        allowlist_values: 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)
        self.rule_type = "AllowlistCustomAlertRule"  # type: ignore


class ApiCollection(ExtensionResource):
    """An API collection as represented by Microsoft Defender for APIs.

    :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.security.models.SystemData
    :ivar properties: Describes the properties of an API collection.
    :vartype properties: ~azure.mgmt.security.models.ApiCollectionProperties
    """

    properties: Optional["_models.ApiCollectionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the properties of an API collection."""

    __flattened_items = [
        "provisioning_state",
        "display_name",
        "discovered_via",
        "base_url",
        "number_of_api_endpoints",
        "number_of_inactive_api_endpoints",
        "number_of_unauthenticated_api_endpoints",
        "number_of_external_api_endpoints",
        "number_of_api_endpoints_with_sensitive_data_exposed",
        "sensitivity_label",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 ApiCollectionProperties(_Model):
    """Describes the properties of an API collection.

    :ivar provisioning_state: Gets the provisioning state of the API collection. Known values are:
     "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Canceled", and "InProgress".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.ProvisioningState
    :ivar display_name: The display name of the API collection.
    :vartype display_name: str
    :ivar discovered_via: The resource Id of the resource from where this API collection was
     discovered.
    :vartype discovered_via: str
    :ivar base_url: The base URI for this API collection. All endpoints of this API collection
     extend this base URI.
    :vartype base_url: str
    :ivar number_of_api_endpoints: The number of API endpoints discovered in this API collection.
    :vartype number_of_api_endpoints: int
    :ivar number_of_inactive_api_endpoints: The number of API endpoints in this API collection that
     have not received any API traffic in the last 30 days.
    :vartype number_of_inactive_api_endpoints: int
    :ivar number_of_unauthenticated_api_endpoints: The number of API endpoints in this API
     collection that are unauthenticated.
    :vartype number_of_unauthenticated_api_endpoints: int
    :ivar number_of_external_api_endpoints: The number of API endpoints in this API collection for
     which API traffic from the internet was observed.
    :vartype number_of_external_api_endpoints: int
    :ivar number_of_api_endpoints_with_sensitive_data_exposed: The number of API endpoints in this
     API collection which are exposing sensitive data in their requests and/or responses.
    :vartype number_of_api_endpoints_with_sensitive_data_exposed: int
    :ivar sensitivity_label: The highest priority sensitivity label from Microsoft Purview in this
     API collection.
    :vartype sensitivity_label: str
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """Gets the provisioning state of the API collection. Known values are: \"Succeeded\",
     \"Creating\", \"Updating\", \"Deleting\", \"Failed\", \"Canceled\", and \"InProgress\"."""
    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """The display name of the API collection."""
    discovered_via: Optional[str] = rest_field(name="discoveredVia", visibility=["read"])
    """The resource Id of the resource from where this API collection was discovered."""
    base_url: Optional[str] = rest_field(name="baseUrl", visibility=["read"])
    """The base URI for this API collection. All endpoints of this API collection extend this base
     URI."""
    number_of_api_endpoints: Optional[int] = rest_field(name="numberOfApiEndpoints", visibility=["read"])
    """The number of API endpoints discovered in this API collection."""
    number_of_inactive_api_endpoints: Optional[int] = rest_field(
        name="numberOfInactiveApiEndpoints", visibility=["read"]
    )
    """The number of API endpoints in this API collection that have not received any API traffic in
     the last 30 days."""
    number_of_unauthenticated_api_endpoints: Optional[int] = rest_field(
        name="numberOfUnauthenticatedApiEndpoints", visibility=["read"]
    )
    """The number of API endpoints in this API collection that are unauthenticated."""
    number_of_external_api_endpoints: Optional[int] = rest_field(
        name="numberOfExternalApiEndpoints", visibility=["read"]
    )
    """The number of API endpoints in this API collection for which API traffic from the internet was
     observed."""
    number_of_api_endpoints_with_sensitive_data_exposed: Optional[int] = rest_field(
        name="numberOfApiEndpointsWithSensitiveDataExposed", visibility=["read"]
    )
    """The number of API endpoints in this API collection which are exposing sensitive data in their
     requests and/or responses."""
    sensitivity_label: Optional[str] = rest_field(name="sensitivityLabel", visibility=["read"])
    """The highest priority sensitivity label from Microsoft Purview in this API collection."""


class Application(ProxyResource):
    """Security Application over a given scope.

    :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.security.models.SystemData
    :ivar properties: Properties of a security application.
    :vartype properties: ~azure.mgmt.security.models.ApplicationProperties
    """

    properties: Optional["_models.ApplicationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a security application."""

    __flattened_items = ["display_name", "description", "source_resource_type", "condition_sets"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ApplicationProperties(_Model):
    """Describes properties of an application.

    :ivar display_name: display name of the application.
    :vartype display_name: str
    :ivar description: description of the application.
    :vartype description: str
    :ivar source_resource_type: The application source, what it affects, e.g. Assessments.
     Required. "Assessments"
    :vartype source_resource_type: str or ~azure.mgmt.security.models.ApplicationSourceResourceType
    :ivar condition_sets: The application conditionSets - see examples. Required.
    :vartype condition_sets: list[any]
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """display name of the application."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """description of the application."""
    source_resource_type: Union[str, "_models.ApplicationSourceResourceType"] = rest_field(
        name="sourceResourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The application source, what it affects, e.g. Assessments. Required. \"Assessments\""""
    condition_sets: list[Any] = rest_field(
        name="conditionSets", visibility=["read", "create", "update", "delete", "query"]
    )
    """The application conditionSets - see examples. Required."""

    @overload
    def __init__(
        self,
        *,
        source_resource_type: Union[str, "_models.ApplicationSourceResourceType"],
        condition_sets: list[Any],
        display_name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

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

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


class ArcAutoProvisioning(_Model):
    """The ARC autoprovisioning configuration.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is arc auto provisioning enabled."""
    configuration: Optional["_models.ArcAutoProvisioningConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration for servers Arc auto provisioning for a given environment."""

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

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

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


class ArcAutoProvisioningAws(ArcAutoProvisioning):
    """The ARC autoprovisioning configuration for an AWS environment.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.ArcAutoProvisioningConfiguration"] = None,
        cloud_role_arn: 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 ArcAutoProvisioningConfiguration(_Model):
    """Configuration for servers Arc auto provisioning for a given environment.

    :ivar proxy: Optional HTTP proxy endpoint to use for the Arc agent.
    :vartype proxy: str
    :ivar private_link_scope: Optional Arc private link scope resource id to link the Arc agent.
    :vartype private_link_scope: str
    """

    proxy: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional HTTP proxy endpoint to use for the Arc agent."""
    private_link_scope: Optional[str] = rest_field(
        name="privateLinkScope", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional Arc private link scope resource id to link the Arc agent."""

    @overload
    def __init__(
        self,
        *,
        proxy: Optional[str] = None,
        private_link_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 ArcAutoProvisioningGcp(ArcAutoProvisioning):
    """The ARC autoprovisioning configuration for an GCP environment.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    """

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

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

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


class AscLocation(ProxyResource):
    """The ASC location of the subscription is in the "name" field.

    :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.security.models.SystemData
    :ivar properties: An empty set of properties.
    :vartype properties: any
    """

    properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An empty set of properties."""

    __flattened_items = [""]

    @overload
    def __init__(
        self,
        *,
        properties: Optional[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:
        _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 AssessmentLinks(_Model):
    """Links relevant to the assessment.

    :ivar azure_portal_uri: Link to assessment in Azure Portal.
    :vartype azure_portal_uri: str
    """

    azure_portal_uri: Optional[str] = rest_field(name="azurePortalUri", visibility=["read"])
    """Link to assessment in Azure Portal."""


class AssessmentStatus(_Model):
    """The result of the assessment.

    :ivar code: Programmatic code for the status of the assessment. Required. Known values are:
     "Healthy", "Unhealthy", and "NotApplicable".
    :vartype code: str or ~azure.mgmt.security.models.AssessmentStatusCode
    :ivar cause: Programmatic code for the cause of the assessment status.
    :vartype cause: str
    :ivar description: Human readable description of the assessment status.
    :vartype description: str
    """

    code: Union[str, "_models.AssessmentStatusCode"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Programmatic code for the status of the assessment. Required. Known values are: \"Healthy\",
     \"Unhealthy\", and \"NotApplicable\"."""
    cause: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Programmatic code for the cause of the assessment status."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Human readable description of the assessment status."""

    @overload
    def __init__(
        self,
        *,
        code: Union[str, "_models.AssessmentStatusCode"],
        cause: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

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

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


class AssessmentStatusResponse(AssessmentStatus):
    """The result of the assessment.

    :ivar code: Programmatic code for the status of the assessment. Required. Known values are:
     "Healthy", "Unhealthy", and "NotApplicable".
    :vartype code: str or ~azure.mgmt.security.models.AssessmentStatusCode
    :ivar cause: Programmatic code for the cause of the assessment status.
    :vartype cause: str
    :ivar description: Human readable description of the assessment status.
    :vartype description: str
    :ivar first_evaluation_date: The time that the assessment was created and first evaluated.
     Returned as UTC time in ISO 8601 format.
    :vartype first_evaluation_date: ~datetime.datetime
    :ivar status_change_date: The time that the status of the assessment last changed. Returned as
     UTC time in ISO 8601 format.
    :vartype status_change_date: ~datetime.datetime
    """

    first_evaluation_date: Optional[datetime.datetime] = rest_field(
        name="firstEvaluationDate", visibility=["read"], format="rfc3339"
    )
    """The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601
     format."""
    status_change_date: Optional[datetime.datetime] = rest_field(
        name="statusChangeDate", visibility=["read"], format="rfc3339"
    )
    """The time that the status of the assessment last changed. Returned as UTC time in ISO 8601
     format."""

    @overload
    def __init__(
        self,
        *,
        code: Union[str, "_models.AssessmentStatusCode"],
        cause: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

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

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


class AssignedAssessmentItem(_Model):
    """Describe the properties of a security assessment object reference (by key).

    :ivar assessment_key: Unique key to a security assessment object.
    :vartype assessment_key: str
    """

    assessment_key: Optional[str] = rest_field(
        name="assessmentKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """Unique key to a security assessment object."""

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

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

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


class AssignedComponentItem(_Model):
    """describe the properties of a security assessment object reference (by key).

    :ivar key: unique key to a security assessment object.
    :vartype key: str
    """

    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """unique key to a security assessment object."""

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

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

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


class AssignedStandardItem(_Model):
    """Describe the properties of a of a standard assignments object reference.

    :ivar id: Full resourceId of the Microsoft.Security/standard object.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Full resourceId of the Microsoft.Security/standard object."""

    @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 Assignment(ProxyResource):
    """Security Assignment on a resource group over a given scope.

    :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.security.models.SystemData
    :ivar properties: Properties of a security assignment.
    :vartype properties: ~azure.mgmt.security.models.AssignmentProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar kind: Kind of the resource.
    :vartype kind: str
    :ivar etag: Entity tag is used for comparing two or more entities from the same requested
     resource.
    :vartype etag: str
    """

    properties: Optional["_models.AssignmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a security assignment."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the resource."""
    etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Entity tag is used for comparing two or more entities from the same requested resource."""

    __flattened_items = [
        "display_name",
        "description",
        "assigned_standard",
        "assigned_component",
        "scope",
        "effect",
        "expires_on",
        "additional_data",
        "metadata",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.AssignmentProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        location: Optional[str] = None,
        kind: Optional[str] = None,
        etag: 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 AssignmentProperties(_Model):
    """Describes the properties of a standardAssignment.

    :ivar display_name: display name of the standardAssignment.
    :vartype display_name: str
    :ivar description: description of the standardAssignment.
    :vartype description: str
    :ivar assigned_standard: Standard item with key as applied to this standard assignment over the
     given scope.
    :vartype assigned_standard: ~azure.mgmt.security.models.AssignedStandardItem
    :ivar assigned_component: Component item with key as applied to this standard assignment over
     the given scope.
    :vartype assigned_component: ~azure.mgmt.security.models.AssignedComponentItem
    :ivar scope: Scope to which the standardAssignment applies - can be a subscription path or a
     resource group under that subscription.
    :vartype scope: str
    :ivar effect: expected effect of this assignment (Disable/Exempt/etc).
    :vartype effect: str
    :ivar expires_on: Expiration date of this assignment as a full ISO date.
    :vartype expires_on: ~datetime.datetime
    :ivar additional_data: Additional data about the assignment.
    :vartype additional_data: ~azure.mgmt.security.models.AssignmentPropertiesAdditionalData
    :ivar metadata: The assignment metadata. Metadata is an open ended object and is typically a
     collection of key value pairs.
    :vartype metadata: any
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """display name of the standardAssignment."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """description of the standardAssignment."""
    assigned_standard: Optional["_models.AssignedStandardItem"] = rest_field(
        name="assignedStandard", visibility=["read", "create", "update", "delete", "query"]
    )
    """Standard item with key as applied to this standard assignment over the given scope."""
    assigned_component: Optional["_models.AssignedComponentItem"] = rest_field(
        name="assignedComponent", visibility=["read", "create", "update", "delete", "query"]
    )
    """Component item with key as applied to this standard assignment over the given scope."""
    scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Scope to which the standardAssignment applies - can be a subscription path or a resource group
     under that subscription."""
    effect: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """expected effect of this assignment (Disable/Exempt/etc)."""
    expires_on: Optional[datetime.datetime] = rest_field(
        name="expiresOn", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Expiration date of this assignment as a full ISO date."""
    additional_data: Optional["_models.AssignmentPropertiesAdditionalData"] = rest_field(
        name="additionalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional data about the assignment."""
    metadata: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The assignment metadata. Metadata is an open ended object and is typically a collection of key
     value pairs."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        assigned_standard: Optional["_models.AssignedStandardItem"] = None,
        assigned_component: Optional["_models.AssignedComponentItem"] = None,
        scope: Optional[str] = None,
        effect: Optional[str] = None,
        expires_on: Optional[datetime.datetime] = None,
        additional_data: Optional["_models.AssignmentPropertiesAdditionalData"] = None,
        metadata: Optional[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 AssignmentPropertiesAdditionalData(_Model):
    """Additional data about the assignment.

    :ivar exemption_category: Exemption category of this assignment.
    :vartype exemption_category: str
    """

    exemption_category: Optional[str] = rest_field(
        name="exemptionCategory", visibility=["read", "create", "update", "delete", "query"]
    )
    """Exemption category of this assignment."""

    @overload
    def __init__(
        self,
        *,
        exemption_category: 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 AtaExternalSecuritySolution(ExternalSecuritySolution, discriminator="ATA"):
    """Represents an ATA security solution which sends logs to an OMS workspace.

    :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.security.models.SystemData
    :ivar location: Location where the resource is stored.
    :vartype location: str
    :ivar properties: The external security solution properties for ATA solutions.
    :vartype properties: ~azure.mgmt.security.models.AtaSolutionProperties
    :ivar kind: Required. ATA.
    :vartype kind: str or ~azure.mgmt.security.models.ATA
    """

    properties: Optional["_models.AtaSolutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The external security solution properties for ATA solutions."""
    kind: Literal[ExternalSecuritySolutionKindEnum.ATA] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. ATA."""

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

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


class AtaSolutionProperties(ExternalSecuritySolutionProperties):
    """The external security solution properties for ATA solutions.

    :ivar device_vendor:
    :vartype device_vendor: str
    :ivar device_type:
    :vartype device_type: str
    :ivar workspace: Represents an OMS workspace to which the solution is connected.
    :vartype workspace: ~azure.mgmt.security.models.ConnectedWorkspace
    :ivar last_event_received:
    :vartype last_event_received: str
    """

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

    @overload
    def __init__(
        self,
        *,
        device_vendor: Optional[str] = None,
        device_type: Optional[str] = None,
        workspace: Optional["_models.ConnectedWorkspace"] = None,
        last_event_received: 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 AttestationEvidence(_Model):
    """Describe the properties of a assignment attestation.

    :ivar description: The description of the evidence.
    :vartype description: str
    :ivar source_url: The source url of the evidence.
    :vartype source_url: str
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the evidence."""
    source_url: Optional[str] = rest_field(name="sourceUrl", visibility=["read", "create", "update", "delete", "query"])
    """The source url of the evidence."""

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

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

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


class Authorization(_Model):
    """Authorization payload.

    :ivar code: Gets or sets one-time OAuth code to exchange for refresh and access tokens.

     Only used during PUT/PATCH operations. The secret is cleared during GET.
    :vartype code: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets one-time OAuth code to exchange for refresh and access tokens.
     
     Only used during PUT/PATCH operations. The secret is cleared during GET."""

    @overload
    def __init__(
        self,
        *,
        code: 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 Automation(ProxyResource):
    """The security automation 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.security.models.SystemData
    :ivar properties: Security automation data.
    :vartype properties: ~azure.mgmt.security.models.AutomationProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar kind: Kind of the resource.
    :vartype kind: str
    :ivar etag: Entity tag is used for comparing two or more entities from the same requested
     resource.
    :vartype etag: str
    """

    properties: Optional["_models.AutomationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security automation data."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create", "update"])
    """The geo-location where the resource lives."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the resource."""
    etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Entity tag is used for comparing two or more entities from the same requested resource."""

    __flattened_items = ["description", "is_enabled", "scopes", "sources", "actions"]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.AutomationProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        location: Optional[str] = None,
        kind: Optional[str] = None,
        etag: 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 AutomationAction(_Model):
    """The action that should be triggered.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AutomationActionEventHub, AutomationActionLogicApp, AutomationActionWorkspace

    :ivar action_type: The type of the action that will be triggered by the Automation. Required.
     Known values are: "LogicApp", "EventHub", "Workspace", and "Internal".
    :vartype action_type: str or ~azure.mgmt.security.models.ActionType
    """

    __mapping__: dict[str, _Model] = {}
    action_type: str = rest_discriminator(name="actionType", visibility=["read", "create", "update", "delete", "query"])
    """The type of the action that will be triggered by the Automation. Required. Known values are:
     \"LogicApp\", \"EventHub\", \"Workspace\", and \"Internal\"."""

    @overload
    def __init__(
        self,
        *,
        action_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 AutomationActionEventHub(AutomationAction, discriminator="EventHub"):
    """The target Event Hub to which event data will be exported. To learn more about Microsoft
    Defender for Cloud continuous export capabilities, visit `https://aka.ms/ASCExportLearnMore
    <https://aka.ms/ASCExportLearnMore>`_.

    :ivar event_hub_resource_id: The target Event Hub Azure Resource ID.
    :vartype event_hub_resource_id: str
    :ivar sas_policy_name: The target Event Hub SAS policy name.
    :vartype sas_policy_name: str
    :ivar connection_string: The target Event Hub connection string (it will not be included in any
     response).
    :vartype connection_string: str
    :ivar is_trusted_service_enabled: Indicates whether the trusted service is enabled or not.
    :vartype is_trusted_service_enabled: bool
    :ivar action_type: The type of the action that will be triggered by the Automation. Required.
     EventHub.
    :vartype action_type: str or ~azure.mgmt.security.models.EVENT_HUB
    """

    event_hub_resource_id: Optional[str] = rest_field(
        name="eventHubResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target Event Hub Azure Resource ID."""
    sas_policy_name: Optional[str] = rest_field(name="sasPolicyName", visibility=["read"])
    """The target Event Hub SAS policy name."""
    connection_string: Optional[str] = rest_field(
        name="connectionString", visibility=["read", "create", "update", "delete", "query"]
    )
    """The target Event Hub connection string (it will not be included in any response)."""
    is_trusted_service_enabled: Optional[bool] = rest_field(
        name="isTrustedServiceEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the trusted service is enabled or not."""
    action_type: Literal[ActionType.EVENT_HUB] = rest_discriminator(name="actionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the action that will be triggered by the Automation. Required. EventHub."""

    @overload
    def __init__(
        self,
        *,
        event_hub_resource_id: Optional[str] = None,
        connection_string: Optional[str] = None,
        is_trusted_service_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)
        self.action_type = ActionType.EVENT_HUB  # type: ignore


class AutomationActionLogicApp(AutomationAction, discriminator="LogicApp"):
    """The logic app action that should be triggered. To learn more about Microsoft Defender for
    Cloud's Workflow Automation capabilities, visit `https://aka.ms/ASCWorkflowAutomationLearnMore
    <https://aka.ms/ASCWorkflowAutomationLearnMore>`_.

    :ivar logic_app_resource_id: The triggered Logic App Azure Resource ID. This can also reside on
     other subscriptions, given that you have permissions to trigger the Logic App.
    :vartype logic_app_resource_id: str
    :ivar uri: The Logic App trigger URI endpoint (it will not be included in any response).
    :vartype uri: str
    :ivar action_type: The type of the action that will be triggered by the Automation. Required.
     LogicApp.
    :vartype action_type: str or ~azure.mgmt.security.models.LOGIC_APP
    """

    logic_app_resource_id: Optional[str] = rest_field(
        name="logicAppResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given
     that you have permissions to trigger the Logic App."""
    uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Logic App trigger URI endpoint (it will not be included in any response)."""
    action_type: Literal[ActionType.LOGIC_APP] = rest_discriminator(name="actionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the action that will be triggered by the Automation. Required. LogicApp."""

    @overload
    def __init__(
        self,
        *,
        logic_app_resource_id: 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)
        self.action_type = ActionType.LOGIC_APP  # type: ignore


class AutomationActionWorkspace(AutomationAction, discriminator="Workspace"):
    """The Log Analytics Workspace to which event data will be exported. Security alerts data will
    reside in the 'SecurityAlert' table and the assessments data will reside in the
    'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that
    in order to view the data in the workspace, the Security Center Log Analytics free/standard
    solution needs to be enabled on that workspace. To learn more about Microsoft Defender for
    Cloud continuous export capabilities, visit `https://aka.ms/ASCExportLearnMore
    <https://aka.ms/ASCExportLearnMore>`_.

    :ivar workspace_resource_id: The fully qualified Log Analytics Workspace Azure Resource ID.
    :vartype workspace_resource_id: str
    :ivar action_type: The type of the action that will be triggered by the Automation. Required.
     Workspace.
    :vartype action_type: str or ~azure.mgmt.security.models.WORKSPACE
    """

    workspace_resource_id: Optional[str] = rest_field(
        name="workspaceResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The fully qualified Log Analytics Workspace Azure Resource ID."""
    action_type: Literal[ActionType.WORKSPACE] = rest_discriminator(name="actionType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the action that will be triggered by the Automation. Required. Workspace."""

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

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

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


class AutomationProperties(_Model):
    """A set of properties that defines the behavior of the automation configuration. To learn more
    about the supported security events data models schemas - please visit
    `https://aka.ms/ASCAutomationSchemas <https://aka.ms/ASCAutomationSchemas>`_.

    :ivar description: The security automation description.
    :vartype description: str
    :ivar is_enabled: Indicates whether the security automation is enabled.
    :vartype is_enabled: bool
    :ivar scopes: A collection of scopes on which the security automations logic is applied.
     Supported scopes are the subscription itself or a resource group under that subscription. The
     automation will only apply on defined scopes.
    :vartype scopes: list[~azure.mgmt.security.models.AutomationScope]
    :ivar sources: A collection of the source event types which evaluate the security automation
     set of rules.
    :vartype sources: list[~azure.mgmt.security.models.AutomationSource]
    :ivar actions: A collection of the actions which are triggered if all the configured rules
     evaluations, within at least one rule set, are true.
    :vartype actions: list[~azure.mgmt.security.models.AutomationAction]
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security automation description."""
    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the security automation is enabled."""
    scopes: Optional[list["_models.AutomationScope"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of scopes on which the security automations logic is applied. Supported scopes are
     the subscription itself or a resource group under that subscription. The automation will only
     apply on defined scopes."""
    sources: Optional[list["_models.AutomationSource"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of the source event types which evaluate the security automation set of rules."""
    actions: Optional[list["_models.AutomationAction"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of the actions which are triggered if all the configured rules evaluations, within
     at least one rule set, are true."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        is_enabled: Optional[bool] = None,
        scopes: Optional[list["_models.AutomationScope"]] = None,
        sources: Optional[list["_models.AutomationSource"]] = None,
        actions: Optional[list["_models.AutomationAction"]] = None,
    ) -> None: ...

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

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


class AutomationRuleSet(_Model):
    """A rule set which evaluates all its rules upon an event interception. Only when all the included
    rules in the rule set will be evaluated as 'true', will the event trigger the defined actions.

    :ivar rules:
    :vartype rules: list[~azure.mgmt.security.models.AutomationTriggeringRule]
    """

    rules: Optional[list["_models.AutomationTriggeringRule"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class AutomationScope(_Model):
    """A single automation scope.

    :ivar description: The resources scope description.
    :vartype description: str
    :ivar scope_path: The resources scope path. Can be the subscription on which the automation is
     defined on or a resource group under that subscription (fully qualified Azure resource IDs).
    :vartype scope_path: str
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resources scope description."""
    scope_path: Optional[str] = rest_field(name="scopePath", visibility=["read", "create", "update", "delete", "query"])
    """The resources scope path. Can be the subscription on which the automation is defined on or a
     resource group under that subscription (fully qualified Azure resource IDs)."""

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

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

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


class AutomationSource(_Model):
    """The source event types which evaluate the security automation set of rules. For example -
    security alerts and security assessments. To learn more about the supported security events
    data models schemas - please visit `https://aka.ms/ASCAutomationSchemas
    <https://aka.ms/ASCAutomationSchemas>`_.

    :ivar event_source: A valid event source type. Known values are: "Assessments",
     "AssessmentsSnapshot", "SubAssessments", "SubAssessmentsSnapshot", "Alerts", "SecureScores",
     "SecureScoresSnapshot", "SecureScoreControls", "SecureScoreControlsSnapshot",
     "RegulatoryComplianceAssessment", "RegulatoryComplianceAssessmentSnapshot", "AttackPaths", and
     "AttackPathsSnapshot".
    :vartype event_source: str or ~azure.mgmt.security.models.EventSource
    :ivar rule_sets: A set of rules which evaluate upon event interception. A logical disjunction
     is applied between defined rule sets (logical 'or').
    :vartype rule_sets: list[~azure.mgmt.security.models.AutomationRuleSet]
    """

    event_source: Optional[Union[str, "_models.EventSource"]] = rest_field(
        name="eventSource", visibility=["read", "create", "update", "delete", "query"]
    )
    """A valid event source type. Known values are: \"Assessments\", \"AssessmentsSnapshot\",
     \"SubAssessments\", \"SubAssessmentsSnapshot\", \"Alerts\", \"SecureScores\",
     \"SecureScoresSnapshot\", \"SecureScoreControls\", \"SecureScoreControlsSnapshot\",
     \"RegulatoryComplianceAssessment\", \"RegulatoryComplianceAssessmentSnapshot\",
     \"AttackPaths\", and \"AttackPathsSnapshot\"."""
    rule_sets: Optional[list["_models.AutomationRuleSet"]] = rest_field(
        name="ruleSets", visibility=["read", "create", "update", "delete", "query"]
    )
    """A set of rules which evaluate upon event interception. A logical disjunction is applied between
     defined rule sets (logical 'or')."""

    @overload
    def __init__(
        self,
        *,
        event_source: Optional[Union[str, "_models.EventSource"]] = None,
        rule_sets: Optional[list["_models.AutomationRuleSet"]] = None,
    ) -> None: ...

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

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


class AutomationTriggeringRule(_Model):
    """A rule which is evaluated upon event interception. The rule is configured by comparing a
    specific value from the event model to an expected value. This comparison is done by using one
    of the supported operators set.

    :ivar property_j_path: The JPath of the entity model property that should be checked.
    :vartype property_j_path: str
    :ivar property_type: The data type of the compared operands (string, integer, floating point
     number or a boolean [true/false]]. Known values are: "String", "Integer", "Number", and
     "Boolean".
    :vartype property_type: str or ~azure.mgmt.security.models.PropertyType
    :ivar expected_value: The expected value.
    :vartype expected_value: str
    :ivar operator: A valid comparer operator to use. A case-insensitive comparison will be applied
     for String PropertyType. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqualTo",
     "LesserThan", "LesserThanOrEqualTo", "NotEquals", "Contains", "StartsWith", and "EndsWith".
    :vartype operator: str or ~azure.mgmt.security.models.Operator
    """

    property_j_path: Optional[str] = rest_field(
        name="propertyJPath", visibility=["read", "create", "update", "delete", "query"]
    )
    """The JPath of the entity model property that should be checked."""
    property_type: Optional[Union[str, "_models.PropertyType"]] = rest_field(
        name="propertyType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The data type of the compared operands (string, integer, floating point number or a boolean
     [true/false]]. Known values are: \"String\", \"Integer\", \"Number\", and \"Boolean\"."""
    expected_value: Optional[str] = rest_field(
        name="expectedValue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The expected value."""
    operator: Optional[Union[str, "_models.Operator"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A valid comparer operator to use. A case-insensitive comparison will be applied for String
     PropertyType. Known values are: \"Equals\", \"GreaterThan\", \"GreaterThanOrEqualTo\",
     \"LesserThan\", \"LesserThanOrEqualTo\", \"NotEquals\", \"Contains\", \"StartsWith\", and
     \"EndsWith\"."""

    @overload
    def __init__(
        self,
        *,
        property_j_path: Optional[str] = None,
        property_type: Optional[Union[str, "_models.PropertyType"]] = None,
        expected_value: Optional[str] = None,
        operator: Optional[Union[str, "_models.Operator"]] = None,
    ) -> None: ...

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

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


class Tags(_Model):
    """A list of key value pairs that describe the resource.

    :ivar tags: A list of key value pairs that describe the resource.
    :vartype tags: dict[str, str]
    """

    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of key value pairs that describe the resource."""

    @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 AutomationUpdateModel(Tags):
    """The update model of security automation resource.

    :ivar tags: A list of key value pairs that describe the resource.
    :vartype tags: dict[str, str]
    :ivar properties: Security automation data.
    :vartype properties: ~azure.mgmt.security.models.AutomationProperties
    """

    properties: Optional["_models.AutomationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security automation data."""

    __flattened_items = ["description", "is_enabled", "scopes", "sources", "actions"]

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

    @overload
    def __init__(self, mapping: Mapping[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 AutomationValidationStatus(_Model):
    """The security automation model state property bag.

    :ivar is_valid: Indicates whether the model is valid or not.
    :vartype is_valid: bool
    :ivar message: The validation message.
    :vartype message: str
    """

    is_valid: Optional[bool] = rest_field(name="isValid", visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the model is valid or not."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The validation message."""

    @overload
    def __init__(
        self,
        *,
        is_valid: Optional[bool] = 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 AutoProvisioningSetting(ProxyResource):
    """Auto provisioning 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.security.models.SystemData
    :ivar properties: Auto provisioning setting data.
    :vartype properties: ~azure.mgmt.security.models.AutoProvisioningSettingProperties
    """

    properties: Optional["_models.AutoProvisioningSettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Auto provisioning setting data."""

    __flattened_items = ["auto_provision"]

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

    @overload
    def __init__(self, mapping: Mapping[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 AutoProvisioningSettingProperties(_Model):
    """describes properties of an auto provisioning setting.

    :ivar auto_provision: Describes what kind of security agent provisioning action to take.
     Required. Known values are: "On" and "Off".
    :vartype auto_provision: str or ~azure.mgmt.security.models.AutoProvision
    """

    auto_provision: Union[str, "_models.AutoProvision"] = rest_field(
        name="autoProvision", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes what kind of security agent provisioning action to take. Required. Known values are:
     \"On\" and \"Off\"."""

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

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

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


class EnvironmentData(_Model):
    """The security connector environment data.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AwsEnvironmentData, AzureDevOpsScopeEnvironmentData, DockerHubEnvironmentData,
    GcpProjectEnvironmentData, GithubScopeEnvironmentData, GitlabScopeEnvironmentData,
    JFrogEnvironmentData

    :ivar environment_type: The type of the environment data. Required. Known values are:
     "AwsAccount", "GcpProject", "GithubScope", "AzureDevOpsScope", "GitlabScope",
     "DockerHubOrganization", and "JFrogArtifactory".
    :vartype environment_type: str or ~azure.mgmt.security.models.EnvironmentType
    """

    __mapping__: dict[str, _Model] = {}
    environment_type: str = rest_discriminator(
        name="environmentType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the environment data. Required. Known values are: \"AwsAccount\", \"GcpProject\",
     \"GithubScope\", \"AzureDevOpsScope\", \"GitlabScope\", \"DockerHubOrganization\", and
     \"JFrogArtifactory\"."""

    @overload
    def __init__(
        self,
        *,
        environment_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 AwsEnvironmentData(EnvironmentData, discriminator="AwsAccount"):
    """The AWS connector environment data.

    :ivar organizational_data: The AWS account's organizational data.
    :vartype organizational_data: ~azure.mgmt.security.models.AwsOrganizationalData
    :ivar regions: list of regions to scan.
    :vartype regions: list[str]
    :ivar account_name: The AWS account name.
    :vartype account_name: str
    :ivar scan_interval: Scan interval in hours (value should be between 1-hour to 24-hours).
    :vartype scan_interval: int
    :ivar environment_type: The type of the environment data. Required. AwsAccount.
    :vartype environment_type: str or ~azure.mgmt.security.models.AWS_ACCOUNT
    """

    organizational_data: Optional["_models.AwsOrganizationalData"] = rest_field(
        name="organizationalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """The AWS account's organizational data."""
    regions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """list of regions to scan."""
    account_name: Optional[str] = rest_field(name="accountName", visibility=["read"])
    """The AWS account name."""
    scan_interval: Optional[int] = rest_field(
        name="scanInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Scan interval in hours (value should be between 1-hour to 24-hours)."""
    environment_type: Literal[EnvironmentType.AWS_ACCOUNT] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. AwsAccount."""

    @overload
    def __init__(
        self,
        *,
        organizational_data: Optional["_models.AwsOrganizationalData"] = None,
        regions: Optional[list[str]] = None,
        scan_interval: Optional[int] = None,
    ) -> None: ...

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

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


class AwsOrganizationalData(_Model):
    """The AWS organization data.

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

    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Known values are: "Member" and "Organization".
    :vartype organization_membership_type: str or
     ~azure.mgmt.security.models.OrganizationMembershipType
    """

    __mapping__: dict[str, _Model] = {}
    organization_membership_type: str = rest_discriminator(
        name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The multi cloud account's membership type in the organization. Required. Known values are:
     \"Member\" and \"Organization\"."""

    @overload
    def __init__(
        self,
        *,
        organization_membership_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 AwsOrganizationalDataMaster(AwsOrganizationalData, discriminator="Organization"):
    """The AWS organization data for the master account.

    :ivar stackset_name: If the multi cloud account is of membership type organization, this will
     be the name of the onboarding stackset.
    :vartype stackset_name: str
    :ivar excluded_account_ids: If the multi cloud account is of membership type organization, list
     of accounts excluded from offering.
    :vartype excluded_account_ids: list[str]
    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Organization.
    :vartype organization_membership_type: str or ~azure.mgmt.security.models.ORGANIZATION
    """

    stackset_name: Optional[str] = rest_field(
        name="stacksetName", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the multi cloud account is of membership type organization, this will be the name of the
     onboarding stackset."""
    excluded_account_ids: Optional[list[str]] = rest_field(
        name="excludedAccountIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the multi cloud account is of membership type organization, list of accounts excluded from
     offering."""
    organization_membership_type: Literal[OrganizationMembershipType.ORGANIZATION] = rest_discriminator(name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The multi cloud account's membership type in the organization. Required. Organization."""

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

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

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


class AwsOrganizationalDataMember(AwsOrganizationalData, discriminator="Member"):
    """The AWS organization data for the member account.

    :ivar parent_hierarchy_id: If the multi cloud account is not of membership type organization,
     this will be the ID of the account's parent.
    :vartype parent_hierarchy_id: str
    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Member.
    :vartype organization_membership_type: str or ~azure.mgmt.security.models.MEMBER
    """

    parent_hierarchy_id: Optional[str] = rest_field(
        name="parentHierarchyId", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the multi cloud account is not of membership type organization, this will be the ID of the
     account's parent."""
    organization_membership_type: Literal[OrganizationMembershipType.MEMBER] = rest_discriminator(name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The multi cloud account's membership type in the organization. Required. Member."""

    @overload
    def __init__(
        self,
        *,
        parent_hierarchy_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)
        self.organization_membership_type = OrganizationMembershipType.MEMBER  # type: ignore


class AzureDevOpsOrg(ProxyResource):
    """Azure DevOps Organization 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.security.models.SystemData
    :ivar properties: Azure DevOps Organization properties.
    :vartype properties: ~azure.mgmt.security.models.AzureDevOpsOrgProperties
    """

    properties: Optional["_models.AzureDevOpsOrgProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure DevOps Organization properties."""

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

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

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


class AzureDevOpsOrgListResponse(_Model):
    """List of RP resources which supports pagination.

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

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

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

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

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


class AzureDevOpsOrgProperties(_Model):
    """Azure DevOps Organization properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    :ivar actionable_remediation: Configuration payload for PR Annotations.
    :vartype actionable_remediation: ~azure.mgmt.security.models.ActionableRemediation
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""
    actionable_remediation: Optional["_models.ActionableRemediation"] = rest_field(
        name="actionableRemediation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration payload for PR Annotations."""

    @overload
    def __init__(
        self,
        *,
        onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = None,
        actionable_remediation: Optional["_models.ActionableRemediation"] = None,
    ) -> None: ...

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

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


class AzureDevOpsProject(ProxyResource):
    """Azure DevOps Project 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.security.models.SystemData
    :ivar properties: Azure DevOps Project properties.
    :vartype properties: ~azure.mgmt.security.models.AzureDevOpsProjectProperties
    """

    properties: Optional["_models.AzureDevOpsProjectProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure DevOps Project properties."""

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

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

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


class AzureDevOpsProjectProperties(_Model):
    """Azure DevOps Project properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar parent_org_name: Gets or sets parent Azure DevOps Organization name.
    :vartype parent_org_name: str
    :ivar project_id: Gets or sets Azure DevOps Project id.
    :vartype project_id: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    :ivar actionable_remediation: Configuration payload for PR Annotations.
    :vartype actionable_remediation: ~azure.mgmt.security.models.ActionableRemediation
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    parent_org_name: Optional[str] = rest_field(
        name="parentOrgName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets parent Azure DevOps Organization name."""
    project_id: Optional[str] = rest_field(name="projectId", visibility=["read"])
    """Gets or sets Azure DevOps Project id."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""
    actionable_remediation: Optional["_models.ActionableRemediation"] = rest_field(
        name="actionableRemediation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration payload for PR Annotations."""

    @overload
    def __init__(
        self,
        *,
        parent_org_name: Optional[str] = None,
        onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = None,
        actionable_remediation: Optional["_models.ActionableRemediation"] = None,
    ) -> None: ...

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

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


class AzureDevOpsRepository(ProxyResource):
    """Azure DevOps Repository 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.security.models.SystemData
    :ivar properties: Azure DevOps Repository properties.
    :vartype properties: ~azure.mgmt.security.models.AzureDevOpsRepositoryProperties
    """

    properties: Optional["_models.AzureDevOpsRepositoryProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Azure DevOps Repository properties."""

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

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

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


class AzureDevOpsRepositoryProperties(_Model):
    """Azure DevOps Repository properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar parent_org_name: Gets or sets parent Azure DevOps Organization name.
    :vartype parent_org_name: str
    :ivar parent_project_name: Gets or sets parent Azure DevOps Project name.
    :vartype parent_project_name: str
    :ivar repo_id: Gets or sets Azure DevOps Repository id.
    :vartype repo_id: str
    :ivar repo_url: Gets or sets Azure DevOps Repository url.
    :vartype repo_url: str
    :ivar visibility: Gets or sets Azure DevOps repository visibility, whether it is public or
     private etc.
    :vartype visibility: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    :ivar actionable_remediation: Configuration payload for PR Annotations.
    :vartype actionable_remediation: ~azure.mgmt.security.models.ActionableRemediation
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    parent_org_name: Optional[str] = rest_field(
        name="parentOrgName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets parent Azure DevOps Organization name."""
    parent_project_name: Optional[str] = rest_field(
        name="parentProjectName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets parent Azure DevOps Project name."""
    repo_id: Optional[str] = rest_field(name="repoId", visibility=["read"])
    """Gets or sets Azure DevOps Repository id."""
    repo_url: Optional[str] = rest_field(name="repoUrl", visibility=["read"])
    """Gets or sets Azure DevOps Repository url."""
    visibility: Optional[str] = rest_field(visibility=["read"])
    """Gets or sets Azure DevOps repository visibility, whether it is public or private etc."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""
    actionable_remediation: Optional["_models.ActionableRemediation"] = rest_field(
        name="actionableRemediation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration payload for PR Annotations."""

    @overload
    def __init__(
        self,
        *,
        parent_org_name: Optional[str] = None,
        parent_project_name: Optional[str] = None,
        onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = None,
        actionable_remediation: Optional["_models.ActionableRemediation"] = None,
    ) -> None: ...

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

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


class AzureDevOpsScopeEnvironmentData(EnvironmentData, discriminator="AzureDevOpsScope"):
    """The AzureDevOps scope connector's environment data.

    :ivar environment_type: The type of the environment data. Required. AzureDevOpsScope.
    :vartype environment_type: str or ~azure.mgmt.security.models.AZURE_DEV_OPS_SCOPE
    """

    environment_type: Literal[EnvironmentType.AZURE_DEV_OPS_SCOPE] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. AzureDevOpsScope."""

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

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

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


class CommonResourceDetails(_Model):
    """Details of the resource that was assessed.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AzureResourceDetails, OnPremiseResourceDetails, OnPremiseSqlResourceDetails

    :ivar source: The platform where the assessed resource resides. Required. Known values are:
     "Azure", "OnPremise", "OnPremiseSql", "Aws", "Gcp", and "OnPremiseResourceDetails".
    :vartype source: str or ~azure.mgmt.security.models.Source
    """

    __mapping__: dict[str, _Model] = {}
    source: str = rest_discriminator(name="source", visibility=["read", "create", "update", "delete", "query"])
    """The platform where the assessed resource resides. Required. Known values are: \"Azure\",
     \"OnPremise\", \"OnPremiseSql\", \"Aws\", \"Gcp\", and \"OnPremiseResourceDetails\"."""

    @overload
    def __init__(
        self,
        *,
        source: 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 AzureResourceDetails(CommonResourceDetails, discriminator="Azure"):
    """Details of the Azure resource that was assessed.

    :ivar id: Azure resource Id of the assessed resource.
    :vartype id: str
    :ivar source: The platform where the assessed resource resides. Required. Resource is in Azure.
    :vartype source: str or ~azure.mgmt.security.models.AZURE
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Azure resource Id of the assessed resource."""
    source: Literal[Source.AZURE] = rest_discriminator(name="source", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The platform where the assessed resource resides. Required. Resource is in Azure."""

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

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

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


class ResourceIdentifier(_Model):
    """A resource identifier for an alert which can be used to direct the alert to the right product
    exposure group (tenant, workspace, subscription etc.).

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

    :ivar type: There can be multiple identifiers of different type per alert, this field specify
     the identifier type. Required. Known values are: "AzureResource" and "LogAnalytics".
    :vartype type: str or ~azure.mgmt.security.models.ResourceIdentifierType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """There can be multiple identifiers of different type per alert, this field specify the
     identifier type. Required. Known values are: \"AzureResource\" and \"LogAnalytics\"."""

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

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

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


class AzureResourceIdentifier(ResourceIdentifier, discriminator="AzureResource"):
    """Azure resource identifier.

    :ivar azure_resource_id: ARM resource identifier for the cloud resource being alerted on.
    :vartype azure_resource_id: str
    :ivar type: There can be multiple identifiers of different type per alert, this field specify
     the identifier type. Required. AzureResource.
    :vartype type: str or ~azure.mgmt.security.models.AZURE_RESOURCE
    """

    azure_resource_id: Optional[str] = rest_field(name="azureResourceId", visibility=["read"])
    """ARM resource identifier for the cloud resource being alerted on."""
    type: Literal[ResourceIdentifierType.AZURE_RESOURCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """There can be multiple identifiers of different type per alert, this field specify the
     identifier type. Required. AzureResource."""

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

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

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


class AzureResourceLink(_Model):
    """Describes an Azure resource with kind.

    :ivar id: Azure resource Id.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Azure resource Id."""


class ServerVulnerabilityAssessmentsSetting(ProxyResource):
    """A base vulnerability assessments setting on servers in the defined scope.

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

    :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.security.models.SystemData
    :ivar properties: The resource-specific properties for this resource.
    :vartype properties: any
    :ivar kind: The kind of the server vulnerability assessments setting. Required.
     "AzureServersSetting"
    :vartype kind: str or ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsSettingKind
    """

    __mapping__: dict[str, _Model] = {}
    properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource-specific properties for this resource."""
    kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
    """The kind of the server vulnerability assessments setting. Required. \"AzureServersSetting\""""

    @overload
    def __init__(
        self,
        *,
        kind: str,
        properties: Optional[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 AzureServersSetting(ServerVulnerabilityAssessmentsSetting, discriminator="AzureServersSetting"):
    """A vulnerability assessments setting on Azure servers in the defined scope.

    :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.security.models.SystemData
    :ivar properties: The vulnerability assessments setting properties on Azure servers in the
     defined scope.
    :vartype properties:
     ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsAzureSettingProperties
    :ivar kind: The kind of the server vulnerability assessments setting. Required.
     AzureServersSetting.
    :vartype kind: str or ~azure.mgmt.security.models.AZURE_SERVERS_SETTING
    """

    properties: Optional["_models.ServerVulnerabilityAssessmentsAzureSettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The vulnerability assessments setting properties on Azure servers in the defined scope."""
    kind: Literal[ServerVulnerabilityAssessmentsSettingKind.AZURE_SERVERS_SETTING] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The kind of the server vulnerability assessments setting. Required. AzureServersSetting."""

    __flattened_items = ["selected_provider"]

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

    @overload
    def __init__(self, mapping: Mapping[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 Baseline(_Model):
    """Baseline details.

    :ivar expected_results: Expected results.
    :vartype expected_results: list[list[str]]
    :ivar updated_time: Baseline update time (UTC).
    :vartype updated_time: ~datetime.datetime
    """

    expected_results: Optional[list[list[str]]] = rest_field(
        name="expectedResults", visibility=["read", "create", "update", "delete", "query"]
    )
    """Expected results."""
    updated_time: Optional[datetime.datetime] = rest_field(
        name="updatedTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Baseline update time (UTC)."""

    @overload
    def __init__(
        self,
        *,
        expected_results: Optional[list[list[str]]] = None,
        updated_time: 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 BaselineAdjustedResult(_Model):
    """The rule result adjusted with baseline.

    :ivar baseline: Baseline details.
    :vartype baseline: ~azure.mgmt.security.models.Baseline
    :ivar status: The rule result status. Known values are: "NonFinding", "Finding",
     "InternalError", and "NotApplicable".
    :vartype status: str or ~azure.mgmt.security.models.RuleStatus
    :ivar results_not_in_baseline: Results that are not in the baseline.
    :vartype results_not_in_baseline: list[list[str]]
    :ivar results_only_in_baseline: Results that are in the baseline.
    :vartype results_only_in_baseline: list[list[str]]
    """

    baseline: Optional["_models.Baseline"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Baseline details."""
    status: Optional[Union[str, "_models.RuleStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule result status. Known values are: \"NonFinding\", \"Finding\", \"InternalError\", and
     \"NotApplicable\"."""
    results_not_in_baseline: Optional[list[list[str]]] = rest_field(
        name="resultsNotInBaseline", visibility=["read", "create", "update", "delete", "query"]
    )
    """Results that are not in the baseline."""
    results_only_in_baseline: Optional[list[list[str]]] = rest_field(
        name="resultsOnlyInBaseline", visibility=["read", "create", "update", "delete", "query"]
    )
    """Results that are in the baseline."""

    @overload
    def __init__(
        self,
        *,
        baseline: Optional["_models.Baseline"] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
        results_not_in_baseline: Optional[list[list[str]]] = None,
        results_only_in_baseline: Optional[list[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 BenchmarkReference(_Model):
    """The benchmark references.

    :ivar benchmark: The benchmark name.
    :vartype benchmark: str
    :ivar reference: The benchmark reference.
    :vartype reference: str
    """

    benchmark: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The benchmark name."""
    reference: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The benchmark reference."""

    @overload
    def __init__(
        self,
        *,
        benchmark: Optional[str] = None,
        reference: 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 BlobsScanSummary(_Model):
    """A summary of the scan results of the blobs that were scanned.

    :ivar total_blobs_scanned: The total number of blobs that were scanned.
    :vartype total_blobs_scanned: int
    :ivar malicious_blobs_count: The number of malicious blobs that were detected during the scan.
    :vartype malicious_blobs_count: int
    :ivar skipped_blobs_count: The number of blobs that were skipped.
    :vartype skipped_blobs_count: int
    :ivar failed_blobs_count: The number of failed blob scans.
    :vartype failed_blobs_count: int
    :ivar scanned_blobs_in_gb: The number of gigabytes of data that were scanned.
    :vartype scanned_blobs_in_gb: float
    """

    total_blobs_scanned: Optional[int] = rest_field(
        name="totalBlobsScanned", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total number of blobs that were scanned."""
    malicious_blobs_count: Optional[int] = rest_field(
        name="maliciousBlobsCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of malicious blobs that were detected during the scan."""
    skipped_blobs_count: Optional[int] = rest_field(
        name="skippedBlobsCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of blobs that were skipped."""
    failed_blobs_count: Optional[int] = rest_field(
        name="failedBlobsCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed blob scans."""
    scanned_blobs_in_gb: Optional[float] = rest_field(
        name="scannedBlobsInGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of gigabytes of data that were scanned."""

    @overload
    def __init__(
        self,
        *,
        total_blobs_scanned: Optional[int] = None,
        malicious_blobs_count: Optional[int] = None,
        skipped_blobs_count: Optional[int] = None,
        failed_blobs_count: Optional[int] = None,
        scanned_blobs_in_gb: 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 BuiltInInfoType(_Model):
    """Pre-configured sensitive information type.

    :ivar name: Display name of the info type.
    :vartype name: str
    :ivar id: Id of the info type.
    :vartype id: str
    :ivar type: Category of the built-in info type.
    :vartype type: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Display name of the info type."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Id of the info type."""
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Category of the built-in info type."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        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 CategoryConfiguration(_Model):
    """Severity level per category configuration for PR Annotations.

    :ivar minimum_severity_level: Gets or sets minimum severity level for a given category.
    :vartype minimum_severity_level: str
    :ivar category: Rule categories. Code - code scanning results. Artifact scanning results.
     Dependencies scanning results. IaC results. Secrets scanning results. Container scanning
     results. Known values are: "Code", "Artifacts", "Dependencies", "Secrets", "IaC", and
     "Containers".
    :vartype category: str or ~azure.mgmt.security.models.RuleCategory
    """

    minimum_severity_level: Optional[str] = rest_field(
        name="minimumSeverityLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets minimum severity level for a given category."""
    category: Optional[Union[str, "_models.RuleCategory"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Rule categories. Code - code scanning results. Artifact scanning results. Dependencies scanning
     results. IaC results. Secrets scanning results. Container scanning results. Known values are:
     \"Code\", \"Artifacts\", \"Dependencies\", \"Secrets\", \"IaC\", and \"Containers\"."""

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

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

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


class CefExternalSecuritySolution(ExternalSecuritySolution, discriminator="CEF"):
    """Represents a security solution which sends CEF logs to an OMS workspace.

    :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.security.models.SystemData
    :ivar location: Location where the resource is stored.
    :vartype location: str
    :ivar properties: The external security solution properties for CEF solutions.
    :vartype properties: ~azure.mgmt.security.models.CefSolutionProperties
    :ivar kind: Required. CEF.
    :vartype kind: str or ~azure.mgmt.security.models.CEF
    """

    properties: Optional["_models.CefSolutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The external security solution properties for CEF solutions."""
    kind: Literal[ExternalSecuritySolutionKindEnum.CEF] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. CEF."""

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

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


class CefSolutionProperties(ExternalSecuritySolutionProperties):
    """The external security solution properties for CEF solutions.

    :ivar device_vendor:
    :vartype device_vendor: str
    :ivar device_type:
    :vartype device_type: str
    :ivar workspace: Represents an OMS workspace to which the solution is connected.
    :vartype workspace: ~azure.mgmt.security.models.ConnectedWorkspace
    :ivar hostname:
    :vartype hostname: str
    :ivar agent:
    :vartype agent: str
    :ivar last_event_received:
    :vartype last_event_received: str
    """

    hostname: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    agent: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    last_event_received: Optional[str] = rest_field(
        name="lastEventReceived", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        device_vendor: Optional[str] = None,
        device_type: Optional[str] = None,
        workspace: Optional["_models.ConnectedWorkspace"] = None,
        hostname: Optional[str] = None,
        agent: Optional[str] = None,
        last_event_received: 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 CloudError(_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.security.models.CloudErrorBody
    """

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

    __flattened_items = ["code", "message", "target", "details", "additional_info"]

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

    @overload
    def __init__(self, mapping: Mapping[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.error is None:
                return None
            return getattr(self.error, 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.error is None:
                self.error = self._attr_to_rest_field["error"]._class_type()
            setattr(self.error, key, value)
        else:
            super().__setattr__(key, value)


class CloudErrorBody(_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.security.models.CloudErrorBody]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.mgmt.security.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.CloudErrorBody"]] = rest_field(visibility=["read"])
    """The error details."""
    additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field(
        name="additionalInfo", visibility=["read"]
    )
    """The error additional info."""


class CloudOffering(_Model):
    """The security offering details.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    CspmMonitorAwsOffering, CspmMonitorAzureDevOpsOffering, CspmMonitorDockerHubOffering,
    CspmMonitorGcpOffering, CspmMonitorGitLabOffering, CspmMonitorGithubOffering,
    CspmMonitorJFrogOffering, DefenderCspmAwsOffering, DefenderCspmDockerHubOffering,
    DefenderCspmGcpOffering, DefenderCspmJFrogOffering, DefenderForContainersAwsOffering,
    DefenderForContainersDockerHubOffering, DefenderForContainersGcpOffering,
    DefenderForContainersJFrogOffering, DefenderFoDatabasesAwsOffering,
    DefenderForDatabasesGcpOffering, DefenderForServersAwsOffering, DefenderForServersGcpOffering

    :ivar offering_type: The type of the security offering. Required. Known values are:
     "CspmMonitorAws", "DefenderForContainersAws", "DefenderForServersAws",
     "DefenderForDatabasesAws", "CspmMonitorGcp", "CspmMonitorGithub", "CspmMonitorAzureDevOps",
     "DefenderForServersGcp", "DefenderForContainersGcp", "DefenderForDatabasesGcp",
     "DefenderCspmAws", "DefenderCspmGcp", "CspmMonitorGitLab", "CspmMonitorDockerHub",
     "DefenderForContainersDockerHub", "DefenderCspmDockerHub", "CspmMonitorJFrog",
     "DefenderForContainersJFrog", and "DefenderCspmJFrog".
    :vartype offering_type: str or ~azure.mgmt.security.models.OfferingType
    :ivar description: The offering description.
    :vartype description: str
    """

    __mapping__: dict[str, _Model] = {}
    offering_type: str = rest_discriminator(
        name="offeringType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of the security offering. Required. Known values are: \"CspmMonitorAws\",
     \"DefenderForContainersAws\", \"DefenderForServersAws\", \"DefenderForDatabasesAws\",
     \"CspmMonitorGcp\", \"CspmMonitorGithub\", \"CspmMonitorAzureDevOps\",
     \"DefenderForServersGcp\", \"DefenderForContainersGcp\", \"DefenderForDatabasesGcp\",
     \"DefenderCspmAws\", \"DefenderCspmGcp\", \"CspmMonitorGitLab\", \"CspmMonitorDockerHub\",
     \"DefenderForContainersDockerHub\", \"DefenderCspmDockerHub\", \"CspmMonitorJFrog\",
     \"DefenderForContainersJFrog\", and \"DefenderCspmJFrog\"."""
    description: Optional[str] = rest_field(visibility=["read"])
    """The offering description."""

    @overload
    def __init__(
        self,
        *,
        offering_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 Compliance(ExtensionResource):
    """Compliance of a scope.

    :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.security.models.SystemData
    :ivar properties: Compliance data.
    :vartype properties: ~azure.mgmt.security.models.ComplianceProperties
    """

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

    __flattened_items = ["assessment_timestamp_utc_date", "resource_count", "assessment_result"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ComplianceProperties(_Model):
    """The Compliance score (percentage) of a Subscription is a sum of all Resources' Compliances
    under the given Subscription. A Resource Compliance is defined as the compliant ('healthy')
    Policy Definitions out of all Policy Definitions applicable to a given resource.

    :ivar assessment_timestamp_utc_date: The timestamp when the Compliance calculation was
     conducted.
    :vartype assessment_timestamp_utc_date: ~datetime.datetime
    :ivar resource_count: The resource count of the given subscription for which the Compliance
     calculation was conducted (needed for Management Group Compliance calculation).
    :vartype resource_count: int
    :ivar assessment_result: An array of segment, which is the actually the compliance assessment.
    :vartype assessment_result: list[~azure.mgmt.security.models.ComplianceSegment]
    """

    assessment_timestamp_utc_date: Optional[datetime.datetime] = rest_field(
        name="assessmentTimestampUtcDate", visibility=["read"], format="rfc3339"
    )
    """The timestamp when the Compliance calculation was conducted."""
    resource_count: Optional[int] = rest_field(name="resourceCount", visibility=["read"])
    """The resource count of the given subscription for which the Compliance calculation was conducted
     (needed for Management Group Compliance calculation)."""
    assessment_result: Optional[list["_models.ComplianceSegment"]] = rest_field(
        name="assessmentResult", visibility=["read"]
    )
    """An array of segment, which is the actually the compliance assessment."""


class ComplianceResult(ExtensionResource):
    """a compliance result.

    :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.security.models.SystemData
    :ivar properties: Compliance result data.
    :vartype properties: ~azure.mgmt.security.models.ComplianceResultProperties
    """

    properties: Optional["_models.ComplianceResultProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Compliance result data."""

    __flattened_items = ["resource_status"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ComplianceResultProperties(_Model):
    """Compliance result data.

    :ivar resource_status: The status of the resource regarding a single assessment. Known values
     are: "Healthy", "NotApplicable", "OffByPolicy", and "NotHealthy".
    :vartype resource_status: str or ~azure.mgmt.security.models.ResourceStatus
    """

    resource_status: Optional[Union[str, "_models.ResourceStatus"]] = rest_field(
        name="resourceStatus", visibility=["read"]
    )
    """The status of the resource regarding a single assessment. Known values are: \"Healthy\",
     \"NotApplicable\", \"OffByPolicy\", and \"NotHealthy\"."""


class ComplianceSegment(_Model):
    """A segment of a compliance assessment.

    :ivar segment_type: The segment type, e.g. compliant, non-compliance, insufficient coverage,
     N/A, etc.
    :vartype segment_type: str
    :ivar percentage: The size (%) of the segment.
    :vartype percentage: float
    """

    segment_type: Optional[str] = rest_field(name="segmentType", visibility=["read"])
    """The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc."""
    percentage: Optional[float] = rest_field(visibility=["read"])
    """The size (%) of the segment."""


class ConnectableResource(_Model):
    """Describes the allowed inbound and outbound traffic of an Azure resource.

    :ivar id: The Azure resource id.
    :vartype id: str
    :ivar inbound_connected_resources: The list of Azure resources that the resource has inbound
     allowed connection from.
    :vartype inbound_connected_resources: list[~azure.mgmt.security.models.ConnectedResource]
    :ivar outbound_connected_resources: The list of Azure resources that the resource has outbound
     allowed connection to.
    :vartype outbound_connected_resources: list[~azure.mgmt.security.models.ConnectedResource]
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """The Azure resource id."""
    inbound_connected_resources: Optional[list["_models.ConnectedResource"]] = rest_field(
        name="inboundConnectedResources", visibility=["read"]
    )
    """The list of Azure resources that the resource has inbound allowed connection from."""
    outbound_connected_resources: Optional[list["_models.ConnectedResource"]] = rest_field(
        name="outboundConnectedResources", visibility=["read"]
    )
    """The list of Azure resources that the resource has outbound allowed connection to."""


class ConnectedResource(_Model):
    """Describes properties of a connected resource.

    :ivar connected_resource_id: The Azure resource id of the connected resource.
    :vartype connected_resource_id: str
    :ivar tcp_ports: The allowed tcp ports.
    :vartype tcp_ports: str
    :ivar udp_ports: The allowed udp ports.
    :vartype udp_ports: str
    """

    connected_resource_id: Optional[str] = rest_field(name="connectedResourceId", visibility=["read"])
    """The Azure resource id of the connected resource."""
    tcp_ports: Optional[str] = rest_field(name="tcpPorts", visibility=["read"])
    """The allowed tcp ports."""
    udp_ports: Optional[str] = rest_field(name="udpPorts", visibility=["read"])
    """The allowed udp ports."""


class ConnectedWorkspace(_Model):
    """Represents an OMS workspace to which the solution is connected.

    :ivar id: Azure resource ID of the connected OMS workspace.
    :vartype id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Azure resource ID of the connected OMS workspace."""

    @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 ContainerRegistryVulnerabilityProperties(AdditionalData, discriminator="ContainerRegistryVulnerability"):
    """Additional context fields for container registry Vulnerability assessment.

    :ivar type: Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information
     Gathered, Vulnerability.
    :vartype type: str
    :ivar cvss: Dictionary from cvss version to cvss details object.
    :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS]
    :ivar patchable: Indicates whether a patch is available or not.
    :vartype patchable: bool
    :ivar cve: List of CVEs.
    :vartype cve: list[~azure.mgmt.security.models.CVE]
    :ivar published_time: Published time.
    :vartype published_time: ~datetime.datetime
    :ivar vendor_references:
    :vartype vendor_references: list[~azure.mgmt.security.models.VendorReference]
    :ivar repository_name: Name of the repository which the vulnerable image belongs to.
    :vartype repository_name: str
    :ivar image_digest: Digest of the vulnerable image.
    :vartype image_digest: str
    :ivar assessed_resource_type: Sub-assessment resource type. Required.
     ContainerRegistryVulnerability.
    :vartype assessed_resource_type: str or
     ~azure.mgmt.security.models.CONTAINER_REGISTRY_VULNERABILITY
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered,
     Vulnerability."""
    cvss: Optional[dict[str, "_models.CVSS"]] = rest_field(visibility=["read"])
    """Dictionary from cvss version to cvss details object."""
    patchable: Optional[bool] = rest_field(visibility=["read"])
    """Indicates whether a patch is available or not."""
    cve: Optional[list["_models.CVE"]] = rest_field(visibility=["read"])
    """List of CVEs."""
    published_time: Optional[datetime.datetime] = rest_field(
        name="publishedTime", visibility=["read"], format="rfc3339"
    )
    """Published time."""
    vendor_references: Optional[list["_models.VendorReference"]] = rest_field(
        name="vendorReferences", visibility=["read"]
    )
    repository_name: Optional[str] = rest_field(name="repositoryName", visibility=["read"])
    """Name of the repository which the vulnerable image belongs to."""
    image_digest: Optional[str] = rest_field(name="imageDigest", visibility=["read"])
    """Digest of the vulnerable image."""
    assessed_resource_type: Literal[AssessedResourceType.CONTAINER_REGISTRY_VULNERABILITY] = rest_discriminator(name="assessedResourceType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Sub-assessment resource type. Required. ContainerRegistryVulnerability."""

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

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

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


class CspmMonitorAwsOffering(CloudOffering, discriminator="CspmMonitorAws"):
    """The CSPM monitoring for AWS offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar native_cloud_connection: The native cloud connection configuration.
    :vartype native_cloud_connection:
     ~azure.mgmt.security.models.CspmMonitorAwsOfferingNativeCloudConnection
    :ivar offering_type: The type of the security offering. Required. CspmMonitorAws.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_AWS
    """

    native_cloud_connection: Optional["_models.CspmMonitorAwsOfferingNativeCloudConnection"] = rest_field(
        name="nativeCloudConnection", visibility=["read", "create", "update", "delete", "query"]
    )
    """The native cloud connection configuration."""
    offering_type: Literal[OfferingType.CSPM_MONITOR_AWS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorAws."""

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

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


class CspmMonitorAwsOfferingNativeCloudConnection(_Model):  # pylint: disable=name-too-long
    """The native cloud connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 CspmMonitorAzureDevOpsOffering(CloudOffering, discriminator="CspmMonitorAzureDevOps"):
    """The CSPM monitoring for AzureDevOps offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. CspmMonitorAzureDevOps.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_AZURE_DEV_OPS
    """

    offering_type: Literal[OfferingType.CSPM_MONITOR_AZURE_DEV_OPS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorAzureDevOps."""

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

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

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


class CspmMonitorDockerHubOffering(CloudOffering, discriminator="CspmMonitorDockerHub"):
    """The CSPM (Cloud security posture management) monitoring for Docker Hub offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. CspmMonitorDockerHub.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_DOCKER_HUB
    """

    offering_type: Literal[OfferingType.CSPM_MONITOR_DOCKER_HUB] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorDockerHub."""

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

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

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


class CspmMonitorGcpOffering(CloudOffering, discriminator="CspmMonitorGcp"):
    """The CSPM monitoring for GCP offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar native_cloud_connection: The native cloud connection configuration.
    :vartype native_cloud_connection:
     ~azure.mgmt.security.models.CspmMonitorGcpOfferingNativeCloudConnection
    :ivar offering_type: The type of the security offering. Required. CspmMonitorGcp.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_GCP
    """

    native_cloud_connection: Optional["_models.CspmMonitorGcpOfferingNativeCloudConnection"] = rest_field(
        name="nativeCloudConnection", visibility=["read", "create", "update", "delete", "query"]
    )
    """The native cloud connection configuration."""
    offering_type: Literal[OfferingType.CSPM_MONITOR_GCP] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorGcp."""

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

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


class CspmMonitorGcpOfferingNativeCloudConnection(_Model):  # pylint: disable=name-too-long
    """The native cloud connection configuration.

    :ivar workload_identity_provider_id: The GCP workload identity provider id for the offering.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this
     offering.
    :vartype service_account_email_address: str
    """

    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP workload identity provider id for the offering."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this offering."""

    @overload
    def __init__(
        self,
        *,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 CspmMonitorGithubOffering(CloudOffering, discriminator="CspmMonitorGithub"):
    """The CSPM monitoring for github offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. CspmMonitorGithub.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_GITHUB
    """

    offering_type: Literal[OfferingType.CSPM_MONITOR_GITHUB] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorGithub."""

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

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

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


class CspmMonitorGitLabOffering(CloudOffering, discriminator="CspmMonitorGitLab"):
    """The CSPM (Cloud security posture management) monitoring for gitlab offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. CspmMonitorGitLab.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_GIT_LAB
    """

    offering_type: Literal[OfferingType.CSPM_MONITOR_GIT_LAB] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorGitLab."""

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

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

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


class CspmMonitorJFrogOffering(CloudOffering, discriminator="CspmMonitorJFrog"):
    """The CSPM (Cloud security posture management) monitoring for JFrog Artifactory offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. CspmMonitorJFrog.
    :vartype offering_type: str or ~azure.mgmt.security.models.CSPM_MONITOR_J_FROG
    """

    offering_type: Literal[OfferingType.CSPM_MONITOR_J_FROG] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. CspmMonitorJFrog."""

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

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

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


class CustomRecommendation(ExtensionResource):
    """Custom Recommendation.

    :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.security.models.SystemData
    :ivar properties: describes Custom Recommendation properties.
    :vartype properties: ~azure.mgmt.security.models.CustomRecommendationProperties
    """

    properties: Optional["_models.CustomRecommendationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """describes Custom Recommendation properties."""

    __flattened_items = [
        "query",
        "cloud_providers",
        "severity",
        "security_issue",
        "display_name",
        "description",
        "remediation_description",
        "assessment_key",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 CustomRecommendationProperties(_Model):
    """describes the Custom Recommendation properties.

    :ivar query: KQL query representing the Recommendation results required.
    :vartype query: str
    :ivar cloud_providers: List of all standard supported clouds.
    :vartype cloud_providers: list[str or
     ~azure.mgmt.security.models.RecommendationSupportedClouds]
    :ivar severity: The severity to relate to the assessments generated by this Recommendation.
     Known values are: "High", "Medium", and "Low".
    :vartype severity: str or ~azure.mgmt.security.models.SeverityEnum
    :ivar security_issue: The severity to relate to the assessments generated by this
     Recommendation. Known values are: "Vulnerability", "ExcessivePermissions", "AnonymousAccess",
     "NetworkExposure", "TrafficEncryption", and "BestPractices".
    :vartype security_issue: str or ~azure.mgmt.security.models.SecurityIssue
    :ivar display_name: The display name of the assessments generated by this Recommendation.
    :vartype display_name: str
    :ivar description: The description to relate to the assessments generated by this
     Recommendation.
    :vartype description: str
    :ivar remediation_description: The remediation description to relate to the assessments
     generated by this Recommendation.
    :vartype remediation_description: str
    :ivar assessment_key: The assessment metadata key used when an assessment is generated for this
     Recommendation.
    :vartype assessment_key: str
    """

    query: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """KQL query representing the Recommendation results required."""
    cloud_providers: Optional[list[Union[str, "_models.RecommendationSupportedClouds"]]] = rest_field(
        name="cloudProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of all standard supported clouds."""
    severity: Optional[Union[str, "_models.SeverityEnum"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The severity to relate to the assessments generated by this Recommendation. Known values are:
     \"High\", \"Medium\", and \"Low\"."""
    security_issue: Optional[Union[str, "_models.SecurityIssue"]] = rest_field(
        name="securityIssue", visibility=["read", "create", "update", "delete", "query"]
    )
    """The severity to relate to the assessments generated by this Recommendation. Known values are:
     \"Vulnerability\", \"ExcessivePermissions\", \"AnonymousAccess\", \"NetworkExposure\",
     \"TrafficEncryption\", and \"BestPractices\"."""
    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The display name of the assessments generated by this Recommendation."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description to relate to the assessments generated by this Recommendation."""
    remediation_description: Optional[str] = rest_field(
        name="remediationDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """The remediation description to relate to the assessments generated by this Recommendation."""
    assessment_key: Optional[str] = rest_field(name="assessmentKey", visibility=["read"])
    """The assessment metadata key used when an assessment is generated for this Recommendation."""

    @overload
    def __init__(
        self,
        *,
        query: Optional[str] = None,
        cloud_providers: Optional[list[Union[str, "_models.RecommendationSupportedClouds"]]] = None,
        severity: Optional[Union[str, "_models.SeverityEnum"]] = None,
        security_issue: Optional[Union[str, "_models.SecurityIssue"]] = None,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        remediation_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 CVE(_Model):
    """CVE details.

    :ivar title: CVE title.
    :vartype title: str
    :ivar link: Link url.
    :vartype link: str
    """

    title: Optional[str] = rest_field(visibility=["read"])
    """CVE title."""
    link: Optional[str] = rest_field(visibility=["read"])
    """Link url."""


class CVSS(_Model):
    """CVSS details.

    :ivar base: CVSS base.
    :vartype base: float
    """

    base: Optional[float] = rest_field(visibility=["read"])
    """CVSS base."""


class DataExportSettingProperties(_Model):
    """The data export setting properties.

    :ivar enabled: Is the data export setting enabled. Required.
    :vartype enabled: bool
    """

    enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is the data export setting enabled. Required."""

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

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

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


class DataExportSettings(Setting, discriminator="DataExportSettings"):
    """Represents a data export 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.security.models.SystemData
    :ivar properties: Data export setting data.
    :vartype properties: ~azure.mgmt.security.models.DataExportSettingProperties
    :ivar kind: the kind of the settings string. Required. DataExportSettings.
    :vartype kind: str or ~azure.mgmt.security.models.DATA_EXPORT_SETTINGS
    """

    properties: Optional["_models.DataExportSettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Data export setting data."""
    kind: Literal[SettingKind.DATA_EXPORT_SETTINGS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """the kind of the settings string. Required. DataExportSettings."""

    __flattened_items = ["enabled"]

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

    @overload
    def __init__(self, mapping: Mapping[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 DefenderCspmAwsOffering(CloudOffering, discriminator="DefenderCspmAws"):
    """The CSPM P1 for AWS offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar vm_scanners: The Microsoft Defender for CSPM offering VM scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderCspmAwsOfferingVmScanners
    :ivar data_sensitivity_discovery: The Microsoft Defender Data Sensitivity discovery
     configuration.
    :vartype data_sensitivity_discovery:
     ~azure.mgmt.security.models.DefenderCspmAwsOfferingDataSensitivityDiscovery
    :ivar databases_dspm: The databases DSPM configuration.
    :vartype databases_dspm: ~azure.mgmt.security.models.DefenderCspmAwsOfferingDatabasesDspm
    :ivar ciem: Defenders CSPM Permissions Management offering configurations.
    :vartype ciem: ~azure.mgmt.security.models.DefenderCspmAwsOfferingCiem
    :ivar mdc_containers_image_assessment: The Microsoft Defender container image assessment
     configuration.
    :vartype mdc_containers_image_assessment:
     ~azure.mgmt.security.models.DefenderCspmAwsOfferingMdcContainersImageAssessment
    :ivar mdc_containers_agentless_discovery_k8_s: The Microsoft Defender container agentless
     discovery K8s configuration.
    :vartype mdc_containers_agentless_discovery_k8_s:
     ~azure.mgmt.security.models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S
    :ivar offering_type: The type of the security offering. Required. DefenderCspmAws.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_CSPM_AWS
    """

    vm_scanners: Optional["_models.DefenderCspmAwsOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for CSPM offering VM scanning configuration."""
    data_sensitivity_discovery: Optional["_models.DefenderCspmAwsOfferingDataSensitivityDiscovery"] = rest_field(
        name="dataSensitivityDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender Data Sensitivity discovery configuration."""
    databases_dspm: Optional["_models.DefenderCspmAwsOfferingDatabasesDspm"] = rest_field(
        name="databasesDspm", visibility=["read", "create", "update", "delete", "query"]
    )
    """The databases DSPM configuration."""
    ciem: Optional["_models.DefenderCspmAwsOfferingCiem"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defenders CSPM Permissions Management offering configurations."""
    mdc_containers_image_assessment: Optional["_models.DefenderCspmAwsOfferingMdcContainersImageAssessment"] = (
        rest_field(name="mdcContainersImageAssessment", visibility=["read", "create", "update", "delete", "query"])
    )
    """The Microsoft Defender container image assessment configuration."""
    mdc_containers_agentless_discovery_k8_s: Optional[
        "_models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S"
    ] = rest_field(
        name="mdcContainersAgentlessDiscoveryK8s", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender container agentless discovery K8s configuration."""
    offering_type: Literal[OfferingType.DEFENDER_CSPM_AWS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderCspmAws."""

    @overload
    def __init__(
        self,
        *,
        vm_scanners: Optional["_models.DefenderCspmAwsOfferingVmScanners"] = None,
        data_sensitivity_discovery: Optional["_models.DefenderCspmAwsOfferingDataSensitivityDiscovery"] = None,
        databases_dspm: Optional["_models.DefenderCspmAwsOfferingDatabasesDspm"] = None,
        ciem: Optional["_models.DefenderCspmAwsOfferingCiem"] = None,
        mdc_containers_image_assessment: Optional["_models.DefenderCspmAwsOfferingMdcContainersImageAssessment"] = None,
        mdc_containers_agentless_discovery_k8_s: Optional[
            "_models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S"
        ] = None,
    ) -> None: ...

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


class DefenderCspmAwsOfferingCiem(_Model):
    """Defenders CSPM Permissions Management offering configurations.

    :ivar ciem_discovery: Defender CSPM Permissions Management discovery configuration.
    :vartype ciem_discovery: ~azure.mgmt.security.models.DefenderCspmAwsOfferingCiemDiscovery
    :ivar ciem_oidc: AWS Defender CSPM Permissions Management OIDC (open id connect) connection
     configurations.
    :vartype ciem_oidc: ~azure.mgmt.security.models.DefenderCspmAwsOfferingCiemOidc
    """

    ciem_discovery: Optional["_models.DefenderCspmAwsOfferingCiemDiscovery"] = rest_field(
        name="ciemDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defender CSPM Permissions Management discovery configuration."""
    ciem_oidc: Optional["_models.DefenderCspmAwsOfferingCiemOidc"] = rest_field(
        name="ciemOidc", visibility=["read", "create", "update", "delete", "query"]
    )
    """AWS Defender CSPM Permissions Management OIDC (open id connect) connection configurations."""

    @overload
    def __init__(
        self,
        *,
        ciem_discovery: Optional["_models.DefenderCspmAwsOfferingCiemDiscovery"] = None,
        ciem_oidc: Optional["_models.DefenderCspmAwsOfferingCiemOidc"] = None,
    ) -> None: ...

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

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


class DefenderCspmAwsOfferingCiemDiscovery(_Model):
    """Defender CSPM Permissions Management discovery configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS for Permissions Management discovery.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for Permissions Management discovery."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderCspmAwsOfferingCiemOidc(_Model):
    """AWS Defender CSPM Permissions Management OIDC (open id connect) connection configurations.

    :ivar cloud_role_arn: The cloud role ARN in AWS for Permissions Management used for oidc
     connection.
    :vartype cloud_role_arn: str
    :ivar azure_active_directory_app_name: the azure active directory app name used of
     authenticating against AWS.
    :vartype azure_active_directory_app_name: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for Permissions Management used for oidc connection."""
    azure_active_directory_app_name: Optional[str] = rest_field(
        name="azureActiveDirectoryAppName", visibility=["read", "create", "update", "delete", "query"]
    )
    """the azure active directory app name used of authenticating against AWS."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: Optional[str] = None,
        azure_active_directory_app_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 DefenderCspmAwsOfferingDatabasesDspm(_Model):
    """The databases DSPM configuration.

    :ivar enabled: Is databases DSPM protection enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is databases DSPM protection enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderCspmAwsOfferingDataSensitivityDiscovery(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Data Sensitivity discovery configuration.

    :ivar enabled: Is Microsoft Defender Data Sensitivity discovery enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender Data Sensitivity discovery enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender container agentless discovery K8s configuration.

    :ivar enabled: Is Microsoft Defender container agentless discovery K8s enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container agentless discovery K8s enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderCspmAwsOfferingMdcContainersImageAssessment(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender container image assessment configuration.

    :ivar enabled: Is Microsoft Defender container image assessment enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container image assessment enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 VmScannersBase(_Model):
    """A VM scanning configuration for a security offering of a given environment.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is VM scanning enabled."""
    configuration: Optional["_models.VmScannersBaseConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration for VM scanning."""

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

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

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


class VmScannersAws(VmScannersBase):
    """A VM scanning configuration for a security offering of a Aws environment.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.VmScannersBaseConfiguration"] = None,
        cloud_role_arn: 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 DefenderCspmAwsOfferingVmScanners(VmScannersAws):
    """The Microsoft Defender for CSPM offering VM scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.VmScannersBaseConfiguration"] = None,
        cloud_role_arn: 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 DefenderCspmDockerHubOffering(CloudOffering, discriminator="DefenderCspmDockerHub"):
    """The Defender for CSPM Docker Hub offering configurations.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. DefenderCspmDockerHub.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_CSPM_DOCKER_HUB
    """

    offering_type: Literal[OfferingType.DEFENDER_CSPM_DOCKER_HUB] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderCspmDockerHub."""

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

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

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


class DefenderCspmGcpOffering(CloudOffering, discriminator="DefenderCspmGcp"):
    """The CSPM P1 for GCP offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar ciem_discovery: GCP Defenders CSPM Permissions Management OIDC (Open ID connect)
     connection configurations.
    :vartype ciem_discovery: ~azure.mgmt.security.models.DefenderCspmGcpOfferingCiemDiscovery
    :ivar vm_scanners: The Microsoft Defender for CSPM VM scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderCspmGcpOfferingVmScanners
    :ivar data_sensitivity_discovery: The Microsoft Defender Data Sensitivity discovery
     configuration.
    :vartype data_sensitivity_discovery:
     ~azure.mgmt.security.models.DefenderCspmGcpOfferingDataSensitivityDiscovery
    :ivar mdc_containers_image_assessment: The Microsoft Defender Container image assessment
     configuration.
    :vartype mdc_containers_image_assessment:
     ~azure.mgmt.security.models.DefenderCspmGcpOfferingMdcContainersImageAssessment
    :ivar mdc_containers_agentless_discovery_k8_s: The Microsoft Defender Container agentless
     discovery configuration.
    :vartype mdc_containers_agentless_discovery_k8_s:
     ~azure.mgmt.security.models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S
    :ivar offering_type: The type of the security offering. Required. DefenderCspmGcp.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_CSPM_GCP
    """

    ciem_discovery: Optional["_models.DefenderCspmGcpOfferingCiemDiscovery"] = rest_field(
        name="ciemDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """GCP Defenders CSPM Permissions Management OIDC (Open ID connect) connection configurations."""
    vm_scanners: Optional["_models.DefenderCspmGcpOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for CSPM VM scanning configuration."""
    data_sensitivity_discovery: Optional["_models.DefenderCspmGcpOfferingDataSensitivityDiscovery"] = rest_field(
        name="dataSensitivityDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender Data Sensitivity discovery configuration."""
    mdc_containers_image_assessment: Optional["_models.DefenderCspmGcpOfferingMdcContainersImageAssessment"] = (
        rest_field(name="mdcContainersImageAssessment", visibility=["read", "create", "update", "delete", "query"])
    )
    """The Microsoft Defender Container image assessment configuration."""
    mdc_containers_agentless_discovery_k8_s: Optional[
        "_models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S"
    ] = rest_field(
        name="mdcContainersAgentlessDiscoveryK8s", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender Container agentless discovery configuration."""
    offering_type: Literal[OfferingType.DEFENDER_CSPM_GCP] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderCspmGcp."""

    @overload
    def __init__(
        self,
        *,
        ciem_discovery: Optional["_models.DefenderCspmGcpOfferingCiemDiscovery"] = None,
        vm_scanners: Optional["_models.DefenderCspmGcpOfferingVmScanners"] = None,
        data_sensitivity_discovery: Optional["_models.DefenderCspmGcpOfferingDataSensitivityDiscovery"] = None,
        mdc_containers_image_assessment: Optional["_models.DefenderCspmGcpOfferingMdcContainersImageAssessment"] = None,
        mdc_containers_agentless_discovery_k8_s: Optional[
            "_models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S"
        ] = None,
    ) -> None: ...

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


class DefenderCspmGcpOfferingCiemDiscovery(_Model):
    """GCP Defenders CSPM Permissions Management OIDC (Open ID connect) connection configurations.

    :ivar workload_identity_provider_id: The GCP workload identity provider id for Permissions
     Management offering.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for Permissions
     Management offering.
    :vartype service_account_email_address: str
    :ivar azure_active_directory_app_name: the azure active directory app name used of
     authenticating against GCP workload identity federation.
    :vartype azure_active_directory_app_name: str
    """

    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP workload identity provider id for Permissions Management offering."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for Permissions Management offering."""
    azure_active_directory_app_name: Optional[str] = rest_field(
        name="azureActiveDirectoryAppName", visibility=["read", "create", "update", "delete", "query"]
    )
    """the azure active directory app name used of authenticating against GCP workload identity
     federation."""

    @overload
    def __init__(
        self,
        *,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: Optional[str] = None,
        azure_active_directory_app_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 DefenderCspmGcpOfferingDataSensitivityDiscovery(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Data Sensitivity discovery configuration.

    :ivar enabled: Is Microsoft Defender Data Sensitivity discovery enabled.
    :vartype enabled: bool
    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender Data Sensitivity discovery enabled."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Container agentless discovery configuration.

    :ivar enabled: Is Microsoft Defender container agentless discovery enabled.
    :vartype enabled: bool
    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container agentless discovery enabled."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 DefenderCspmGcpOfferingMdcContainersImageAssessment(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Container image assessment configuration.

    :ivar enabled: Is Microsoft Defender container image assessment enabled.
    :vartype enabled: bool
    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container image assessment enabled."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 VmScannersGcp(VmScannersBase):
    """A VM scanning configuration for a security offering of a GCP environment.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    """

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

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

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


class DefenderCspmGcpOfferingVmScanners(VmScannersGcp):
    """The Microsoft Defender for CSPM VM scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    """

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

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

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


class DefenderCspmJFrogOffering(CloudOffering, discriminator="DefenderCspmJFrog"):
    """The CSPM P1 for JFrog Artifactory offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar mdc_containers_image_assessment: The Microsoft Defender Container image assessment
     configuration.
    :vartype mdc_containers_image_assessment:
     ~azure.mgmt.security.models.DefenderCspmJFrogOfferingMdcContainersImageAssessment
    :ivar offering_type: The type of the security offering. Required. DefenderCspmJFrog.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_CSPM_J_FROG
    """

    mdc_containers_image_assessment: Optional["_models.DefenderCspmJFrogOfferingMdcContainersImageAssessment"] = (
        rest_field(name="mdcContainersImageAssessment", visibility=["read", "create", "update", "delete", "query"])
    )
    """The Microsoft Defender Container image assessment configuration."""
    offering_type: Literal[OfferingType.DEFENDER_CSPM_J_FROG] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderCspmJFrog."""

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

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


class DefenderCspmJFrogOfferingMdcContainersImageAssessment(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Container image assessment configuration.

    :ivar enabled: Is Microsoft Defender container image assessment enabled.
    :vartype enabled: bool
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container image assessment enabled."""

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

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

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


class DefenderFoDatabasesAwsOffering(CloudOffering, discriminator="DefenderForDatabasesAws"):
    """The Defender for Databases AWS offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar arc_auto_provisioning: The ARC autoprovisioning configuration.
    :vartype arc_auto_provisioning:
     ~azure.mgmt.security.models.DefenderFoDatabasesAwsOfferingArcAutoProvisioning
    :ivar rds: The RDS configuration.
    :vartype rds: ~azure.mgmt.security.models.DefenderFoDatabasesAwsOfferingRds
    :ivar databases_dspm: The databases data security posture management (DSPM) configuration.
    :vartype databases_dspm:
     ~azure.mgmt.security.models.DefenderFoDatabasesAwsOfferingDatabasesDspm
    :ivar offering_type: The type of the security offering. Required. DefenderForDatabasesAws.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_DATABASES_AWS
    """

    arc_auto_provisioning: Optional["_models.DefenderFoDatabasesAwsOfferingArcAutoProvisioning"] = rest_field(
        name="arcAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ARC autoprovisioning configuration."""
    rds: Optional["_models.DefenderFoDatabasesAwsOfferingRds"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The RDS configuration."""
    databases_dspm: Optional["_models.DefenderFoDatabasesAwsOfferingDatabasesDspm"] = rest_field(
        name="databasesDspm", visibility=["read", "create", "update", "delete", "query"]
    )
    """The databases data security posture management (DSPM) configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_DATABASES_AWS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForDatabasesAws."""

    @overload
    def __init__(
        self,
        *,
        arc_auto_provisioning: Optional["_models.DefenderFoDatabasesAwsOfferingArcAutoProvisioning"] = None,
        rds: Optional["_models.DefenderFoDatabasesAwsOfferingRds"] = None,
        databases_dspm: Optional["_models.DefenderFoDatabasesAwsOfferingDatabasesDspm"] = None,
    ) -> None: ...

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


class DefenderFoDatabasesAwsOfferingArcAutoProvisioning(ArcAutoProvisioningAws):  # pylint: disable=name-too-long
    """The ARC autoprovisioning configuration.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.ArcAutoProvisioningConfiguration"] = None,
        cloud_role_arn: 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 DefenderFoDatabasesAwsOfferingDatabasesDspm(_Model):  # pylint: disable=name-too-long
    """The databases data security posture management (DSPM) configuration.

    :ivar enabled: Is databases data security posture management (DSPM) protection enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is databases data security posture management (DSPM) protection enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderFoDatabasesAwsOfferingRds(_Model):
    """The RDS configuration.

    :ivar enabled: Is RDS protection enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is RDS protection enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderForContainersAwsOffering(CloudOffering, discriminator="DefenderForContainersAws"):
    """The Defender for Containers AWS offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar kubernetes_service: The kubernetes service connection configuration.
    :vartype kubernetes_service:
     ~azure.mgmt.security.models.DefenderForContainersAwsOfferingKubernetesService
    :ivar kubernetes_data_collection: The kubernetes data collection connection configuration.
    :vartype kubernetes_data_collection:
     ~azure.mgmt.security.models.DefenderForContainersAwsOfferingKubernetesDataCollection
    :ivar cloud_watch_to_kinesis: The cloudwatch to kinesis connection configuration.
    :vartype cloud_watch_to_kinesis:
     ~azure.mgmt.security.models.DefenderForContainersAwsOfferingCloudWatchToKinesis
    :ivar kinesis_to_s3: The kinesis to s3 connection configuration.
    :vartype kinesis_to_s3: ~azure.mgmt.security.models.DefenderForContainersAwsOfferingKinesisToS3
    :ivar enable_audit_logs_auto_provisioning: Is audit logs data collection enabled.
    :vartype enable_audit_logs_auto_provisioning: bool
    :ivar enable_defender_agent_auto_provisioning: Is Microsoft Defender for Cloud Kubernetes agent
     auto provisioning enabled.
    :vartype enable_defender_agent_auto_provisioning: bool
    :ivar enable_policy_agent_auto_provisioning: Is Policy Kubernetes agent auto provisioning
     enabled.
    :vartype enable_policy_agent_auto_provisioning: bool
    :ivar kube_audit_retention_time: The retention time in days of kube audit logs set on the
     CloudWatch log group.
    :vartype kube_audit_retention_time: int
    :ivar data_collection_external_id: The externalId used by the data reader to prevent the
     confused deputy attack.
    :vartype data_collection_external_id: str
    :ivar mdc_containers_image_assessment: The Microsoft Defender container image assessment
     configuration.
    :vartype mdc_containers_image_assessment:
     ~azure.mgmt.security.models.DefenderForContainersAwsOfferingMdcContainersImageAssessment
    :ivar mdc_containers_agentless_discovery_k8_s: The Microsoft Defender container agentless
     discovery K8s configuration.
    :vartype mdc_containers_agentless_discovery_k8_s:
     ~azure.mgmt.security.models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S
    :ivar vm_scanners: The Microsoft Defender for Container K8s VM host scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderForContainersAwsOfferingVmScanners
    :ivar offering_type: The type of the security offering. Required. DefenderForContainersAws.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_CONTAINERS_AWS
    """

    kubernetes_service: Optional["_models.DefenderForContainersAwsOfferingKubernetesService"] = rest_field(
        name="kubernetesService", visibility=["read", "create", "update", "delete", "query"]
    )
    """The kubernetes service connection configuration."""
    kubernetes_data_collection: Optional["_models.DefenderForContainersAwsOfferingKubernetesDataCollection"] = (
        rest_field(name="kubernetesDataCollection", visibility=["read", "create", "update", "delete", "query"])
    )
    """The kubernetes data collection connection configuration."""
    cloud_watch_to_kinesis: Optional["_models.DefenderForContainersAwsOfferingCloudWatchToKinesis"] = rest_field(
        name="cloudWatchToKinesis", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloudwatch to kinesis connection configuration."""
    kinesis_to_s3: Optional["_models.DefenderForContainersAwsOfferingKinesisToS3"] = rest_field(
        name="kinesisToS3", visibility=["read", "create", "update", "delete", "query"]
    )
    """The kinesis to s3 connection configuration."""
    enable_audit_logs_auto_provisioning: Optional[bool] = rest_field(
        name="enableAuditLogsAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is audit logs data collection enabled."""
    enable_defender_agent_auto_provisioning: Optional[bool] = rest_field(
        name="enableDefenderAgentAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled."""
    enable_policy_agent_auto_provisioning: Optional[bool] = rest_field(
        name="enablePolicyAgentAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is Policy Kubernetes agent auto provisioning enabled."""
    kube_audit_retention_time: Optional[int] = rest_field(
        name="kubeAuditRetentionTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The retention time in days of kube audit logs set on the CloudWatch log group."""
    data_collection_external_id: Optional[str] = rest_field(
        name="dataCollectionExternalId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The externalId used by the data reader to prevent the confused deputy attack."""
    mdc_containers_image_assessment: Optional[
        "_models.DefenderForContainersAwsOfferingMdcContainersImageAssessment"
    ] = rest_field(name="mdcContainersImageAssessment", visibility=["read", "create", "update", "delete", "query"])
    """The Microsoft Defender container image assessment configuration."""
    mdc_containers_agentless_discovery_k8_s: Optional[
        "_models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S"
    ] = rest_field(
        name="mdcContainersAgentlessDiscoveryK8s", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender container agentless discovery K8s configuration."""
    vm_scanners: Optional["_models.DefenderForContainersAwsOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Container K8s VM host scanning configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_CONTAINERS_AWS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForContainersAws."""

    @overload
    def __init__(
        self,
        *,
        kubernetes_service: Optional["_models.DefenderForContainersAwsOfferingKubernetesService"] = None,
        kubernetes_data_collection: Optional["_models.DefenderForContainersAwsOfferingKubernetesDataCollection"] = None,
        cloud_watch_to_kinesis: Optional["_models.DefenderForContainersAwsOfferingCloudWatchToKinesis"] = None,
        kinesis_to_s3: Optional["_models.DefenderForContainersAwsOfferingKinesisToS3"] = None,
        enable_audit_logs_auto_provisioning: Optional[bool] = None,
        enable_defender_agent_auto_provisioning: Optional[bool] = None,
        enable_policy_agent_auto_provisioning: Optional[bool] = None,
        kube_audit_retention_time: Optional[int] = None,
        data_collection_external_id: Optional[str] = None,
        mdc_containers_image_assessment: Optional[
            "_models.DefenderForContainersAwsOfferingMdcContainersImageAssessment"
        ] = None,
        mdc_containers_agentless_discovery_k8_s: Optional[
            "_models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S"
        ] = None,
        vm_scanners: Optional["_models.DefenderForContainersAwsOfferingVmScanners"] = None,
    ) -> None: ...

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


class DefenderForContainersAwsOfferingCloudWatchToKinesis(_Model):  # pylint: disable=name-too-long
    """The cloudwatch to kinesis connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS used by CloudWatch to transfer data into
     Kinesis.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingKinesisToS3(_Model):  # pylint: disable=name-too-long
    """The kinesis to s3 connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS used by Kinesis to transfer data into S3.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS used by Kinesis to transfer data into S3."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingKubernetesDataCollection(_Model):  # pylint: disable=name-too-long
    """The kubernetes data collection connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature used for reading data.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature used for reading data."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingKubernetesService(_Model):  # pylint: disable=name-too-long
    """The kubernetes service connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature used for provisioning
     resources.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature used for provisioning resources."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender container agentless discovery K8s configuration.

    :ivar enabled: Is Microsoft Defender container agentless discovery K8s enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container agentless discovery K8s enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingMdcContainersImageAssessment(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender container image assessment configuration.

    :ivar enabled: Is Microsoft Defender container image assessment enabled.
    :vartype enabled: bool
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container image assessment enabled."""
    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        cloud_role_arn: 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 DefenderForContainersAwsOfferingVmScanners(VmScannersAws):  # pylint: disable=name-too-long
    """The Microsoft Defender for Container K8s VM host scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.VmScannersBaseConfiguration"] = None,
        cloud_role_arn: 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 DefenderForContainersDockerHubOffering(CloudOffering, discriminator="DefenderForContainersDockerHub"):
    """The Defender for containers Docker Hub offering configurations.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required.
     DefenderForContainersDockerHub.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_CONTAINERS_DOCKER_HUB
    """

    offering_type: Literal[OfferingType.DEFENDER_FOR_CONTAINERS_DOCKER_HUB] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForContainersDockerHub."""

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

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

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


class DefenderForContainersGcpOffering(CloudOffering, discriminator="DefenderForContainersGcp"):
    """The containers GCP offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar native_cloud_connection: The native cloud connection configuration.
    :vartype native_cloud_connection:
     ~azure.mgmt.security.models.DefenderForContainersGcpOfferingNativeCloudConnection
    :ivar data_pipeline_native_cloud_connection: The native cloud connection configuration.
    :vartype data_pipeline_native_cloud_connection:
     ~azure.mgmt.security.models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection
    :ivar enable_audit_logs_auto_provisioning: Is audit logs data collection enabled.
    :vartype enable_audit_logs_auto_provisioning: bool
    :ivar enable_defender_agent_auto_provisioning: Is Microsoft Defender for Cloud Kubernetes agent
     auto provisioning enabled.
    :vartype enable_defender_agent_auto_provisioning: bool
    :ivar enable_policy_agent_auto_provisioning: Is Policy Kubernetes agent auto provisioning
     enabled.
    :vartype enable_policy_agent_auto_provisioning: bool
    :ivar mdc_containers_image_assessment: The Microsoft Defender Container image assessment
     configuration.
    :vartype mdc_containers_image_assessment:
     ~azure.mgmt.security.models.DefenderForContainersGcpOfferingMdcContainersImageAssessment
    :ivar mdc_containers_agentless_discovery_k8_s: The Microsoft Defender Container agentless
     discovery configuration.
    :vartype mdc_containers_agentless_discovery_k8_s:
     ~azure.mgmt.security.models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S
    :ivar vm_scanners: The Microsoft Defender for Container K8s VM host scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderForContainersGcpOfferingVmScanners
    :ivar offering_type: The type of the security offering. Required. DefenderForContainersGcp.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_CONTAINERS_GCP
    """

    native_cloud_connection: Optional["_models.DefenderForContainersGcpOfferingNativeCloudConnection"] = rest_field(
        name="nativeCloudConnection", visibility=["read", "create", "update", "delete", "query"]
    )
    """The native cloud connection configuration."""
    data_pipeline_native_cloud_connection: Optional[
        "_models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection"
    ] = rest_field(name="dataPipelineNativeCloudConnection", visibility=["read", "create", "update", "delete", "query"])
    """The native cloud connection configuration."""
    enable_audit_logs_auto_provisioning: Optional[bool] = rest_field(
        name="enableAuditLogsAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is audit logs data collection enabled."""
    enable_defender_agent_auto_provisioning: Optional[bool] = rest_field(
        name="enableDefenderAgentAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled."""
    enable_policy_agent_auto_provisioning: Optional[bool] = rest_field(
        name="enablePolicyAgentAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Is Policy Kubernetes agent auto provisioning enabled."""
    mdc_containers_image_assessment: Optional[
        "_models.DefenderForContainersGcpOfferingMdcContainersImageAssessment"
    ] = rest_field(name="mdcContainersImageAssessment", visibility=["read", "create", "update", "delete", "query"])
    """The Microsoft Defender Container image assessment configuration."""
    mdc_containers_agentless_discovery_k8_s: Optional[
        "_models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S"
    ] = rest_field(
        name="mdcContainersAgentlessDiscoveryK8s", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender Container agentless discovery configuration."""
    vm_scanners: Optional["_models.DefenderForContainersGcpOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Container K8s VM host scanning configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_CONTAINERS_GCP] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForContainersGcp."""

    @overload
    def __init__(
        self,
        *,
        native_cloud_connection: Optional["_models.DefenderForContainersGcpOfferingNativeCloudConnection"] = None,
        data_pipeline_native_cloud_connection: Optional[
            "_models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection"
        ] = None,
        enable_audit_logs_auto_provisioning: Optional[bool] = None,
        enable_defender_agent_auto_provisioning: Optional[bool] = None,
        enable_policy_agent_auto_provisioning: Optional[bool] = None,
        mdc_containers_image_assessment: Optional[
            "_models.DefenderForContainersGcpOfferingMdcContainersImageAssessment"
        ] = None,
        mdc_containers_agentless_discovery_k8_s: Optional[
            "_models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S"
        ] = None,
        vm_scanners: Optional["_models.DefenderForContainersGcpOfferingVmScanners"] = None,
    ) -> None: ...

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


class DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection(_Model):  # pylint: disable=name-too-long
    """The native cloud connection configuration.

    :ivar service_account_email_address: The data collection service account email address in GCP
     for this offering.
    :vartype service_account_email_address: str
    :ivar workload_identity_provider_id: The data collection GCP workload identity provider id for
     this offering.
    :vartype workload_identity_provider_id: str
    """

    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The data collection service account email address in GCP for this offering."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The data collection GCP workload identity provider id for this offering."""

    @overload
    def __init__(
        self,
        *,
        service_account_email_address: Optional[str] = None,
        workload_identity_provider_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 DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Container agentless discovery configuration.

    :ivar enabled: Is Microsoft Defender container agentless discovery enabled.
    :vartype enabled: bool
    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container agentless discovery enabled."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 DefenderForContainersGcpOfferingMdcContainersImageAssessment(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender Container image assessment configuration.

    :ivar enabled: Is Microsoft Defender container image assessment enabled.
    :vartype enabled: bool
    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender container image assessment enabled."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 DefenderForContainersGcpOfferingNativeCloudConnection(_Model):  # pylint: disable=name-too-long
    """The native cloud connection configuration.

    :ivar service_account_email_address: The service account email address in GCP for this
     offering.
    :vartype service_account_email_address: str
    :ivar workload_identity_provider_id: The GCP workload identity provider id for this offering.
    :vartype workload_identity_provider_id: str
    """

    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this offering."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP workload identity provider id for this offering."""

    @overload
    def __init__(
        self,
        *,
        service_account_email_address: Optional[str] = None,
        workload_identity_provider_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 DefenderForContainersGcpOfferingVmScanners(VmScannersGcp):  # pylint: disable=name-too-long
    """The Microsoft Defender for Container K8s VM host scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    """

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

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

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


class DefenderForContainersJFrogOffering(CloudOffering, discriminator="DefenderForContainersJFrog"):
    """The Defender for Containers for JFrog Artifactory offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar offering_type: The type of the security offering. Required. DefenderForContainersJFrog.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_CONTAINERS_J_FROG
    """

    offering_type: Literal[OfferingType.DEFENDER_FOR_CONTAINERS_J_FROG] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForContainersJFrog."""

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

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

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


class DefenderForDatabasesGcpOffering(CloudOffering, discriminator="DefenderForDatabasesGcp"):
    """The Defender for Databases GCP offering configurations.

    :ivar description: The offering description.
    :vartype description: str
    :ivar arc_auto_provisioning: The ARC autoprovisioning configuration.
    :vartype arc_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForDatabasesGcpOfferingArcAutoProvisioning
    :ivar defender_for_databases_arc_auto_provisioning: The native cloud connection configuration.
    :vartype defender_for_databases_arc_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning
    :ivar offering_type: The type of the security offering. Required. DefenderForDatabasesGcp.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_DATABASES_GCP
    """

    arc_auto_provisioning: Optional["_models.DefenderForDatabasesGcpOfferingArcAutoProvisioning"] = rest_field(
        name="arcAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ARC autoprovisioning configuration."""
    defender_for_databases_arc_auto_provisioning: Optional[
        "_models.DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning"
    ] = rest_field(
        name="defenderForDatabasesArcAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The native cloud connection configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_DATABASES_GCP] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForDatabasesGcp."""

    @overload
    def __init__(
        self,
        *,
        arc_auto_provisioning: Optional["_models.DefenderForDatabasesGcpOfferingArcAutoProvisioning"] = None,
        defender_for_databases_arc_auto_provisioning: Optional[
            "_models.DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning"
        ] = None,
    ) -> None: ...

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


class DefenderForDatabasesGcpOfferingArcAutoProvisioning(ArcAutoProvisioningGcp):  # pylint: disable=name-too-long
    """The ARC autoprovisioning configuration.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    """

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

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

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


class DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning(_Model):  # pylint: disable=name-too-long
    """The native cloud connection configuration.

    :ivar service_account_email_address: The service account email address in GCP for this
     offering.
    :vartype service_account_email_address: str
    :ivar workload_identity_provider_id: The GCP workload identity provider id for this offering.
    :vartype workload_identity_provider_id: str
    """

    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this offering."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP workload identity provider id for this offering."""

    @overload
    def __init__(
        self,
        *,
        service_account_email_address: Optional[str] = None,
        workload_identity_provider_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 DefenderForServersAwsOffering(CloudOffering, discriminator="DefenderForServersAws"):
    """The Defender for Servers AWS offering.

    :ivar description: The offering description.
    :vartype description: str
    :ivar defender_for_servers: The Defender for servers connection configuration.
    :vartype defender_for_servers:
     ~azure.mgmt.security.models.DefenderForServersAwsOfferingDefenderForServers
    :ivar arc_auto_provisioning: The ARC autoprovisioning configuration.
    :vartype arc_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersAwsOfferingArcAutoProvisioning
    :ivar va_auto_provisioning: The Vulnerability Assessment autoprovisioning configuration.
    :vartype va_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersAwsOfferingVaAutoProvisioning
    :ivar mde_auto_provisioning: The Microsoft Defender for Endpoint autoprovisioning
     configuration.
    :vartype mde_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersAwsOfferingMdeAutoProvisioning
    :ivar sub_plan: configuration for the servers offering subPlan.
    :vartype sub_plan: ~azure.mgmt.security.models.DefenderForServersAwsOfferingSubPlan
    :ivar vm_scanners: The Microsoft Defender for Server VM scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderForServersAwsOfferingVmScanners
    :ivar offering_type: The type of the security offering. Required. DefenderForServersAws.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_SERVERS_AWS
    """

    defender_for_servers: Optional["_models.DefenderForServersAwsOfferingDefenderForServers"] = rest_field(
        name="defenderForServers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Defender for servers connection configuration."""
    arc_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingArcAutoProvisioning"] = rest_field(
        name="arcAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ARC autoprovisioning configuration."""
    va_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingVaAutoProvisioning"] = rest_field(
        name="vaAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Vulnerability Assessment autoprovisioning configuration."""
    mde_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingMdeAutoProvisioning"] = rest_field(
        name="mdeAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Endpoint autoprovisioning configuration."""
    sub_plan: Optional["_models.DefenderForServersAwsOfferingSubPlan"] = rest_field(
        name="subPlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """configuration for the servers offering subPlan."""
    vm_scanners: Optional["_models.DefenderForServersAwsOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Server VM scanning configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_SERVERS_AWS] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForServersAws."""

    @overload
    def __init__(
        self,
        *,
        defender_for_servers: Optional["_models.DefenderForServersAwsOfferingDefenderForServers"] = None,
        arc_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingArcAutoProvisioning"] = None,
        va_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingVaAutoProvisioning"] = None,
        mde_auto_provisioning: Optional["_models.DefenderForServersAwsOfferingMdeAutoProvisioning"] = None,
        sub_plan: Optional["_models.DefenderForServersAwsOfferingSubPlan"] = None,
        vm_scanners: Optional["_models.DefenderForServersAwsOfferingVmScanners"] = None,
    ) -> None: ...

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


class DefenderForServersAwsOfferingArcAutoProvisioning(ArcAutoProvisioningAws):  # pylint: disable=name-too-long
    """The ARC autoprovisioning configuration.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.ArcAutoProvisioningConfiguration"] = None,
        cloud_role_arn: 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 DefenderForServersAwsOfferingDefenderForServers(_Model):  # pylint: disable=name-too-long
    """The Defender for servers connection configuration.

    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    cloud_role_arn: Optional[str] = rest_field(
        name="cloudRoleArn", visibility=["read", "create", "update", "delete", "query"]
    )
    """The cloud role ARN in AWS for this feature."""

    @overload
    def __init__(
        self,
        *,
        cloud_role_arn: 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 DefenderForServersAwsOfferingMdeAutoProvisioning(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender for Endpoint autoprovisioning configuration.

    :ivar enabled: Is Microsoft Defender for Endpoint auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: configuration for Microsoft Defender for Endpoint autoprovisioning.
    :vartype configuration: any
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender for Endpoint auto provisioning enabled."""
    configuration: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """configuration for Microsoft Defender for Endpoint autoprovisioning."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional[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 DefenderForServersAwsOfferingSubPlan(_Model):
    """configuration for the servers offering subPlan.

    :ivar type: The available sub plans. Known values are: "P1" and "P2".
    :vartype type: str or ~azure.mgmt.security.models.SubPlan
    """

    type: Optional[Union[str, "_models.SubPlan"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The available sub plans. Known values are: \"P1\" and \"P2\"."""

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

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

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


class DefenderForServersAwsOfferingVaAutoProvisioning(_Model):  # pylint: disable=name-too-long
    """The Vulnerability Assessment autoprovisioning configuration.

    :ivar enabled: Is Vulnerability Assessment auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: configuration for Vulnerability Assessment autoprovisioning.
    :vartype configuration:
     ~azure.mgmt.security.models.DefenderForServersAwsOfferingVaAutoProvisioningConfiguration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Vulnerability Assessment auto provisioning enabled."""
    configuration: Optional["_models.DefenderForServersAwsOfferingVaAutoProvisioningConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """configuration for Vulnerability Assessment autoprovisioning."""

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

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

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


class DefenderForServersAwsOfferingVaAutoProvisioningConfiguration(_Model):  # pylint: disable=name-too-long
    """configuration for Vulnerability Assessment autoprovisioning.

    :ivar type: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or
     'Qualys'. Known values are: "Qualys" and "TVM".
    :vartype type: str or ~azure.mgmt.security.models.Type
    """

    type: Optional[Union[str, "_models.Type"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. Known
     values are: \"Qualys\" and \"TVM\"."""

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

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

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


class DefenderForServersAwsOfferingVmScanners(VmScannersAws):
    """The Microsoft Defender for Server VM scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    :ivar cloud_role_arn: The cloud role ARN in AWS for this feature.
    :vartype cloud_role_arn: str
    """

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional["_models.VmScannersBaseConfiguration"] = None,
        cloud_role_arn: 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 DefenderForServersGcpOffering(CloudOffering, discriminator="DefenderForServersGcp"):
    """The Defender for Servers GCP offering configurations.

    :ivar description: The offering description.
    :vartype description: str
    :ivar defender_for_servers: The Defender for servers connection configuration.
    :vartype defender_for_servers:
     ~azure.mgmt.security.models.DefenderForServersGcpOfferingDefenderForServers
    :ivar arc_auto_provisioning: The ARC autoprovisioning configuration.
    :vartype arc_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersGcpOfferingArcAutoProvisioning
    :ivar va_auto_provisioning: The Vulnerability Assessment autoprovisioning configuration.
    :vartype va_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersGcpOfferingVaAutoProvisioning
    :ivar mde_auto_provisioning: The Microsoft Defender for Endpoint autoprovisioning
     configuration.
    :vartype mde_auto_provisioning:
     ~azure.mgmt.security.models.DefenderForServersGcpOfferingMdeAutoProvisioning
    :ivar sub_plan: configuration for the servers offering subPlan.
    :vartype sub_plan: ~azure.mgmt.security.models.DefenderForServersGcpOfferingSubPlan
    :ivar vm_scanners: The Microsoft Defender for Server VM scanning configuration.
    :vartype vm_scanners: ~azure.mgmt.security.models.DefenderForServersGcpOfferingVmScanners
    :ivar offering_type: The type of the security offering. Required. DefenderForServersGcp.
    :vartype offering_type: str or ~azure.mgmt.security.models.DEFENDER_FOR_SERVERS_GCP
    """

    defender_for_servers: Optional["_models.DefenderForServersGcpOfferingDefenderForServers"] = rest_field(
        name="defenderForServers", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Defender for servers connection configuration."""
    arc_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingArcAutoProvisioning"] = rest_field(
        name="arcAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ARC autoprovisioning configuration."""
    va_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingVaAutoProvisioning"] = rest_field(
        name="vaAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Vulnerability Assessment autoprovisioning configuration."""
    mde_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingMdeAutoProvisioning"] = rest_field(
        name="mdeAutoProvisioning", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Endpoint autoprovisioning configuration."""
    sub_plan: Optional["_models.DefenderForServersGcpOfferingSubPlan"] = rest_field(
        name="subPlan", visibility=["read", "create", "update", "delete", "query"]
    )
    """configuration for the servers offering subPlan."""
    vm_scanners: Optional["_models.DefenderForServersGcpOfferingVmScanners"] = rest_field(
        name="vmScanners", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Microsoft Defender for Server VM scanning configuration."""
    offering_type: Literal[OfferingType.DEFENDER_FOR_SERVERS_GCP] = rest_discriminator(name="offeringType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the security offering. Required. DefenderForServersGcp."""

    @overload
    def __init__(
        self,
        *,
        defender_for_servers: Optional["_models.DefenderForServersGcpOfferingDefenderForServers"] = None,
        arc_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingArcAutoProvisioning"] = None,
        va_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingVaAutoProvisioning"] = None,
        mde_auto_provisioning: Optional["_models.DefenderForServersGcpOfferingMdeAutoProvisioning"] = None,
        sub_plan: Optional["_models.DefenderForServersGcpOfferingSubPlan"] = None,
        vm_scanners: Optional["_models.DefenderForServersGcpOfferingVmScanners"] = None,
    ) -> None: ...

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


class DefenderForServersGcpOfferingArcAutoProvisioning(ArcAutoProvisioningGcp):  # pylint: disable=name-too-long
    """The ARC autoprovisioning configuration.

    :ivar enabled: Is arc auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for servers Arc auto provisioning for a given environment.
    :vartype configuration: ~azure.mgmt.security.models.ArcAutoProvisioningConfiguration
    """

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

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

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


class DefenderForServersGcpOfferingDefenderForServers(_Model):  # pylint: disable=name-too-long
    """The Defender for servers connection configuration.

    :ivar workload_identity_provider_id: The workload identity provider id in GCP for this feature.
    :vartype workload_identity_provider_id: str
    :ivar service_account_email_address: The service account email address in GCP for this feature.
    :vartype service_account_email_address: str
    """

    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The workload identity provider id in GCP for this feature."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address in GCP for this feature."""

    @overload
    def __init__(
        self,
        *,
        workload_identity_provider_id: Optional[str] = None,
        service_account_email_address: 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 DefenderForServersGcpOfferingMdeAutoProvisioning(_Model):  # pylint: disable=name-too-long
    """The Microsoft Defender for Endpoint autoprovisioning configuration.

    :ivar enabled: Is Microsoft Defender for Endpoint auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: configuration for Microsoft Defender for Endpoint autoprovisioning.
    :vartype configuration: any
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Microsoft Defender for Endpoint auto provisioning enabled."""
    configuration: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """configuration for Microsoft Defender for Endpoint autoprovisioning."""

    @overload
    def __init__(
        self,
        *,
        enabled: Optional[bool] = None,
        configuration: Optional[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 DefenderForServersGcpOfferingSubPlan(_Model):
    """configuration for the servers offering subPlan.

    :ivar type: The available sub plans. Known values are: "P1" and "P2".
    :vartype type: str or ~azure.mgmt.security.models.SubPlan
    """

    type: Optional[Union[str, "_models.SubPlan"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The available sub plans. Known values are: \"P1\" and \"P2\"."""

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

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

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


class DefenderForServersGcpOfferingVaAutoProvisioning(_Model):  # pylint: disable=name-too-long
    """The Vulnerability Assessment autoprovisioning configuration.

    :ivar enabled: Is Vulnerability Assessment auto provisioning enabled.
    :vartype enabled: bool
    :ivar configuration: configuration for Vulnerability Assessment autoprovisioning.
    :vartype configuration:
     ~azure.mgmt.security.models.DefenderForServersGcpOfferingVaAutoProvisioningConfiguration
    """

    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is Vulnerability Assessment auto provisioning enabled."""
    configuration: Optional["_models.DefenderForServersGcpOfferingVaAutoProvisioningConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """configuration for Vulnerability Assessment autoprovisioning."""

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

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

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


class DefenderForServersGcpOfferingVaAutoProvisioningConfiguration(_Model):  # pylint: disable=name-too-long
    """configuration for Vulnerability Assessment autoprovisioning.

    :ivar type: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or
     'Qualys'. Known values are: "Qualys" and "TVM".
    :vartype type: str or ~azure.mgmt.security.models.Type
    """

    type: Optional[Union[str, "_models.Type"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. Known
     values are: \"Qualys\" and \"TVM\"."""

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

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

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


class DefenderForServersGcpOfferingVmScanners(VmScannersGcp):
    """The Microsoft Defender for Server VM scanning configuration.

    :ivar enabled: Is VM scanning enabled.
    :vartype enabled: bool
    :ivar configuration: Configuration for VM scanning.
    :vartype configuration: ~azure.mgmt.security.models.VmScannersBaseConfiguration
    """

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

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

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


class DefenderForStorageSetting(ExtensionResource):
    """The Defender for Storage 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.security.models.SystemData
    :ivar properties: Defender for Storage resource properties.
    :vartype properties: ~azure.mgmt.security.models.DefenderForStorageSettingProperties
    """

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

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

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

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


class DefenderForStorageSettingProperties(_Model):
    """Defender for Storage resource properties.

    :ivar is_enabled: Indicates whether Defender for Storage is enabled on this storage account.
    :vartype is_enabled: bool
    :ivar malware_scanning: Properties of Malware Scanning.
    :vartype malware_scanning: ~azure.mgmt.security.models.MalwareScanningProperties
    :ivar sensitive_data_discovery: Properties of Sensitive Data Discovery.
    :vartype sensitive_data_discovery: ~azure.mgmt.security.models.SensitiveDataDiscoveryProperties
    :ivar override_subscription_level_settings: Indicates whether the settings defined for this
     storage account should override the settings defined for the subscription.
    :vartype override_subscription_level_settings: bool
    """

    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Defender for Storage is enabled on this storage account."""
    malware_scanning: Optional["_models.MalwareScanningProperties"] = rest_field(
        name="malwareScanning", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Malware Scanning."""
    sensitive_data_discovery: Optional["_models.SensitiveDataDiscoveryProperties"] = rest_field(
        name="sensitiveDataDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of Sensitive Data Discovery."""
    override_subscription_level_settings: Optional[bool] = rest_field(
        name="overrideSubscriptionLevelSettings", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the settings defined for this storage account should override the settings
     defined for the subscription."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: Optional[bool] = None,
        malware_scanning: Optional["_models.MalwareScanningProperties"] = None,
        sensitive_data_discovery: Optional["_models.SensitiveDataDiscoveryProperties"] = None,
        override_subscription_level_settings: 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 DenylistCustomAlertRule(ListCustomAlertRule, discriminator="DenylistCustomAlertRule"):
    """A custom alert rule that checks if a value (depends on the custom alert type) is denied.

    :ivar display_name: The display name of the custom alert.
    :vartype display_name: str
    :ivar description: The description of the custom alert.
    :vartype description: str
    :ivar is_enabled: Status of the custom alert. Required.
    :vartype is_enabled: bool
    :ivar value_type: The value type of the items in the list. Known values are: "IpCidr" and
     "String".
    :vartype value_type: str or ~azure.mgmt.security.models.ValueType
    :ivar denylist_values: The values to deny. The format of the values depends on the rule type.
     Required.
    :vartype denylist_values: list[str]
    :ivar rule_type: Required. Default value is "DenylistCustomAlertRule".
    :vartype rule_type: str
    """

    denylist_values: list[str] = rest_field(
        name="denylistValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The values to deny. The format of the values depends on the rule type. Required."""
    rule_type: Literal["DenylistCustomAlertRule"] = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. Default value is \"DenylistCustomAlertRule\"."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: bool,
        denylist_values: 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)
        self.rule_type = "DenylistCustomAlertRule"  # type: ignore


class DeviceSecurityGroup(ExtensionResource):
    """The device security 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.security.models.SystemData
    :ivar properties: Device Security group data.
    :vartype properties: ~azure.mgmt.security.models.DeviceSecurityGroupProperties
    """

    properties: Optional["_models.DeviceSecurityGroupProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Device Security group data."""

    __flattened_items = ["threshold_rules", "time_window_rules", "allowlist_rules", "denylist_rules"]

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

    @overload
    def __init__(self, mapping: Mapping[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 DeviceSecurityGroupProperties(_Model):
    """describes properties of a security group.

    :ivar threshold_rules: The list of custom alert threshold rules.
    :vartype threshold_rules: list[~azure.mgmt.security.models.ThresholdCustomAlertRule]
    :ivar time_window_rules: The list of custom alert time-window rules.
    :vartype time_window_rules: list[~azure.mgmt.security.models.TimeWindowCustomAlertRule]
    :ivar allowlist_rules: The allow-list custom alert rules.
    :vartype allowlist_rules: list[~azure.mgmt.security.models.AllowlistCustomAlertRule]
    :ivar denylist_rules: The deny-list custom alert rules.
    :vartype denylist_rules: list[~azure.mgmt.security.models.DenylistCustomAlertRule]
    """

    threshold_rules: Optional[list["_models.ThresholdCustomAlertRule"]] = rest_field(
        name="thresholdRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of custom alert threshold rules."""
    time_window_rules: Optional[list["_models.TimeWindowCustomAlertRule"]] = rest_field(
        name="timeWindowRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The list of custom alert time-window rules."""
    allowlist_rules: Optional[list["_models.AllowlistCustomAlertRule"]] = rest_field(
        name="allowlistRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The allow-list custom alert rules."""
    denylist_rules: Optional[list["_models.DenylistCustomAlertRule"]] = rest_field(
        name="denylistRules", visibility=["read", "create", "update", "delete", "query"]
    )
    """The deny-list custom alert rules."""

    @overload
    def __init__(
        self,
        *,
        threshold_rules: Optional[list["_models.ThresholdCustomAlertRule"]] = None,
        time_window_rules: Optional[list["_models.TimeWindowCustomAlertRule"]] = None,
        allowlist_rules: Optional[list["_models.AllowlistCustomAlertRule"]] = None,
        denylist_rules: Optional[list["_models.DenylistCustomAlertRule"]] = None,
    ) -> None: ...

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

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


class DevOpsCapability(_Model):
    """Details about DevOps capability.

    :ivar name: Gets the name of the DevOps capability.
    :vartype name: str
    :ivar value: Gets the value of the DevOps capability.
    :vartype value: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Gets the name of the DevOps capability."""
    value: Optional[str] = rest_field(visibility=["read"])
    """Gets the value of the DevOps capability."""


class DevOpsConfiguration(ProxyResource):
    """DevOps 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.security.models.SystemData
    :ivar properties: DevOps Configuration properties.
    :vartype properties: ~azure.mgmt.security.models.DevOpsConfigurationProperties
    """

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

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

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

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


class DevOpsConfigurationProperties(_Model):
    """DevOps Configuration properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar authorization: Authorization payload.
    :vartype authorization: ~azure.mgmt.security.models.Authorization
    :ivar auto_discovery: AutoDiscovery states. Known values are: "Disabled", "Enabled", and
     "NotApplicable".
    :vartype auto_discovery: str or ~azure.mgmt.security.models.AutoDiscovery
    :ivar top_level_inventory_list: List of top-level inventory to select when AutoDiscovery is
     disabled. This field is ignored when AutoDiscovery is enabled.
    :vartype top_level_inventory_list: list[str]
    :ivar capabilities: List of capabilities assigned to the DevOps configuration during the
     discovery process.
    :vartype capabilities: list[~azure.mgmt.security.models.DevOpsCapability]
    :ivar agentless_configuration: Details about Agentless configuration.
    :vartype agentless_configuration: ~azure.mgmt.security.models.AgentlessConfiguration
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    authorization: Optional["_models.Authorization"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Authorization payload."""
    auto_discovery: Optional[Union[str, "_models.AutoDiscovery"]] = rest_field(
        name="autoDiscovery", visibility=["read", "create", "update", "delete", "query"]
    )
    """AutoDiscovery states. Known values are: \"Disabled\", \"Enabled\", and \"NotApplicable\"."""
    top_level_inventory_list: Optional[list[str]] = rest_field(
        name="topLevelInventoryList", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of top-level inventory to select when AutoDiscovery is disabled. This field is ignored
     when AutoDiscovery is enabled."""
    capabilities: Optional[list["_models.DevOpsCapability"]] = rest_field(visibility=["read"])
    """List of capabilities assigned to the DevOps configuration during the discovery process."""
    agentless_configuration: Optional["_models.AgentlessConfiguration"] = rest_field(
        name="agentlessConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about Agentless configuration."""

    @overload
    def __init__(
        self,
        *,
        authorization: Optional["_models.Authorization"] = None,
        auto_discovery: Optional[Union[str, "_models.AutoDiscovery"]] = None,
        top_level_inventory_list: Optional[list[str]] = None,
        agentless_configuration: Optional["_models.AgentlessConfiguration"] = None,
    ) -> None: ...

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

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


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

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

    properties: "_models.DiscoveredSecuritySolutionProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    location: str = rest_field(visibility=["read"])
    """Location where the resource is stored. Required."""

    __flattened_items = ["security_family", "offer", "publisher", "sku"]

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

    @overload
    def __init__(self, mapping: Mapping[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 DiscoveredSecuritySolutionProperties(_Model):
    """DiscoveredSecuritySolutionProperties.

    :ivar security_family: The security family of the discovered solution. Required. Known values
     are: "Waf", "Ngfw", "SaasWaf", and "Va".
    :vartype security_family: str or ~azure.mgmt.security.models.SecurityFamily
    :ivar offer: The security solutions' image offer. Required.
    :vartype offer: str
    :ivar publisher: The security solutions' image publisher. Required.
    :vartype publisher: str
    :ivar sku: The security solutions' image sku. Required.
    :vartype sku: str
    """

    security_family: Union[str, "_models.SecurityFamily"] = rest_field(
        name="securityFamily", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security family of the discovered solution. Required. Known values are: \"Waf\", \"Ngfw\",
     \"SaasWaf\", and \"Va\"."""
    offer: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' image offer. Required."""
    publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' image publisher. Required."""
    sku: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' image sku. Required."""

    @overload
    def __init__(
        self,
        *,
        security_family: Union[str, "_models.SecurityFamily"],
        offer: str,
        publisher: str,
        sku: 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 DockerHubEnvironmentData(EnvironmentData, discriminator="DockerHubOrganization"):
    """The Docker Hub connector environment data.

    :ivar authentication: The Docker Hub organization authentication details.
    :vartype authentication: ~azure.mgmt.security.models.Authentication
    :ivar scan_interval: Scan interval in hours (value should be between 1-hour to 24-hours).
    :vartype scan_interval: int
    :ivar environment_type: The type of the environment data. Required. DockerHubOrganization.
    :vartype environment_type: str or ~azure.mgmt.security.models.DOCKER_HUB_ORGANIZATION
    """

    authentication: Optional["_models.Authentication"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Docker Hub organization authentication details."""
    scan_interval: Optional[int] = rest_field(
        name="scanInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Scan interval in hours (value should be between 1-hour to 24-hours)."""
    environment_type: Literal[EnvironmentType.DOCKER_HUB_ORGANIZATION] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. DockerHubOrganization."""

    @overload
    def __init__(
        self,
        *,
        authentication: Optional["_models.Authentication"] = None,
        scan_interval: Optional[int] = None,
    ) -> None: ...

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

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


class EnvironmentDetails(_Model):
    """The environment details of the resource.

    :ivar native_resource_id: The native resource id of the resource (in case of Azure - the
     resource Id, in case of MC - the native resource id).
    :vartype native_resource_id: str
    :ivar environment_hierarchy_id: The hierarchy id of the connector (in case of Azure - the
     subscription Id, in case of MC - the hierarchyId id).
    :vartype environment_hierarchy_id: str
    :ivar organizational_hierarchy_id: The organizational hierarchy id of the connector (in case of
     Azure - the subscription Id, in case of MC - the organizational hierarchyId id).
    :vartype organizational_hierarchy_id: str
    :ivar subscription_id: The subscription Id.
    :vartype subscription_id: str
    :ivar tenant_id: The tenant Id.
    :vartype tenant_id: str
    """

    native_resource_id: Optional[str] = rest_field(
        name="nativeResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The native resource id of the resource (in case of Azure - the resource Id, in case of MC - the
     native resource id)."""
    environment_hierarchy_id: Optional[str] = rest_field(
        name="environmentHierarchyId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the
     hierarchyId id)."""
    organizational_hierarchy_id: Optional[str] = rest_field(
        name="organizationalHierarchyId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The organizational hierarchy id of the connector (in case of Azure - the subscription Id, in
     case of MC - the organizational hierarchyId id)."""
    subscription_id: Optional[str] = rest_field(
        name="subscriptionId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The subscription Id."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"])
    """The tenant Id."""

    @overload
    def __init__(
        self,
        *,
        native_resource_id: Optional[str] = None,
        environment_hierarchy_id: Optional[str] = None,
        organizational_hierarchy_id: Optional[str] = None,
        subscription_id: Optional[str] = None,
        tenant_id: Optional[str] = None,
    ) -> None: ...

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

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


class ErrorAdditionalInfo(_Model):
    """The resource management error additional info.

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

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


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

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

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


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

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

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

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

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

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


class ExecuteGovernanceRuleParams(_Model):
    """Governance rule execution parameters.

    :ivar override: Describe if governance rule should be override.
    :vartype override: bool
    """

    override: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Describe if governance rule should be override."""

    @overload
    def __init__(
        self,
        *,
        override: 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 Extension(_Model):
    """A plan's extension properties.

    :ivar name: The extension name. Supported values are:
     <br><br>**AgentlessDiscoveryForKubernetes** - Provides zero footprint, API-based discovery of
     Kubernetes clusters, their configurations and deployments. The collected data is used to create
     a contextualized security graph for Kubernetes clusters, provide risk hunting capabilities, and
     visualize risks and threats to  Kubernetes environments and workloads.<br>Available for
     CloudPosture plan and Containers plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be
     scanned per month for each storage account within the subscription. Once this limit reached on
     a given storage account, Blobs won't be scanned during current calendar month.<br>Available for
     StorageAccounts plan (DefenderForStorageV2 sub plans).<br><br>**SensitiveDataDiscovery** -
     Sensitive data discovery identifies Blob storage container with sensitive data such as
     credentials, credit cards, and more, to help prioritize and investigate security
     events.<br>Available for StorageAccounts plan (DefenderForStorageV2 sub plan) and CloudPosture
     plan.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability
     management for images stored in your container registries.<br>Available for CloudPosture plan
     and Containers plan.<br><br>**MdeDesignatedSubscription** - Direct onboarding is a seamless
     integration between Defender for Endpoint and Defender for Cloud that doesn't require extra
     software deployment on your servers. The onboarded resources will be presented under a
     designated Azure Subscription you configure<br>Available for VirtualMachines plan (P1 and P2
     sub plans).<br><br>**AgentlessVmScanning** - Scans your machines for installed software,
     vulnerabilities, malware and secret scanning without relying on agents or impacting machine
     performance. Learn more here
     `https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection
     <https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection>`_.<br>Available
     for CloudPosture plan, VirtualMachines plan (P2 sub plan) and Containers
     plan.<br><br>**EntraPermissionsManagement** - Permissions Management provides Cloud
     Infrastructure Entitlement Management (CIEM) capabilities that helps organizations to manage
     and control user access and entitlements in their cloud infrastructure - important attack
     vector for cloud environments.<br>Permissions Management analyzes all permissions and active
     usage, and suggests recommendations to reduce permissions to enforce the principle of least
     privilege. Learn more here
     `https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions-management
     <https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions-management>`_.<br>Available
     for CloudPosture plan. <br><br>**FileIntegrityMonitoring** - File integrity monitoring (FIM),
     examines operating system files.<br>Windows registries, Linux system files, in real time, for
     changes that might indicate an attack.<br>Available for VirtualMachines plan (P2 sub plan).
     <br><br>**ContainerSensor** - The sensor is based on IG and provides a rich threat detection
     suite for Kubernetes clusters, nodes, and workloads, powered by Microsoft leading threat
     intelligence, provides mapping to MITRE ATT&CK framework.<br>Available for Containers plan.
     <br><br>**AIPromptEvidence** - Exposes the prompts passed between the user and the AI model as
     alert evidence. This helps classify and triage the alerts with relevant user context. The
     prompt snippets will include only segments of the user prompt or model response that were
     deemed suspicious and relevant for security classifications. The prompt evidence will be
     available through Defender portal as part of each alert.<br>Available for AI plan. <br><br>.
     Required.
    :vartype name: str
    :ivar is_enabled: Indicates whether the extension is enabled. Required. Known values are:
     "True" and "False".
    :vartype is_enabled: str or ~azure.mgmt.security.models.IsEnabled
    :ivar additional_extension_properties: Property values associated with the extension.
    :vartype additional_extension_properties: dict[str, any]
    :ivar operation_status: Optional. A status describing the success/failure of the extension's
     enablement/disablement operation.
    :vartype operation_status: ~azure.mgmt.security.models.OperationStatus
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The extension name. Supported values are: <br><br>**AgentlessDiscoveryForKubernetes** -
     Provides zero footprint, API-based discovery of Kubernetes clusters, their configurations and
     deployments. The collected data is used to create a contextualized security graph for
     Kubernetes clusters, provide risk hunting capabilities, and visualize risks and threats to
     Kubernetes environments and workloads.<br>Available for CloudPosture plan and Containers
     plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned per month for each
     storage account within the subscription. Once this limit reached on a given storage account,
     Blobs won't be scanned during current calendar month.<br>Available for StorageAccounts plan
     (DefenderForStorageV2 sub plans).<br><br>**SensitiveDataDiscovery** - Sensitive data discovery
     identifies Blob storage container with sensitive data such as credentials, credit cards, and
     more, to help prioritize and investigate security events.<br>Available for StorageAccounts plan
     (DefenderForStorageV2 sub plan) and CloudPosture
     plan.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability
     management for images stored in your container registries.<br>Available for CloudPosture plan
     and Containers plan.<br><br>**MdeDesignatedSubscription** - Direct onboarding is a seamless
     integration between Defender for Endpoint and Defender for Cloud that doesn't require extra
     software deployment on your servers. The onboarded resources will be presented under a
     designated Azure Subscription you configure<br>Available for VirtualMachines plan (P1 and P2
     sub plans).<br><br>**AgentlessVmScanning** - Scans your machines for installed software,
     vulnerabilities, malware and secret scanning without relying on agents or impacting machine
     performance. Learn more here
     `https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection
     <https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection>`_.<br>Available
     for CloudPosture plan, VirtualMachines plan (P2 sub plan) and Containers
     plan.<br><br>**EntraPermissionsManagement** - Permissions Management provides Cloud
     Infrastructure Entitlement Management (CIEM) capabilities that helps organizations to manage
     and control user access and entitlements in their cloud infrastructure - important attack
     vector for cloud environments.<br>Permissions Management analyzes all permissions and active
     usage, and suggests recommendations to reduce permissions to enforce the principle of least
     privilege. Learn more here
     `https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions-management
     <https://learn.microsoft.com/en-us/azure/defender-for-cloud/permissions-management>`_.<br>Available
     for CloudPosture plan. <br><br>**FileIntegrityMonitoring** - File integrity monitoring (FIM),
     examines operating system files.<br>Windows registries, Linux system files, in real time, for
     changes that might indicate an attack.<br>Available for VirtualMachines plan (P2 sub plan).
     <br><br>**ContainerSensor** - The sensor is based on IG and provides a rich threat detection
     suite for Kubernetes clusters, nodes, and workloads, powered by Microsoft leading threat
     intelligence, provides mapping to MITRE ATT&CK framework.<br>Available for Containers plan.
     <br><br>**AIPromptEvidence** - Exposes the prompts passed between the user and the AI model as
     alert evidence. This helps classify and triage the alerts with relevant user context. The
     prompt snippets will include only segments of the user prompt or model response that were
     deemed suspicious and relevant for security classifications. The prompt evidence will be
     available through Defender portal as part of each alert.<br>Available for AI plan. <br><br>.
     Required."""
    is_enabled: Union[str, "_models.IsEnabled"] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the extension is enabled. Required. Known values are: \"True\" and \"False\"."""
    additional_extension_properties: Optional[dict[str, Any]] = rest_field(
        name="additionalExtensionProperties", visibility=["read", "create", "update", "delete", "query"]
    )
    """Property values associated with the extension."""
    operation_status: Optional["_models.OperationStatus"] = rest_field(name="operationStatus", visibility=["read"])
    """Optional. A status describing the success/failure of the extension's enablement/disablement
     operation."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        is_enabled: Union[str, "_models.IsEnabled"],
        additional_extension_properties: 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 FilesScanSummary(_Model):
    """A summary of the scan results of the files that were scanned.

    :ivar total_files_scanned: The total number of files that were scanned.
    :vartype total_files_scanned: int
    :ivar malicious_files_count: The number of malicious files that were detected during the scan.
    :vartype malicious_files_count: int
    :ivar skipped_files_count: The number of files that were skipped.
    :vartype skipped_files_count: int
    :ivar failed_files_count: The number of failed file scans.
    :vartype failed_files_count: int
    :ivar scanned_files_in_gb: The number of gigabytes of data that were scanned.
    :vartype scanned_files_in_gb: float
    """

    total_files_scanned: Optional[int] = rest_field(
        name="totalFilesScanned", visibility=["read", "create", "update", "delete", "query"]
    )
    """The total number of files that were scanned."""
    malicious_files_count: Optional[int] = rest_field(
        name="maliciousFilesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of malicious files that were detected during the scan."""
    skipped_files_count: Optional[int] = rest_field(
        name="skippedFilesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of files that were skipped."""
    failed_files_count: Optional[int] = rest_field(
        name="failedFilesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed file scans."""
    scanned_files_in_gb: Optional[float] = rest_field(
        name="scannedFilesInGB", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of gigabytes of data that were scanned."""

    @overload
    def __init__(
        self,
        *,
        total_files_scanned: Optional[int] = None,
        malicious_files_count: Optional[int] = None,
        skipped_files_count: Optional[int] = None,
        failed_files_count: Optional[int] = None,
        scanned_files_in_gb: 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 GcpOrganizationalData(_Model):
    """The gcpOrganization data.

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

    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Known values are: "Member" and "Organization".
    :vartype organization_membership_type: str or
     ~azure.mgmt.security.models.OrganizationMembershipType
    """

    __mapping__: dict[str, _Model] = {}
    organization_membership_type: str = rest_discriminator(
        name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The multi cloud account's membership type in the organization. Required. Known values are:
     \"Member\" and \"Organization\"."""

    @overload
    def __init__(
        self,
        *,
        organization_membership_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 GcpOrganizationalDataMember(GcpOrganizationalData, discriminator="Member"):
    """The gcpOrganization data for the member account.

    :ivar parent_hierarchy_id: If the multi cloud account is not of membership type organization,
     this will be the ID of the project's parent.
    :vartype parent_hierarchy_id: str
    :ivar management_project_number: The GCP management project number from organizational
     onboarding.
    :vartype management_project_number: str
    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Member.
    :vartype organization_membership_type: str or ~azure.mgmt.security.models.MEMBER
    """

    parent_hierarchy_id: Optional[str] = rest_field(
        name="parentHierarchyId", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the multi cloud account is not of membership type organization, this will be the ID of the
     project's parent."""
    management_project_number: Optional[str] = rest_field(
        name="managementProjectNumber", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP management project number from organizational onboarding."""
    organization_membership_type: Literal[OrganizationMembershipType.MEMBER] = rest_discriminator(name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The multi cloud account's membership type in the organization. Required. Member."""

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

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

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


class GcpOrganizationalDataOrganization(GcpOrganizationalData, discriminator="Organization"):
    """The gcpOrganization data for the parent account.

    :ivar excluded_project_numbers: If the multi cloud account is of membership type organization,
     list of accounts excluded from offering.
    :vartype excluded_project_numbers: list[str]
    :ivar service_account_email_address: The service account email address which represents the
     organization level permissions container.
    :vartype service_account_email_address: str
    :ivar workload_identity_provider_id: The GCP workload identity provider id which represents the
     permissions required to auto provision security connectors.
    :vartype workload_identity_provider_id: str
    :ivar organization_name: GCP organization name.
    :vartype organization_name: str
    :ivar organization_membership_type: The multi cloud account's membership type in the
     organization. Required. Organization.
    :vartype organization_membership_type: str or ~azure.mgmt.security.models.ORGANIZATION
    """

    excluded_project_numbers: Optional[list[str]] = rest_field(
        name="excludedProjectNumbers", visibility=["read", "create", "update", "delete", "query"]
    )
    """If the multi cloud account is of membership type organization, list of accounts excluded from
     offering."""
    service_account_email_address: Optional[str] = rest_field(
        name="serviceAccountEmailAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """The service account email address which represents the organization level permissions
     container."""
    workload_identity_provider_id: Optional[str] = rest_field(
        name="workloadIdentityProviderId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The GCP workload identity provider id which represents the permissions required to auto
     provision security connectors."""
    organization_name: Optional[str] = rest_field(name="organizationName", visibility=["read"])
    """GCP organization name."""
    organization_membership_type: Literal[OrganizationMembershipType.ORGANIZATION] = rest_discriminator(name="organizationMembershipType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The multi cloud account's membership type in the organization. Required. Organization."""

    @overload
    def __init__(
        self,
        *,
        excluded_project_numbers: Optional[list[str]] = None,
        service_account_email_address: Optional[str] = None,
        workload_identity_provider_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)
        self.organization_membership_type = OrganizationMembershipType.ORGANIZATION  # type: ignore


class GcpProjectDetails(_Model):
    """The details about the project represented by the security connector.

    :ivar project_number: The unique GCP Project number.
    :vartype project_number: str
    :ivar project_id: The GCP Project id.
    :vartype project_id: str
    :ivar workload_identity_pool_id: The GCP workload identity federation pool id.
    :vartype workload_identity_pool_id: str
    :ivar project_name: GCP project name.
    :vartype project_name: str
    """

    project_number: Optional[str] = rest_field(
        name="projectNumber", visibility=["read", "create", "update", "delete", "query"]
    )
    """The unique GCP Project number."""
    project_id: Optional[str] = rest_field(name="projectId", visibility=["read", "create", "update", "delete", "query"])
    """The GCP Project id."""
    workload_identity_pool_id: Optional[str] = rest_field(name="workloadIdentityPoolId", visibility=["read"])
    """The GCP workload identity federation pool id."""
    project_name: Optional[str] = rest_field(name="projectName", visibility=["read"])
    """GCP project name."""

    @overload
    def __init__(
        self,
        *,
        project_number: Optional[str] = None,
        project_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 GcpProjectEnvironmentData(EnvironmentData, discriminator="GcpProject"):
    """The GCP project connector environment data.

    :ivar organizational_data: The Gcp project's organizational data.
    :vartype organizational_data: ~azure.mgmt.security.models.GcpOrganizationalData
    :ivar project_details: The Gcp project's details.
    :vartype project_details: ~azure.mgmt.security.models.GcpProjectDetails
    :ivar scan_interval: Scan interval in hours (value should be between 1-hour to 24-hours).
    :vartype scan_interval: int
    :ivar environment_type: The type of the environment data. Required. GcpProject.
    :vartype environment_type: str or ~azure.mgmt.security.models.GCP_PROJECT
    """

    organizational_data: Optional["_models.GcpOrganizationalData"] = rest_field(
        name="organizationalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Gcp project's organizational data."""
    project_details: Optional["_models.GcpProjectDetails"] = rest_field(
        name="projectDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """The Gcp project's details."""
    scan_interval: Optional[int] = rest_field(
        name="scanInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Scan interval in hours (value should be between 1-hour to 24-hours)."""
    environment_type: Literal[EnvironmentType.GCP_PROJECT] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. GcpProject."""

    @overload
    def __init__(
        self,
        *,
        organizational_data: Optional["_models.GcpOrganizationalData"] = None,
        project_details: Optional["_models.GcpProjectDetails"] = None,
        scan_interval: Optional[int] = None,
    ) -> None: ...

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

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


class GetSensitivitySettingsListResponse(_Model):
    """A list with a single sensitivity settings resource.

    :ivar value:
    :vartype value: list[~azure.mgmt.security.models.GetSensitivitySettingsResponse]
    """

    value: Optional[list["_models.GetSensitivitySettingsResponse"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class GetSensitivitySettingsResponse(ProxyResource):
    """Data sensitivity settings for sensitive data discovery.

    :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.security.models.SystemData
    :ivar properties: The sensitivity settings properties.
    :vartype properties: ~azure.mgmt.security.models.GetSensitivitySettingsResponseProperties
    """

    properties: Optional["_models.GetSensitivitySettingsResponseProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The sensitivity settings properties."""

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

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

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


class GetSensitivitySettingsResponseProperties(_Model):
    """The sensitivity settings properties.

    :ivar sensitive_info_types_ids: List of selected sensitive info types' IDs.
    :vartype sensitive_info_types_ids: list[str]
    :ivar sensitivity_threshold_label_order: The order of the sensitivity threshold label. Any
     label at or above this order will be considered sensitive. If set to -1, sensitivity by labels
     is turned off.
    :vartype sensitivity_threshold_label_order: float
    :ivar sensitivity_threshold_label_id: The id of the sensitivity threshold label. Any label at
     or above this rank will be considered sensitive.
    :vartype sensitivity_threshold_label_id: str
    :ivar mip_information: Microsoft information protection built-in and custom information types,
     labels, and integration status.
    :vartype mip_information:
     ~azure.mgmt.security.models.GetSensitivitySettingsResponsePropertiesMipInformation
    """

    sensitive_info_types_ids: Optional[list[str]] = rest_field(
        name="sensitiveInfoTypesIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of selected sensitive info types' IDs."""
    sensitivity_threshold_label_order: Optional[float] = rest_field(
        name="sensitivityThresholdLabelOrder", visibility=["read", "create", "update", "delete", "query"]
    )
    """The order of the sensitivity threshold label. Any label at or above this order will be
     considered sensitive. If set to -1, sensitivity by labels is turned off."""
    sensitivity_threshold_label_id: Optional[str] = rest_field(
        name="sensitivityThresholdLabelId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The id of the sensitivity threshold label. Any label at or above this rank will be considered
     sensitive."""
    mip_information: Optional["_models.GetSensitivitySettingsResponsePropertiesMipInformation"] = rest_field(
        name="mipInformation", visibility=["read", "create", "update", "delete", "query"]
    )
    """Microsoft information protection built-in and custom information types, labels, and integration
     status."""

    @overload
    def __init__(
        self,
        *,
        sensitive_info_types_ids: Optional[list[str]] = None,
        sensitivity_threshold_label_order: Optional[float] = None,
        sensitivity_threshold_label_id: Optional[str] = None,
        mip_information: Optional["_models.GetSensitivitySettingsResponsePropertiesMipInformation"] = None,
    ) -> None: ...

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

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


class GetSensitivitySettingsResponsePropertiesMipInformation(_Model):  # pylint: disable=name-too-long
    """Microsoft information protection built-in and custom information types, labels, and integration
    status.

    :ivar mip_integration_status: Microsoft information protection integration status. Known values
     are: "Ok", "noConsent", "noAutoLabelingRules", and "noMipLabels".
    :vartype mip_integration_status: str or ~azure.mgmt.security.models.MipIntegrationStatus
    :ivar labels: List of Microsoft information protection sensitivity labels.
    :vartype labels: list[~azure.mgmt.security.models.Label]
    :ivar custom_info_types: List of custom user-defined information types.
    :vartype custom_info_types: list[~azure.mgmt.security.models.InfoType]
    :ivar built_in_info_types: List of pre-configured sensitive information types.
    :vartype built_in_info_types: list[~azure.mgmt.security.models.BuiltInInfoType]
    """

    mip_integration_status: Optional[Union[str, "_models.MipIntegrationStatus"]] = rest_field(
        name="mipIntegrationStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Microsoft information protection integration status. Known values are: \"Ok\", \"noConsent\",
     \"noAutoLabelingRules\", and \"noMipLabels\"."""
    labels: Optional[list["_models.Label"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of Microsoft information protection sensitivity labels."""
    custom_info_types: Optional[list["_models.InfoType"]] = rest_field(
        name="customInfoTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of custom user-defined information types."""
    built_in_info_types: Optional[list["_models.BuiltInInfoType"]] = rest_field(
        name="builtInInfoTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of pre-configured sensitive information types."""

    @overload
    def __init__(
        self,
        *,
        mip_integration_status: Optional[Union[str, "_models.MipIntegrationStatus"]] = None,
        labels: Optional[list["_models.Label"]] = None,
        custom_info_types: Optional[list["_models.InfoType"]] = None,
        built_in_info_types: Optional[list["_models.BuiltInInfoType"]] = None,
    ) -> None: ...

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

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


class GitHubOwner(ProxyResource):
    """GitHub Owner 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.security.models.SystemData
    :ivar properties: GitHub Owner properties.
    :vartype properties: ~azure.mgmt.security.models.GitHubOwnerProperties
    """

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

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

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

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


class GitHubOwnerListResponse(_Model):
    """List of RP resources which supports pagination.

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

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

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

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

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


class GitHubOwnerProperties(_Model):
    """GitHub Owner properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar owner_url: Gets or sets GitHub Owner url.
    :vartype owner_url: str
    :ivar git_hub_internal_id: Gets or sets internal GitHub id.
    :vartype git_hub_internal_id: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    owner_url: Optional[str] = rest_field(name="ownerUrl", visibility=["read"])
    """Gets or sets GitHub Owner url."""
    git_hub_internal_id: Optional[str] = rest_field(name="gitHubInternalId", visibility=["read"])
    """Gets or sets internal GitHub id."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""

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

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

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


class GitHubRepository(ProxyResource):
    """GitHub Repository 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.security.models.SystemData
    :ivar properties: GitHub Repository properties.
    :vartype properties: ~azure.mgmt.security.models.GitHubRepositoryProperties
    """

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

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

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

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


class GitHubRepositoryProperties(_Model):
    """GitHub Repository properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar repo_id: Gets or sets GitHub Repository id.

     This is a numeric id defined by Github.
     Eg: "123456".
    :vartype repo_id: str
    :ivar repo_name: Gets or sets GitHub Repository name. Eg: "new-repo-1".
    :vartype repo_name: str
    :ivar repo_full_name: Gets or sets GitHub Full Name. Repository name, prefixed with Owner name.
     Eg: "my-org/new-repo-1".
    :vartype repo_full_name: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    :ivar repo_url: Gets or sets GitHub Repository url.
    :vartype repo_url: str
    :ivar parent_owner_name: Gets or sets parent GitHub Owner name.
    :vartype parent_owner_name: str
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    repo_id: Optional[str] = rest_field(name="repoId", visibility=["read"])
    """Gets or sets GitHub Repository id.
     
     This is a numeric id defined by Github.
     Eg: \"123456\"."""
    repo_name: Optional[str] = rest_field(name="repoName", visibility=["read"])
    """Gets or sets GitHub Repository name. Eg: \"new-repo-1\"."""
    repo_full_name: Optional[str] = rest_field(name="repoFullName", visibility=["read"])
    """Gets or sets GitHub Full Name. Repository name, prefixed with Owner name. Eg:
     \"my-org/new-repo-1\"."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""
    repo_url: Optional[str] = rest_field(name="repoUrl", visibility=["read"])
    """Gets or sets GitHub Repository url."""
    parent_owner_name: Optional[str] = rest_field(
        name="parentOwnerName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets parent GitHub Owner name."""

    @overload
    def __init__(
        self,
        *,
        onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = None,
        parent_owner_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 GithubScopeEnvironmentData(EnvironmentData, discriminator="GithubScope"):
    """The github scope connector's environment data.

    :ivar environment_type: The type of the environment data. Required. GithubScope.
    :vartype environment_type: str or ~azure.mgmt.security.models.GITHUB_SCOPE
    """

    environment_type: Literal[EnvironmentType.GITHUB_SCOPE] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. GithubScope."""

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

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

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


class GitLabGroup(ProxyResource):
    """GitLab 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.security.models.SystemData
    :ivar properties: GitLab Group properties.
    :vartype properties: ~azure.mgmt.security.models.GitLabGroupProperties
    """

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

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

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

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


class GitLabGroupListResponse(_Model):
    """List of RP resources which supports pagination.

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

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

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

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

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


class GitLabGroupProperties(_Model):
    """GitLab Group properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar fully_qualified_name: Gets or sets the fully-qualified name of the Group object.

     This contains the entire namespace hierarchy where namespaces are separated by the '$'
     character.
    :vartype fully_qualified_name: str
    :ivar fully_qualified_friendly_name: Gets or sets the human readable fully-qualified name of
     the Group object.

     This contains the entire namespace hierarchy as seen on GitLab UI where namespaces are
     separated by the '/' character.
    :vartype fully_qualified_friendly_name: str
    :ivar url: Gets or sets the url of the GitLab Group.
    :vartype url: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    fully_qualified_name: Optional[str] = rest_field(name="fullyQualifiedName", visibility=["read"])
    """Gets or sets the fully-qualified name of the Group object.
     
     This contains the entire namespace hierarchy where namespaces are separated by the '$'
     character."""
    fully_qualified_friendly_name: Optional[str] = rest_field(name="fullyQualifiedFriendlyName", visibility=["read"])
    """Gets or sets the human readable fully-qualified name of the Group object.
     
     This contains the entire namespace hierarchy as seen on GitLab UI where namespaces are
     separated by the '/' character."""
    url: Optional[str] = rest_field(visibility=["read"])
    """Gets or sets the url of the GitLab Group."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""

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

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

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


class GitLabProject(ProxyResource):
    """GitLab Project 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.security.models.SystemData
    :ivar properties: GitLab Project properties.
    :vartype properties: ~azure.mgmt.security.models.GitLabProjectProperties
    """

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

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

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

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


class GitLabProjectProperties(_Model):
    """GitLab Project properties.

    :ivar provisioning_status_message: Gets the resource status message.
    :vartype provisioning_status_message: str
    :ivar provisioning_status_update_time_utc: Gets the time when resource was last checked.
    :vartype provisioning_status_update_time_utc: ~datetime.datetime
    :ivar provisioning_state: The provisioning state of the resource.

     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: "Succeeded", "Failed", "Canceled",
     "Pending", "PendingDeletion", "DeletionSuccess", and "DeletionFailure".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.DevOpsProvisioningState
    :ivar fully_qualified_name: Gets or sets the fully-qualified name of the project object.

     This contains the entire hierarchy where entities are separated by the '$' character.
    :vartype fully_qualified_name: str
    :ivar fully_qualified_friendly_name: Gets or sets the human readable fully-qualified name of
     the Project object.

     This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated
     by the '/' character.
    :vartype fully_qualified_friendly_name: str
    :ivar fully_qualified_parent_group_name: Gets or sets the fully-qualified name of the project's
     parent group object.

     This contains the entire hierarchy where namespaces are separated by the '$' character.
    :vartype fully_qualified_parent_group_name: str
    :ivar url: Gets or sets the url of the GitLab Project.
    :vartype url: str
    :ivar onboarding_state: Details about resource onboarding status across all connectors.

     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: "NotApplicable", "OnboardedByOtherConnector", "Onboarded", and "NotOnboarded".
    :vartype onboarding_state: str or ~azure.mgmt.security.models.OnboardingState
    """

    provisioning_status_message: Optional[str] = rest_field(name="provisioningStatusMessage", visibility=["read"])
    """Gets the resource status message."""
    provisioning_status_update_time_utc: Optional[datetime.datetime] = rest_field(
        name="provisioningStatusUpdateTimeUtc", visibility=["read"], format="rfc3339"
    )
    """Gets the time when resource was last checked."""
    provisioning_state: Optional[Union[str, "_models.DevOpsProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The provisioning state of the resource.
     
     Pending - Provisioning pending.
     Failed - Provisioning failed.
     Succeeded - Successful provisioning.
     Canceled - Provisioning canceled.
     PendingDeletion - Deletion pending.
     DeletionSuccess - Deletion successful.
     DeletionFailure - Deletion failure. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
     \"Pending\", \"PendingDeletion\", \"DeletionSuccess\", and \"DeletionFailure\"."""
    fully_qualified_name: Optional[str] = rest_field(name="fullyQualifiedName", visibility=["read"])
    """Gets or sets the fully-qualified name of the project object.
     
     This contains the entire hierarchy where entities are separated by the '$' character."""
    fully_qualified_friendly_name: Optional[str] = rest_field(name="fullyQualifiedFriendlyName", visibility=["read"])
    """Gets or sets the human readable fully-qualified name of the Project object.
     
     This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated
     by the '/' character."""
    fully_qualified_parent_group_name: Optional[str] = rest_field(
        name="fullyQualifiedParentGroupName", visibility=["read"]
    )
    """Gets or sets the fully-qualified name of the project's parent group object.
     
     This contains the entire hierarchy where namespaces are separated by the '$' character."""
    url: Optional[str] = rest_field(visibility=["read"])
    """Gets or sets the url of the GitLab Project."""
    onboarding_state: Optional[Union[str, "_models.OnboardingState"]] = rest_field(
        name="onboardingState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details about resource onboarding status across all connectors.
     
     OnboardedByOtherConnector - this resource has already been onboarded to another connector. This
     is only applicable to top-level resources.
     Onboarded - this resource has already been onboarded by the specified connector.
     NotOnboarded - this resource has not been onboarded to any connector.
     NotApplicable - the onboarding state is not applicable to the current endpoint. Known values
     are: \"NotApplicable\", \"OnboardedByOtherConnector\", \"Onboarded\", and \"NotOnboarded\"."""

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

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

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


class GitlabScopeEnvironmentData(EnvironmentData, discriminator="GitlabScope"):
    """The GitLab scope connector's environment data.

    :ivar environment_type: The type of the environment data. Required. GitlabScope.
    :vartype environment_type: str or ~azure.mgmt.security.models.GITLAB_SCOPE
    """

    environment_type: Literal[EnvironmentType.GITLAB_SCOPE] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. GitlabScope."""

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

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

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


class GovernanceAssignment(ExtensionResource):
    """Governance assignment over a given scope.

    :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.security.models.SystemData
    :ivar properties: The properties of a governance assignment.
    :vartype properties: ~azure.mgmt.security.models.GovernanceAssignmentProperties
    """

    properties: Optional["_models.GovernanceAssignmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The properties of a governance assignment."""

    __flattened_items = [
        "owner",
        "remediation_due_date",
        "remediation_eta",
        "is_grace_period",
        "governance_email_notification",
        "additional_data",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 GovernanceAssignmentAdditionalData(_Model):
    """Describe the additional data of governance assignment - optional.

    :ivar ticket_number: Ticket number associated with this governance assignment.
    :vartype ticket_number: int
    :ivar ticket_link: Ticket link associated with this governance assignment - for example:
     `https://snow.com <https://snow.com>`_.
    :vartype ticket_link: str
    :ivar ticket_status: The ticket status associated with this governance assignment - for
     example: Active.
    :vartype ticket_status: str
    """

    ticket_number: Optional[int] = rest_field(
        name="ticketNumber", visibility=["read", "create", "update", "delete", "query"]
    )
    """Ticket number associated with this governance assignment."""
    ticket_link: Optional[str] = rest_field(
        name="ticketLink", visibility=["read", "create", "update", "delete", "query"]
    )
    """Ticket link associated with this governance assignment - for example: `https://snow.com
     <https://snow.com>`_."""
    ticket_status: Optional[str] = rest_field(
        name="ticketStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ticket status associated with this governance assignment - for example: Active."""

    @overload
    def __init__(
        self,
        *,
        ticket_number: Optional[int] = None,
        ticket_link: Optional[str] = None,
        ticket_status: 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 GovernanceAssignmentProperties(_Model):
    """Describes properties of an governance assignment.

    :ivar owner: The Owner for the governance assignment - e.g. `user@contoso.com
     <mailto:user@contoso.com>`_ - see example.
    :vartype owner: str
    :ivar remediation_due_date: The remediation due-date - after this date Secure Score will be
     affected (in case of  active grace-period). Required.
    :vartype remediation_due_date: ~datetime.datetime
    :ivar remediation_eta: The ETA (estimated time of arrival) for remediation (optional), see
     example.
    :vartype remediation_eta: ~azure.mgmt.security.models.RemediationEta
    :ivar is_grace_period: Defines whether there is a grace period on the governance assignment.
    :vartype is_grace_period: bool
    :ivar governance_email_notification: The email notifications settings for the governance rule,
     states whether to disable notifications for mangers and owners.
    :vartype governance_email_notification: ~azure.mgmt.security.models.GovernanceEmailNotification
    :ivar additional_data: The additional data for the governance assignment - e.g. links to ticket
     (optional), see example.
    :vartype additional_data: ~azure.mgmt.security.models.GovernanceAssignmentAdditionalData
    """

    owner: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The Owner for the governance assignment - e.g. `user@contoso.com <mailto:user@contoso.com>`_ -
     see example."""
    remediation_due_date: datetime.datetime = rest_field(
        name="remediationDueDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The remediation due-date - after this date Secure Score will be affected (in case of  active
     grace-period). Required."""
    remediation_eta: Optional["_models.RemediationEta"] = rest_field(
        name="remediationEta", visibility=["read", "create", "update", "delete", "query"]
    )
    """The ETA (estimated time of arrival) for remediation (optional), see example."""
    is_grace_period: Optional[bool] = rest_field(
        name="isGracePeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether there is a grace period on the governance assignment."""
    governance_email_notification: Optional["_models.GovernanceEmailNotification"] = rest_field(
        name="governanceEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """The email notifications settings for the governance rule, states whether to disable
     notifications for mangers and owners."""
    additional_data: Optional["_models.GovernanceAssignmentAdditionalData"] = rest_field(
        name="additionalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """The additional data for the governance assignment - e.g. links to ticket (optional), see
     example."""

    @overload
    def __init__(
        self,
        *,
        remediation_due_date: datetime.datetime,
        owner: Optional[str] = None,
        remediation_eta: Optional["_models.RemediationEta"] = None,
        is_grace_period: Optional[bool] = None,
        governance_email_notification: Optional["_models.GovernanceEmailNotification"] = None,
        additional_data: Optional["_models.GovernanceAssignmentAdditionalData"] = None,
    ) -> None: ...

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

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


class GovernanceEmailNotification(_Model):
    """The governance email weekly notification configuration.

    :ivar disable_manager_email_notification: Exclude manager from weekly email notification.
    :vartype disable_manager_email_notification: bool
    :ivar disable_owner_email_notification: Exclude  owner from weekly email notification.
    :vartype disable_owner_email_notification: bool
    """

    disable_manager_email_notification: Optional[bool] = rest_field(
        name="disableManagerEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """Exclude manager from weekly email notification."""
    disable_owner_email_notification: Optional[bool] = rest_field(
        name="disableOwnerEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """Exclude  owner from weekly email notification."""

    @overload
    def __init__(
        self,
        *,
        disable_manager_email_notification: Optional[bool] = None,
        disable_owner_email_notification: 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 GovernanceRule(ExtensionResource):
    """Governance rule over a given scope.

    :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.security.models.SystemData
    :ivar properties: Properties of a governance rule.
    :vartype properties: ~azure.mgmt.security.models.GovernanceRuleProperties
    """

    properties: Optional["_models.GovernanceRuleProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a governance rule."""

    __flattened_items = [
        "tenant_id",
        "display_name",
        "description",
        "remediation_timeframe",
        "is_grace_period",
        "rule_priority",
        "is_disabled",
        "rule_type",
        "source_resource_type",
        "excluded_scopes",
        "condition_sets",
        "include_member_scopes",
        "owner_source",
        "governance_email_notification",
        "metadata",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 GovernanceRuleEmailNotification(_Model):
    """The governance email weekly notification configuration.

    :ivar disable_manager_email_notification: Defines whether manager email notifications are
     disabled.
    :vartype disable_manager_email_notification: bool
    :ivar disable_owner_email_notification: Defines whether owner email notifications are disabled.
    :vartype disable_owner_email_notification: bool
    """

    disable_manager_email_notification: Optional[bool] = rest_field(
        name="disableManagerEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether manager email notifications are disabled."""
    disable_owner_email_notification: Optional[bool] = rest_field(
        name="disableOwnerEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether owner email notifications are disabled."""

    @overload
    def __init__(
        self,
        *,
        disable_manager_email_notification: Optional[bool] = None,
        disable_owner_email_notification: 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 GovernanceRuleMetadata(_Model):
    """The governance rule metadata.

    :ivar created_by: Governance rule Created by object id (GUID).
    :vartype created_by: str
    :ivar created_on: Governance rule creation date.
    :vartype created_on: ~datetime.datetime
    :ivar updated_by: Governance rule last updated by object id (GUID).
    :vartype updated_by: str
    :ivar updated_on: Governance rule last update date.
    :vartype updated_on: ~datetime.datetime
    """

    created_by: Optional[str] = rest_field(name="createdBy", visibility=["read"])
    """Governance rule Created by object id (GUID)."""
    created_on: Optional[datetime.datetime] = rest_field(name="createdOn", visibility=["read"], format="rfc3339")
    """Governance rule creation date."""
    updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read"])
    """Governance rule last updated by object id (GUID)."""
    updated_on: Optional[datetime.datetime] = rest_field(name="updatedOn", visibility=["read"], format="rfc3339")
    """Governance rule last update date."""


class GovernanceRuleOwnerSource(_Model):
    """Describe the owner source of governance rule.

    :ivar type: The owner type for the governance rule owner source. Known values are: "ByTag" and
     "Manually".
    :vartype type: str or ~azure.mgmt.security.models.GovernanceRuleOwnerSourceType
    :ivar value: The source value e.g. tag key like owner name or email address.
    :vartype value: str
    """

    type: Optional[Union[str, "_models.GovernanceRuleOwnerSourceType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The owner type for the governance rule owner source. Known values are: \"ByTag\" and
     \"Manually\"."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The source value e.g. tag key like owner name or email address."""

    @overload
    def __init__(
        self,
        *,
        type: Optional[Union[str, "_models.GovernanceRuleOwnerSourceType"]] = 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 GovernanceRuleProperties(_Model):
    """Describes properties of an governance rule.

    :ivar tenant_id: The tenantId (GUID).
    :vartype tenant_id: str
    :ivar display_name: Display name of the governance rule. Required.
    :vartype display_name: str
    :ivar description: Description of the governance rule.
    :vartype description: str
    :ivar remediation_timeframe: Governance rule remediation timeframe - this is the time that will
     affect on the grace-period duration e.g. 7.00:00:00 - means 7 days.
    :vartype remediation_timeframe: str
    :ivar is_grace_period: Defines whether there is a grace period on the governance rule.
    :vartype is_grace_period: bool
    :ivar rule_priority: The governance rule priority, priority to the lower number. Rules with the
     same priority on the same scope will not be allowed. Required.
    :vartype rule_priority: int
    :ivar is_disabled: Defines whether the rule is active/inactive.
    :vartype is_disabled: bool
    :ivar rule_type: The rule type of the governance rule, defines the source of the rule e.g.
     Integrated. Required. Known values are: "Integrated" and "ServiceNow".
    :vartype rule_type: str or ~azure.mgmt.security.models.GovernanceRuleType
    :ivar source_resource_type: The governance rule source, what the rule affects, e.g.
     Assessments. Required. "Assessments"
    :vartype source_resource_type: str or
     ~azure.mgmt.security.models.GovernanceRuleSourceResourceType
    :ivar excluded_scopes: Excluded scopes, filter out the descendants of the scope (on management
     scopes).
    :vartype excluded_scopes: list[str]
    :ivar condition_sets: The governance rule conditionSets - see examples. Required.
    :vartype condition_sets: list[any]
    :ivar include_member_scopes: Defines whether the rule is management scope rule (master
     connector as a single scope or management scope).
    :vartype include_member_scopes: bool
    :ivar owner_source: The owner source for the governance rule - e.g. Manually by
     `user@contoso.com <mailto:user@contoso.com>`_ - see example. Required.
    :vartype owner_source: ~azure.mgmt.security.models.GovernanceRuleOwnerSource
    :ivar governance_email_notification: The email notifications settings for the governance rule,
     states whether to disable notifications for mangers and owners.
    :vartype governance_email_notification:
     ~azure.mgmt.security.models.GovernanceRuleEmailNotification
    :ivar metadata: The governance rule metadata.
    :vartype metadata: ~azure.mgmt.security.models.GovernanceRuleMetadata
    """

    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenantId (GUID)."""
    display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"])
    """Display name of the governance rule. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the governance rule."""
    remediation_timeframe: Optional[str] = rest_field(
        name="remediationTimeframe", visibility=["read", "create", "update", "delete", "query"]
    )
    """Governance rule remediation timeframe - this is the time that will affect on the grace-period
     duration e.g. 7.00:00:00 - means 7 days."""
    is_grace_period: Optional[bool] = rest_field(
        name="isGracePeriod", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether there is a grace period on the governance rule."""
    rule_priority: int = rest_field(name="rulePriority", visibility=["read", "create", "update", "delete", "query"])
    """The governance rule priority, priority to the lower number. Rules with the same priority on the
     same scope will not be allowed. Required."""
    is_disabled: Optional[bool] = rest_field(
        name="isDisabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether the rule is active/inactive."""
    rule_type: Union[str, "_models.GovernanceRuleType"] = rest_field(
        name="ruleType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule type of the governance rule, defines the source of the rule e.g. Integrated. Required.
     Known values are: \"Integrated\" and \"ServiceNow\"."""
    source_resource_type: Union[str, "_models.GovernanceRuleSourceResourceType"] = rest_field(
        name="sourceResourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The governance rule source, what the rule affects, e.g. Assessments. Required. \"Assessments\""""
    excluded_scopes: Optional[list[str]] = rest_field(
        name="excludedScopes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Excluded scopes, filter out the descendants of the scope (on management scopes)."""
    condition_sets: list[Any] = rest_field(
        name="conditionSets", visibility=["read", "create", "update", "delete", "query"]
    )
    """The governance rule conditionSets - see examples. Required."""
    include_member_scopes: Optional[bool] = rest_field(
        name="includeMemberScopes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether the rule is management scope rule (master connector as a single scope or
     management scope)."""
    owner_source: "_models.GovernanceRuleOwnerSource" = rest_field(
        name="ownerSource", visibility=["read", "create", "update", "delete", "query"]
    )
    """The owner source for the governance rule - e.g. Manually by `user@contoso.com
     <mailto:user@contoso.com>`_ - see example. Required."""
    governance_email_notification: Optional["_models.GovernanceRuleEmailNotification"] = rest_field(
        name="governanceEmailNotification", visibility=["read", "create", "update", "delete", "query"]
    )
    """The email notifications settings for the governance rule, states whether to disable
     notifications for mangers and owners."""
    metadata: Optional["_models.GovernanceRuleMetadata"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The governance rule metadata."""

    @overload
    def __init__(
        self,
        *,
        display_name: str,
        rule_priority: int,
        rule_type: Union[str, "_models.GovernanceRuleType"],
        source_resource_type: Union[str, "_models.GovernanceRuleSourceResourceType"],
        condition_sets: list[Any],
        owner_source: "_models.GovernanceRuleOwnerSource",
        description: Optional[str] = None,
        remediation_timeframe: Optional[str] = None,
        is_grace_period: Optional[bool] = None,
        is_disabled: Optional[bool] = None,
        excluded_scopes: Optional[list[str]] = None,
        include_member_scopes: Optional[bool] = None,
        governance_email_notification: Optional["_models.GovernanceRuleEmailNotification"] = None,
        metadata: Optional["_models.GovernanceRuleMetadata"] = None,
    ) -> None: ...

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

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


class HealthDataClassification(_Model):
    """The classification of the health report.

    :ivar component: The component describes the name of the agent/service that scans the issue.
    :vartype component: str
    :ivar scenario: The scenario describes the health scenario issue of the component.
    :vartype scenario: str
    :ivar scope: The resource scope of the health report.
    :vartype scope: str
    """

    component: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The component describes the name of the agent/service that scans the issue."""
    scenario: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The scenario describes the health scenario issue of the component."""
    scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The resource scope of the health report."""

    @overload
    def __init__(
        self,
        *,
        component: Optional[str] = None,
        scenario: 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 HealthReport(ExtensionResource):
    """The health report 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.security.models.SystemData
    :ivar properties: Properties of a health report.
    :vartype properties: ~azure.mgmt.security.models.HealthReportProperties
    """

    properties: Optional["_models.HealthReportProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a health report."""

    __flattened_items = [
        "resource_details",
        "environment_details",
        "health_data_classification",
        "status",
        "affected_defenders_plans",
        "affected_defenders_sub_plans",
        "report_additional_data",
        "issues",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 HealthReportProperties(_Model):
    """Describes properties of the health report.

    :ivar resource_details: The resource details of the health report.
    :vartype resource_details: ~azure.mgmt.security.models.ResourceDetails
    :ivar environment_details: The environment details of the resource.
    :vartype environment_details: ~azure.mgmt.security.models.EnvironmentDetails
    :ivar health_data_classification: The classification of the health report.
    :vartype health_data_classification: ~azure.mgmt.security.models.HealthDataClassification
    :ivar status: The status of the health report.
    :vartype status: ~azure.mgmt.security.models.StatusAutoGenerated
    :ivar affected_defenders_plans: The affected defenders plans by unhealthy report.
    :vartype affected_defenders_plans: list[str]
    :ivar affected_defenders_sub_plans: The affected defenders sub plans by unhealthy report.
    :vartype affected_defenders_sub_plans: list[str]
    :ivar report_additional_data: Additional data for the given health report, this field can
     include more details on the resource and the health scenario.
    :vartype report_additional_data: dict[str, str]
    :ivar issues: A collection of the issues in the report.
    :vartype issues: list[~azure.mgmt.security.models.Issue]
    """

    resource_details: Optional["_models.ResourceDetails"] = rest_field(
        name="resourceDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """The resource details of the health report."""
    environment_details: Optional["_models.EnvironmentDetails"] = rest_field(
        name="environmentDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """The environment details of the resource."""
    health_data_classification: Optional["_models.HealthDataClassification"] = rest_field(
        name="healthDataClassification", visibility=["read", "create", "update", "delete", "query"]
    )
    """The classification of the health report."""
    status: Optional["_models.StatusAutoGenerated"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the health report."""
    affected_defenders_plans: Optional[list[str]] = rest_field(
        name="affectedDefendersPlans", visibility=["read", "create", "update", "delete", "query"]
    )
    """The affected defenders plans by unhealthy report."""
    affected_defenders_sub_plans: Optional[list[str]] = rest_field(
        name="affectedDefendersSubPlans", visibility=["read", "create", "update", "delete", "query"]
    )
    """The affected defenders sub plans by unhealthy report."""
    report_additional_data: Optional[dict[str, str]] = rest_field(name="reportAdditionalData", visibility=["read"])
    """Additional data for the given health report, this field can include more details on the
     resource and the health scenario."""
    issues: Optional[list["_models.Issue"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A collection of the issues in the report."""

    @overload
    def __init__(
        self,
        *,
        resource_details: Optional["_models.ResourceDetails"] = None,
        environment_details: Optional["_models.EnvironmentDetails"] = None,
        health_data_classification: Optional["_models.HealthDataClassification"] = None,
        status: Optional["_models.StatusAutoGenerated"] = None,
        affected_defenders_plans: Optional[list[str]] = None,
        affected_defenders_sub_plans: Optional[list[str]] = None,
        issues: Optional[list["_models.Issue"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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. The value must be an UUID.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of resource. The value must be an UUID.
    :vartype tenant_id: str
    :ivar type: The identity type. "SystemAssigned"
    :vartype type: str or ~azure.mgmt.security.models.ResourceIdentityType
    """

    principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
    """The principal ID of resource identity. The value must be an UUID."""
    tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
    """The tenant ID of resource. The value must be an UUID."""
    type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The identity type. \"SystemAssigned\""""

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

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

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


class InformationProtectionKeyword(_Model):
    """The information type keyword.

    :ivar pattern: The keyword pattern.
    :vartype pattern: str
    :ivar custom: Indicates whether the keyword is custom or not.
    :vartype custom: bool
    :ivar can_be_numeric: Indicates whether the keyword can be applied on numeric types or not.
    :vartype can_be_numeric: bool
    :ivar excluded: Indicates whether the keyword is excluded or not.
    :vartype excluded: bool
    """

    pattern: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The keyword pattern."""
    custom: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the keyword is custom or not."""
    can_be_numeric: Optional[bool] = rest_field(
        name="canBeNumeric", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the keyword can be applied on numeric types or not."""
    excluded: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the keyword is excluded or not."""

    @overload
    def __init__(
        self,
        *,
        pattern: Optional[str] = None,
        custom: Optional[bool] = None,
        can_be_numeric: Optional[bool] = None,
        excluded: 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 InformationProtectionPolicy(ExtensionResource):
    """Information protection policy.

    :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.security.models.SystemData
    :ivar properties: Information protection policy data.
    :vartype properties: ~azure.mgmt.security.models.InformationProtectionPolicyProperties
    """

    properties: Optional["_models.InformationProtectionPolicyProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Information protection policy data."""

    __flattened_items = ["last_modified_utc", "version", "labels", "information_types"]

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

    @overload
    def __init__(self, mapping: Mapping[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 InformationProtectionPolicyProperties(_Model):
    """describes properties of an information protection policy.

    :ivar last_modified_utc: Describes the last UTC time the policy was modified.
    :vartype last_modified_utc: ~datetime.datetime
    :ivar version: Describes the version of the policy.
    :vartype version: str
    :ivar labels: Dictionary of sensitivity labels.
    :vartype labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel]
    :ivar information_types: The sensitivity information types.
    :vartype information_types: dict[str, ~azure.mgmt.security.models.InformationType]
    """

    last_modified_utc: Optional[datetime.datetime] = rest_field(
        name="lastModifiedUtc", visibility=["read"], format="rfc3339"
    )
    """Describes the last UTC time the policy was modified."""
    version: Optional[str] = rest_field(visibility=["read"])
    """Describes the version of the policy."""
    labels: Optional[dict[str, "_models.SensitivityLabel"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Dictionary of sensitivity labels."""
    information_types: Optional[dict[str, "_models.InformationType"]] = rest_field(
        name="informationTypes", visibility=["read", "create", "update", "delete", "query"]
    )
    """The sensitivity information types."""

    @overload
    def __init__(
        self,
        *,
        labels: Optional[dict[str, "_models.SensitivityLabel"]] = None,
        information_types: Optional[dict[str, "_models.InformationType"]] = None,
    ) -> None: ...

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

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


class InformationType(_Model):
    """The information type.

    :ivar display_name: The name of the information type.
    :vartype display_name: str
    :ivar description: The description of the information type.
    :vartype description: str
    :ivar order: The order of the information type.
    :vartype order: int
    :ivar recommended_label_id: The recommended label id to be associated with this information
     type.
    :vartype recommended_label_id: str
    :ivar enabled: Indicates whether the information type is enabled or not.
    :vartype enabled: bool
    :ivar custom: Indicates whether the information type is custom or not.
    :vartype custom: bool
    :ivar keywords: The information type keywords.
    :vartype keywords: list[~azure.mgmt.security.models.InformationProtectionKeyword]
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the information type."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the information type."""
    order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The order of the information type."""
    recommended_label_id: Optional[str] = rest_field(
        name="recommendedLabelId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The recommended label id to be associated with this information type."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the information type is enabled or not."""
    custom: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the information type is custom or not."""
    keywords: Optional[list["_models.InformationProtectionKeyword"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The information type keywords."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        order: Optional[int] = None,
        recommended_label_id: Optional[str] = None,
        enabled: Optional[bool] = None,
        custom: Optional[bool] = None,
        keywords: Optional[list["_models.InformationProtectionKeyword"]] = None,
    ) -> None: ...

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

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


class InfoType(_Model):
    """Custom user-defined information type.

    :ivar name: Display name of the info type.
    :vartype name: str
    :ivar id: Id of the info type.
    :vartype id: str
    :ivar description: Description of the info type.
    :vartype description: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Display name of the info type."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Id of the info type."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the info type."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        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 InventoryList(_Model):
    """Model for inventory to be included or excluded from Agentless.

    :ivar inventory_kind: Types for inventory kind. Known values are: "AzureDevOpsOrganization",
     "AzureDevOpsProject", "AzureDevOpsRepository", "GitHubOwner", and "GitHubRepository".
    :vartype inventory_kind: str or ~azure.mgmt.security.models.InventoryKind
    :ivar value: Gets or sets the value for inventory type.
    :vartype value: str
    """

    inventory_kind: Optional[Union[str, "_models.InventoryKind"]] = rest_field(
        name="inventoryKind", visibility=["read", "create", "update", "delete", "query"]
    )
    """Types for inventory kind. Known values are: \"AzureDevOpsOrganization\",
     \"AzureDevOpsProject\", \"AzureDevOpsRepository\", \"GitHubOwner\", and \"GitHubRepository\"."""
    value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Gets or sets the value for inventory type."""

    @overload
    def __init__(
        self,
        *,
        inventory_kind: Optional[Union[str, "_models.InventoryKind"]] = 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 IoTSecurityAggregatedAlert(ProxyResource):
    """Security Solution Aggregated Alert information.

    :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.security.models.SystemData
    :ivar properties: IoT Security solution aggregated alert details.
    :vartype properties: ~azure.mgmt.security.models.IoTSecurityAggregatedAlertProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.IoTSecurityAggregatedAlertProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """IoT Security solution aggregated alert details."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    __flattened_items = [
        "alert_type",
        "alert_display_name",
        "aggregated_date_utc",
        "vendor_name",
        "reported_severity",
        "remediation_steps",
        "description",
        "count",
        "effected_resource_type",
        "system_source",
        "action_taken",
        "log_analytics_query",
        "top_devices_list",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.IoTSecurityAggregatedAlertProperties"] = 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 IoTSecurityAggregatedAlertProperties(_Model):
    """IoT Security solution aggregated alert details.

    :ivar alert_type: Name of the alert type.
    :vartype alert_type: str
    :ivar alert_display_name: Display name of the alert type.
    :vartype alert_display_name: str
    :ivar aggregated_date_utc: Date of detection.
    :vartype aggregated_date_utc: ~datetime.date
    :ivar vendor_name: Name of the organization that raised the alert.
    :vartype vendor_name: str
    :ivar reported_severity: Assessed alert severity. Known values are: "Informational", "Low",
     "Medium", and "High".
    :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity
    :ivar remediation_steps: Recommended steps for remediation.
    :vartype remediation_steps: str
    :ivar description: Description of the suspected vulnerability and meaning.
    :vartype description: str
    :ivar count: Number of alerts occurrences within the aggregated time window.
    :vartype count: int
    :ivar effected_resource_type: Azure resource ID of the resource that received the alerts.
    :vartype effected_resource_type: str
    :ivar system_source: The type of the alerted resource (Azure, Non-Azure).
    :vartype system_source: str
    :ivar action_taken: IoT Security solution alert response.
    :vartype action_taken: str
    :ivar log_analytics_query: Log analytics query for getting the list of affected devices/alerts.
    :vartype log_analytics_query: str
    :ivar top_devices_list: 10 devices with the highest number of occurrences of this alert type,
     on this day.
    :vartype top_devices_list:
     list[~azure.mgmt.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem]
    """

    alert_type: Optional[str] = rest_field(name="alertType", visibility=["read"])
    """Name of the alert type."""
    alert_display_name: Optional[str] = rest_field(name="alertDisplayName", visibility=["read"])
    """Display name of the alert type."""
    aggregated_date_utc: Optional[datetime.date] = rest_field(name="aggregatedDateUtc", visibility=["read"])
    """Date of detection."""
    vendor_name: Optional[str] = rest_field(name="vendorName", visibility=["read"])
    """Name of the organization that raised the alert."""
    reported_severity: Optional[Union[str, "_models.ReportedSeverity"]] = rest_field(
        name="reportedSeverity", visibility=["read"]
    )
    """Assessed alert severity. Known values are: \"Informational\", \"Low\", \"Medium\", and
     \"High\"."""
    remediation_steps: Optional[str] = rest_field(name="remediationSteps", visibility=["read"])
    """Recommended steps for remediation."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Description of the suspected vulnerability and meaning."""
    count: Optional[int] = rest_field(visibility=["read"])
    """Number of alerts occurrences within the aggregated time window."""
    effected_resource_type: Optional[str] = rest_field(name="effectedResourceType", visibility=["read"])
    """Azure resource ID of the resource that received the alerts."""
    system_source: Optional[str] = rest_field(name="systemSource", visibility=["read"])
    """The type of the alerted resource (Azure, Non-Azure)."""
    action_taken: Optional[str] = rest_field(name="actionTaken", visibility=["read"])
    """IoT Security solution alert response."""
    log_analytics_query: Optional[str] = rest_field(name="logAnalyticsQuery", visibility=["read"])
    """Log analytics query for getting the list of affected devices/alerts."""
    top_devices_list: Optional[list["_models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem"]] = rest_field(
        name="topDevicesList", visibility=["read"]
    )
    """10 devices with the highest number of occurrences of this alert type, on this day."""


class IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(_Model):  # pylint: disable=name-too-long
    """IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.

    :ivar device_id: Name of the device.
    :vartype device_id: str
    :ivar alerts_count: Number of alerts raised for this device.
    :vartype alerts_count: int
    :ivar last_occurrence: Most recent time this alert was raised for this device, on this day.
    :vartype last_occurrence: str
    """

    device_id: Optional[str] = rest_field(name="deviceId", visibility=["read"])
    """Name of the device."""
    alerts_count: Optional[int] = rest_field(name="alertsCount", visibility=["read"])
    """Number of alerts raised for this device."""
    last_occurrence: Optional[str] = rest_field(name="lastOccurrence", visibility=["read"])
    """Most recent time this alert was raised for this device, on this day."""


class IoTSecurityAggregatedRecommendation(ProxyResource):
    """IoT Security solution recommendation information.

    :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.security.models.SystemData
    :ivar properties: Security Solution data.
    :vartype properties: ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    """

    properties: Optional["_models.IoTSecurityAggregatedRecommendationProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security Solution data."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""

    __flattened_items = [
        "recommendation_name",
        "recommendation_display_name",
        "description",
        "recommendation_type_id",
        "detected_by",
        "remediation_steps",
        "reported_severity",
        "healthy_devices",
        "unhealthy_device_count",
        "log_analytics_query",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.IoTSecurityAggregatedRecommendationProperties"] = 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 IoTSecurityAggregatedRecommendationProperties(_Model):  # pylint: disable=name-too-long
    """IoT Security solution aggregated recommendation information.

    :ivar recommendation_name: Name of the recommendation.
    :vartype recommendation_name: str
    :ivar recommendation_display_name: Display name of the recommendation type.
    :vartype recommendation_display_name: str
    :ivar description: Description of the suspected vulnerability and meaning.
    :vartype description: str
    :ivar recommendation_type_id: Recommendation-type GUID.
    :vartype recommendation_type_id: str
    :ivar detected_by: Name of the organization that made the recommendation.
    :vartype detected_by: str
    :ivar remediation_steps: Recommended steps for remediation.
    :vartype remediation_steps: str
    :ivar reported_severity: Assessed recommendation severity. Known values are: "Informational",
     "Low", "Medium", and "High".
    :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity
    :ivar healthy_devices: Number of healthy devices within the IoT Security solution.
    :vartype healthy_devices: int
    :ivar unhealthy_device_count: Number of unhealthy devices within the IoT Security solution.
    :vartype unhealthy_device_count: int
    :ivar log_analytics_query: Log analytics query for getting the list of affected devices/alerts.
    :vartype log_analytics_query: str
    """

    recommendation_name: Optional[str] = rest_field(
        name="recommendationName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the recommendation."""
    recommendation_display_name: Optional[str] = rest_field(name="recommendationDisplayName", visibility=["read"])
    """Display name of the recommendation type."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Description of the suspected vulnerability and meaning."""
    recommendation_type_id: Optional[str] = rest_field(name="recommendationTypeId", visibility=["read"])
    """Recommendation-type GUID."""
    detected_by: Optional[str] = rest_field(name="detectedBy", visibility=["read"])
    """Name of the organization that made the recommendation."""
    remediation_steps: Optional[str] = rest_field(name="remediationSteps", visibility=["read"])
    """Recommended steps for remediation."""
    reported_severity: Optional[Union[str, "_models.ReportedSeverity"]] = rest_field(
        name="reportedSeverity", visibility=["read"]
    )
    """Assessed recommendation severity. Known values are: \"Informational\", \"Low\", \"Medium\", and
     \"High\"."""
    healthy_devices: Optional[int] = rest_field(name="healthyDevices", visibility=["read"])
    """Number of healthy devices within the IoT Security solution."""
    unhealthy_device_count: Optional[int] = rest_field(name="unhealthyDeviceCount", visibility=["read"])
    """Number of unhealthy devices within the IoT Security solution."""
    log_analytics_query: Optional[str] = rest_field(name="logAnalyticsQuery", visibility=["read"])
    """Log analytics query for getting the list of affected devices/alerts."""

    @overload
    def __init__(
        self,
        *,
        recommendation_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 IoTSecurityAlertedDevice(_Model):
    """Statistical information about the number of alerts per device during last set number of days.

    :ivar device_id: Device identifier.
    :vartype device_id: str
    :ivar alerts_count: Number of alerts raised for this device.
    :vartype alerts_count: int
    """

    device_id: Optional[str] = rest_field(name="deviceId", visibility=["read"])
    """Device identifier."""
    alerts_count: Optional[int] = rest_field(name="alertsCount", visibility=["read"])
    """Number of alerts raised for this device."""


class IoTSecurityDeviceAlert(_Model):
    """Statistical information about the number of alerts per alert type during last set number of
    days.

    :ivar alert_display_name: Display name of the alert.
    :vartype alert_display_name: str
    :ivar reported_severity: Assessed Alert severity. Known values are: "Informational", "Low",
     "Medium", and "High".
    :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity
    :ivar alerts_count: Number of alerts raised for this alert type.
    :vartype alerts_count: int
    """

    alert_display_name: Optional[str] = rest_field(name="alertDisplayName", visibility=["read"])
    """Display name of the alert."""
    reported_severity: Optional[Union[str, "_models.ReportedSeverity"]] = rest_field(
        name="reportedSeverity", visibility=["read"]
    )
    """Assessed Alert severity. Known values are: \"Informational\", \"Low\", \"Medium\", and
     \"High\"."""
    alerts_count: Optional[int] = rest_field(name="alertsCount", visibility=["read"])
    """Number of alerts raised for this alert type."""


class IoTSecurityDeviceRecommendation(_Model):
    """Statistical information about the number of recommendations per device, per recommendation
    type.

    :ivar recommendation_display_name: Display name of the recommendation.
    :vartype recommendation_display_name: str
    :ivar reported_severity: Assessed recommendation severity. Known values are: "Informational",
     "Low", "Medium", and "High".
    :vartype reported_severity: str or ~azure.mgmt.security.models.ReportedSeverity
    :ivar devices_count: Number of devices with this recommendation.
    :vartype devices_count: int
    """

    recommendation_display_name: Optional[str] = rest_field(name="recommendationDisplayName", visibility=["read"])
    """Display name of the recommendation."""
    reported_severity: Optional[Union[str, "_models.ReportedSeverity"]] = rest_field(
        name="reportedSeverity", visibility=["read"]
    )
    """Assessed recommendation severity. Known values are: \"Informational\", \"Low\", \"Medium\", and
     \"High\"."""
    devices_count: Optional[int] = rest_field(name="devicesCount", visibility=["read"])
    """Number of devices with this recommendation."""


class IoTSecuritySolutionAnalyticsModel(ProxyResource):
    """Security analytics of your IoT Security solution.

    :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.security.models.SystemData
    :ivar properties: Security Solution  Aggregated Alert data.
    :vartype properties: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelProperties
    """

    properties: Optional["_models.IoTSecuritySolutionAnalyticsModelProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security Solution  Aggregated Alert data."""

    __flattened_items = [
        "metrics",
        "unhealthy_device_count",
        "devices_metrics",
        "top_alerted_devices",
        "most_prevalent_device_alerts",
        "most_prevalent_device_recommendations",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 IoTSecuritySolutionAnalyticsModelList(_Model):
    """List of Security analytics of your IoT Security solution.

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

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

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

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

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


class IoTSecuritySolutionAnalyticsModelProperties(_Model):  # pylint: disable=name-too-long
    """Security analytics properties of your IoT Security solution.

    :ivar metrics: Security analytics of your IoT Security solution.
    :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics
    :ivar unhealthy_device_count: Number of unhealthy devices within your IoT Security solution.
    :vartype unhealthy_device_count: int
    :ivar devices_metrics: List of device metrics by the aggregation date.
    :vartype devices_metrics:
     list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]
    :ivar top_alerted_devices: List of the 3 devices with the most alerts.
    :vartype top_alerted_devices: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice]
    :ivar most_prevalent_device_alerts: List of the 3 most prevalent device alerts.
    :vartype most_prevalent_device_alerts: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert]
    :ivar most_prevalent_device_recommendations: List of the 3 most prevalent device
     recommendations.
    :vartype most_prevalent_device_recommendations:
     list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation]
    """

    metrics: Optional["_models.IoTSeverityMetrics"] = rest_field(visibility=["read"])
    """Security analytics of your IoT Security solution."""
    unhealthy_device_count: Optional[int] = rest_field(name="unhealthyDeviceCount", visibility=["read"])
    """Number of unhealthy devices within your IoT Security solution."""
    devices_metrics: Optional[list["_models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem"]] = (
        rest_field(name="devicesMetrics", visibility=["read"])
    )
    """List of device metrics by the aggregation date."""
    top_alerted_devices: Optional[list["_models.IoTSecurityAlertedDevice"]] = rest_field(
        name="topAlertedDevices", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the 3 devices with the most alerts."""
    most_prevalent_device_alerts: Optional[list["_models.IoTSecurityDeviceAlert"]] = rest_field(
        name="mostPrevalentDeviceAlerts", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the 3 most prevalent device alerts."""
    most_prevalent_device_recommendations: Optional[list["_models.IoTSecurityDeviceRecommendation"]] = rest_field(
        name="mostPrevalentDeviceRecommendations", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the 3 most prevalent device recommendations."""

    @overload
    def __init__(
        self,
        *,
        top_alerted_devices: Optional[list["_models.IoTSecurityAlertedDevice"]] = None,
        most_prevalent_device_alerts: Optional[list["_models.IoTSecurityDeviceAlert"]] = None,
        most_prevalent_device_recommendations: Optional[list["_models.IoTSecurityDeviceRecommendation"]] = None,
    ) -> None: ...

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

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


class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(_Model):  # pylint: disable=name-too-long
    """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem.

    :ivar date: Aggregation of IoT Security solution device alert metrics by date.
    :vartype date: ~datetime.datetime
    :ivar devices_metrics: Device alert count by severity.
    :vartype devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics
    """

    date: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Aggregation of IoT Security solution device alert metrics by date."""
    devices_metrics: Optional["_models.IoTSeverityMetrics"] = rest_field(
        name="devicesMetrics", visibility=["read", "create", "update", "delete", "query"]
    )
    """Device alert count by severity."""

    @overload
    def __init__(
        self,
        *,
        date: Optional[datetime.datetime] = None,
        devices_metrics: Optional["_models.IoTSeverityMetrics"] = None,
    ) -> None: ...

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

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


class IoTSecuritySolutionModel(ProxyResource):
    """IoT Security solution configuration and resource information.

    :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.security.models.SystemData
    :ivar properties: Security Solution data.
    :vartype properties: ~azure.mgmt.security.models.IoTSecuritySolutionProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    """

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

    __flattened_items = [
        "workspace",
        "display_name",
        "status",
        "export",
        "disabled_data_sources",
        "iot_hubs",
        "user_defined_resources",
        "auto_discovered_resources",
        "recommendations_configuration",
        "unmasked_ip_logging_status",
        "additional_workspaces",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.IoTSecuritySolutionProperties"] = 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 IoTSecuritySolutionProperties(_Model):
    """Security Solution setting data.

    :ivar workspace: Workspace resource ID.
    :vartype workspace: str
    :ivar display_name: Resource display name. Required.
    :vartype display_name: str
    :ivar status: Status of the IoT Security solution. Known values are: "Enabled" and "Disabled".
    :vartype status: str or ~azure.mgmt.security.models.SecuritySolutionStatus
    :ivar export: List of additional options for exporting to workspace data.
    :vartype export: list[str or ~azure.mgmt.security.models.ExportData]
    :ivar disabled_data_sources: Disabled data sources. Disabling these data sources compromises
     the system.
    :vartype disabled_data_sources: list[str or ~azure.mgmt.security.models.DataSource]
    :ivar iot_hubs: IoT Hub resource IDs. Required.
    :vartype iot_hubs: list[str]
    :ivar user_defined_resources: Properties of the IoT Security solution's user defined resources.
    :vartype user_defined_resources: ~azure.mgmt.security.models.UserDefinedResourcesProperties
    :ivar auto_discovered_resources: List of resources that were automatically discovered as
     relevant to the security solution.
    :vartype auto_discovered_resources: list[str]
    :ivar recommendations_configuration: List of the configuration status for each recommendation
     type.
    :vartype recommendations_configuration:
     list[~azure.mgmt.security.models.RecommendationConfigurationProperties]
    :ivar unmasked_ip_logging_status: Unmasked IP address logging status. Known values are:
     "Disabled" and "Enabled".
    :vartype unmasked_ip_logging_status: str or ~azure.mgmt.security.models.UnmaskedIpLoggingStatus
    :ivar additional_workspaces: List of additional workspaces.
    :vartype additional_workspaces:
     list[~azure.mgmt.security.models.AdditionalWorkspacesProperties]
    """

    workspace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Workspace resource ID."""
    display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"])
    """Resource display name. Required."""
    status: Optional[Union[str, "_models.SecuritySolutionStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status of the IoT Security solution. Known values are: \"Enabled\" and \"Disabled\"."""
    export: Optional[list[Union[str, "_models.ExportData"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of additional options for exporting to workspace data."""
    disabled_data_sources: Optional[list[Union[str, "_models.DataSource"]]] = rest_field(
        name="disabledDataSources", visibility=["read", "create", "update", "delete", "query"]
    )
    """Disabled data sources. Disabling these data sources compromises the system."""
    iot_hubs: list[str] = rest_field(name="iotHubs", visibility=["read", "create", "update", "delete", "query"])
    """IoT Hub resource IDs. Required."""
    user_defined_resources: Optional["_models.UserDefinedResourcesProperties"] = rest_field(
        name="userDefinedResources", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the IoT Security solution's user defined resources."""
    auto_discovered_resources: Optional[list[str]] = rest_field(name="autoDiscoveredResources", visibility=["read"])
    """List of resources that were automatically discovered as relevant to the security solution."""
    recommendations_configuration: Optional[list["_models.RecommendationConfigurationProperties"]] = rest_field(
        name="recommendationsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the configuration status for each recommendation type."""
    unmasked_ip_logging_status: Optional[Union[str, "_models.UnmaskedIpLoggingStatus"]] = rest_field(
        name="unmaskedIpLoggingStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """Unmasked IP address logging status. Known values are: \"Disabled\" and \"Enabled\"."""
    additional_workspaces: Optional[list["_models.AdditionalWorkspacesProperties"]] = rest_field(
        name="additionalWorkspaces", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of additional workspaces."""

    @overload
    def __init__(
        self,
        *,
        display_name: str,
        iot_hubs: list[str],
        workspace: Optional[str] = None,
        status: Optional[Union[str, "_models.SecuritySolutionStatus"]] = None,
        export: Optional[list[Union[str, "_models.ExportData"]]] = None,
        disabled_data_sources: Optional[list[Union[str, "_models.DataSource"]]] = None,
        user_defined_resources: Optional["_models.UserDefinedResourcesProperties"] = None,
        recommendations_configuration: Optional[list["_models.RecommendationConfigurationProperties"]] = None,
        unmasked_ip_logging_status: Optional[Union[str, "_models.UnmaskedIpLoggingStatus"]] = None,
        additional_workspaces: Optional[list["_models.AdditionalWorkspacesProperties"]] = None,
    ) -> None: ...

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

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


class IoTSeverityMetrics(_Model):
    """IoT Security solution analytics severity metrics.

    :ivar high: Count of high severity alerts/recommendations.
    :vartype high: int
    :ivar medium: Count of medium severity alerts/recommendations.
    :vartype medium: int
    :ivar low: Count of low severity alerts/recommendations.
    :vartype low: int
    """

    high: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Count of high severity alerts/recommendations."""
    medium: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Count of medium severity alerts/recommendations."""
    low: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Count of low severity alerts/recommendations."""

    @overload
    def __init__(
        self,
        *,
        high: Optional[int] = None,
        medium: Optional[int] = None,
        low: 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 Issue(_Model):
    """The issue that caused the resource to by unhealthy.

    :ivar issue_key: The unique issue key. Required.
    :vartype issue_key: str
    :ivar issue_name: The issue name.
    :vartype issue_name: str
    :ivar security_values: The affected security values that MDC offers that will be affected by
     the issue, for example: recommendations, alerts, etc.
    :vartype security_values: list[str]
    :ivar issue_description: The issue description.
    :vartype issue_description: str
    :ivar remediation_steps: Human readable description of what you should do to mitigate this
     health issue.
    :vartype remediation_steps: str
    :ivar remediation_script: The remediation script to solve this issue.
    :vartype remediation_script: str
    :ivar issue_additional_data: Additional data for the given issue. The additional data depends
     on the issue type.
    :vartype issue_additional_data: dict[str, str]
    """

    issue_key: str = rest_field(name="issueKey", visibility=["read", "create", "update", "delete", "query"])
    """The unique issue key. Required."""
    issue_name: Optional[str] = rest_field(name="issueName", visibility=["read", "create", "update", "delete", "query"])
    """The issue name."""
    security_values: Optional[list[str]] = rest_field(
        name="securityValues", visibility=["read", "create", "update", "delete", "query"]
    )
    """The affected security values that MDC offers that will be affected by the issue, for example:
     recommendations, alerts, etc."""
    issue_description: Optional[str] = rest_field(
        name="issueDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """The issue description."""
    remediation_steps: Optional[str] = rest_field(
        name="remediationSteps", visibility=["read", "create", "update", "delete", "query"]
    )
    """Human readable description of what you should do to mitigate this health issue."""
    remediation_script: Optional[str] = rest_field(
        name="remediationScript", visibility=["read", "create", "update", "delete", "query"]
    )
    """The remediation script to solve this issue."""
    issue_additional_data: Optional[dict[str, str]] = rest_field(
        name="issueAdditionalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional data for the given issue. The additional data depends on the issue type."""

    @overload
    def __init__(
        self,
        *,
        issue_key: str,
        issue_name: Optional[str] = None,
        security_values: Optional[list[str]] = None,
        issue_description: Optional[str] = None,
        remediation_steps: Optional[str] = None,
        remediation_script: Optional[str] = None,
        issue_additional_data: 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 IssueCreationRequest(_Model):
    """The issue creation request model.

    :ivar security_assessment_resource_id: The security assessment resource id that the issue will
     be opened based on.
    :vartype security_assessment_resource_id: str
    """

    security_assessment_resource_id: Optional[str] = rest_field(
        name="securityAssessmentResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security assessment resource id that the issue will be opened based on."""

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

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

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


class JFrogEnvironmentData(EnvironmentData, discriminator="JFrogArtifactory"):
    """The JFrog Artifactory connector environment data.

    :ivar scan_interval: Scan interval in hours (value should be between 1-hour to 24-hours).
    :vartype scan_interval: int
    :ivar environment_type: The type of the environment data. Required. JFrogArtifactory.
    :vartype environment_type: str or ~azure.mgmt.security.models.J_FROG_ARTIFACTORY
    """

    scan_interval: Optional[int] = rest_field(
        name="scanInterval", visibility=["read", "create", "update", "delete", "query"]
    )
    """Scan interval in hours (value should be between 1-hour to 24-hours)."""
    environment_type: Literal[EnvironmentType.J_FROG_ARTIFACTORY] = rest_discriminator(name="environmentType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the environment data. Required. JFrogArtifactory."""

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

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

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


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

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

    properties: "_models.JitNetworkAccessPolicyProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the resource."""
    location: str = rest_field(visibility=["read"])
    """Location where the resource is stored. Required."""

    __flattened_items = ["virtual_machines", "requests", "provisioning_state"]

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

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

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        _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 JitNetworkAccessPolicyInitiatePort(_Model):
    """JitNetworkAccessPolicyInitiatePort.

    :ivar number: Required.
    :vartype number: int
    :ivar allowed_source_address_prefix: Source of the allowed traffic. If omitted, the request
     will be for the source IP address of the initiate request.
    :vartype allowed_source_address_prefix: str
    :ivar end_time_utc: The time to close the request in UTC. Required.
    :vartype end_time_utc: ~datetime.datetime
    """

    number: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    allowed_source_address_prefix: Optional[str] = rest_field(
        name="allowedSourceAddressPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Source of the allowed traffic. If omitted, the request will be for the source IP address of the
     initiate request."""
    end_time_utc: datetime.datetime = rest_field(
        name="endTimeUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The time to close the request in UTC. Required."""

    @overload
    def __init__(
        self,
        *,
        number: int,
        end_time_utc: datetime.datetime,
        allowed_source_address_prefix: Optional[str] = None,
    ) -> None: ...

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

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


class JitNetworkAccessPolicyInitiateRequest(_Model):
    """JitNetworkAccessPolicyInitiateRequest.

    :ivar virtual_machines: A list of virtual machines & ports to open access for. Required.
    :vartype virtual_machines:
     list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine]
    :ivar justification: The justification for making the initiate request.
    :vartype justification: str
    """

    virtual_machines: list["_models.JitNetworkAccessPolicyInitiateVirtualMachine"] = rest_field(
        name="virtualMachines", visibility=["read", "create", "update", "delete", "query"]
    )
    """A list of virtual machines & ports to open access for. Required."""
    justification: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The justification for making the initiate request."""

    @overload
    def __init__(
        self,
        *,
        virtual_machines: list["_models.JitNetworkAccessPolicyInitiateVirtualMachine"],
        justification: 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 JitNetworkAccessPolicyInitiateVirtualMachine(_Model):  # pylint: disable=name-too-long
    """JitNetworkAccessPolicyInitiateVirtualMachine.

    :ivar id: Resource ID of the virtual machine that is linked to this policy. Required.
    :vartype id: str
    :ivar ports: The ports to open for the resource with the ``id``. Required.
    :vartype ports: list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of the virtual machine that is linked to this policy. Required."""
    ports: list["_models.JitNetworkAccessPolicyInitiatePort"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The ports to open for the resource with the ``id``. Required."""

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

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

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


class JitNetworkAccessPolicyProperties(_Model):
    """JitNetworkAccessPolicyProperties.

    :ivar virtual_machines: Configurations for Microsoft.Compute/virtualMachines resource type.
     Required.
    :vartype virtual_machines:
     list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine]
    :ivar requests:
    :vartype requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest]
    :ivar provisioning_state: Gets the provisioning state of the Just-in-Time policy.
    :vartype provisioning_state: str
    """

    virtual_machines: list["_models.JitNetworkAccessPolicyVirtualMachine"] = rest_field(
        name="virtualMachines", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configurations for Microsoft.Compute/virtualMachines resource type. Required."""
    requests: Optional[list["_models.JitNetworkAccessRequest"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
    """Gets the provisioning state of the Just-in-Time policy."""

    @overload
    def __init__(
        self,
        *,
        virtual_machines: list["_models.JitNetworkAccessPolicyVirtualMachine"],
        requests: Optional[list["_models.JitNetworkAccessRequest"]] = None,
    ) -> None: ...

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

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


class JitNetworkAccessPolicyVirtualMachine(_Model):
    """JitNetworkAccessPolicyVirtualMachine.

    :ivar id: Resource ID of the virtual machine that is linked to this policy. Required.
    :vartype id: str
    :ivar ports: Port configurations for the virtual machine. Required.
    :vartype ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule]
    :ivar public_ip_address: Public IP address of the Azure Firewall that is linked to this policy,
     if applicable.
    :vartype public_ip_address: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of the virtual machine that is linked to this policy. Required."""
    ports: list["_models.JitNetworkAccessPortRule"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Port configurations for the virtual machine. Required."""
    public_ip_address: Optional[str] = rest_field(
        name="publicIpAddress", visibility=["read", "create", "update", "delete", "query"]
    )
    """Public IP address of the Azure Firewall that is linked to this policy, if applicable."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        ports: list["_models.JitNetworkAccessPortRule"],
        public_ip_address: 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 JitNetworkAccessPortRule(_Model):
    """JitNetworkAccessPortRule.

    :ivar number: Required.
    :vartype number: int
    :ivar protocol: Required. Known values are: "TCP", "UDP", and "*".
    :vartype protocol: str or ~azure.mgmt.security.models.ProtocolEnum
    :ivar allowed_source_address_prefix: Mutually exclusive with the "allowedSourceAddressPrefixes"
     parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
    :vartype allowed_source_address_prefix: str
    :ivar allowed_source_address_prefixes: Mutually exclusive with the "allowedSourceAddressPrefix"
     parameter.
    :vartype allowed_source_address_prefixes: list[str]
    :ivar max_request_access_duration: Maximum duration requests can be made for. In ISO 8601
     duration format. Minimum 5 minutes, maximum 1 day. Required.
    :vartype max_request_access_duration: str
    """

    number: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    protocol: Union[str, "_models.ProtocolEnum"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Known values are: \"TCP\", \"UDP\", and \"*\"."""
    allowed_source_address_prefix: Optional[str] = rest_field(
        name="allowedSourceAddressPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mutually exclusive with the \"allowedSourceAddressPrefixes\" parameter. Should be an IP address
     or CIDR, for example \"192.168.0.3\" or \"192.168.0.0/16\"."""
    allowed_source_address_prefixes: Optional[list[str]] = rest_field(
        name="allowedSourceAddressPrefixes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mutually exclusive with the \"allowedSourceAddressPrefix\" parameter."""
    max_request_access_duration: str = rest_field(
        name="maxRequestAccessDuration", visibility=["read", "create", "update", "delete", "query"]
    )
    """Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes,
     maximum 1 day. Required."""

    @overload
    def __init__(
        self,
        *,
        number: int,
        protocol: Union[str, "_models.ProtocolEnum"],
        max_request_access_duration: str,
        allowed_source_address_prefix: Optional[str] = None,
        allowed_source_address_prefixes: Optional[list[str]] = None,
    ) -> None: ...

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

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


class JitNetworkAccessRequest(_Model):
    """JitNetworkAccessRequest.

    :ivar virtual_machines: Required.
    :vartype virtual_machines:
     list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine]
    :ivar start_time_utc: The start time of the request in UTC. Required.
    :vartype start_time_utc: ~datetime.datetime
    :ivar requestor: The identity of the person who made the request. Required.
    :vartype requestor: str
    :ivar justification: The justification for making the initiate request.
    :vartype justification: str
    """

    virtual_machines: list["_models.JitNetworkAccessRequestVirtualMachine"] = rest_field(
        name="virtualMachines", visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    start_time_utc: datetime.datetime = rest_field(
        name="startTimeUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The start time of the request in UTC. Required."""
    requestor: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identity of the person who made the request. Required."""
    justification: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The justification for making the initiate request."""

    @overload
    def __init__(
        self,
        *,
        virtual_machines: list["_models.JitNetworkAccessRequestVirtualMachine"],
        start_time_utc: datetime.datetime,
        requestor: str,
        justification: 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 JitNetworkAccessRequestPort(_Model):
    """JitNetworkAccessRequestPort.

    :ivar number: Required.
    :vartype number: int
    :ivar allowed_source_address_prefix: Mutually exclusive with the "allowedSourceAddressPrefixes"
     parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
    :vartype allowed_source_address_prefix: str
    :ivar allowed_source_address_prefixes: Mutually exclusive with the "allowedSourceAddressPrefix"
     parameter.
    :vartype allowed_source_address_prefixes: list[str]
    :ivar end_time_utc: The date & time at which the request ends in UTC. Required.
    :vartype end_time_utc: ~datetime.datetime
    :ivar status: The status of the port. Required. Known values are: "Revoked" and "Initiated".
    :vartype status: str or ~azure.mgmt.security.models.Status
    :ivar status_reason: A description of why the ``status`` has its value. Required. Known values
     are: "Expired", "UserRequested", and "NewerRequestInitiated".
    :vartype status_reason: str or ~azure.mgmt.security.models.StatusReason
    :ivar mapped_port: The port which is mapped to this port's ``number`` in the Azure Firewall, if
     applicable.
    :vartype mapped_port: int
    """

    number: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    allowed_source_address_prefix: Optional[str] = rest_field(
        name="allowedSourceAddressPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mutually exclusive with the \"allowedSourceAddressPrefixes\" parameter. Should be an IP address
     or CIDR, for example \"192.168.0.3\" or \"192.168.0.0/16\"."""
    allowed_source_address_prefixes: Optional[list[str]] = rest_field(
        name="allowedSourceAddressPrefixes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Mutually exclusive with the \"allowedSourceAddressPrefix\" parameter."""
    end_time_utc: datetime.datetime = rest_field(
        name="endTimeUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The date & time at which the request ends in UTC. Required."""
    status: Union[str, "_models.Status"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status of the port. Required. Known values are: \"Revoked\" and \"Initiated\"."""
    status_reason: Union[str, "_models.StatusReason"] = rest_field(
        name="statusReason", visibility=["read", "create", "update", "delete", "query"]
    )
    """A description of why the ``status`` has its value. Required. Known values are: \"Expired\",
     \"UserRequested\", and \"NewerRequestInitiated\"."""
    mapped_port: Optional[int] = rest_field(
        name="mappedPort", visibility=["read", "create", "update", "delete", "query"]
    )
    """The port which is mapped to this port's ``number`` in the Azure Firewall, if applicable."""

    @overload
    def __init__(
        self,
        *,
        number: int,
        end_time_utc: datetime.datetime,
        status: Union[str, "_models.Status"],
        status_reason: Union[str, "_models.StatusReason"],
        allowed_source_address_prefix: Optional[str] = None,
        allowed_source_address_prefixes: Optional[list[str]] = None,
        mapped_port: Optional[int] = None,
    ) -> None: ...

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

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


class JitNetworkAccessRequestVirtualMachine(_Model):
    """JitNetworkAccessRequestVirtualMachine.

    :ivar id: Resource ID of the virtual machine that is linked to this policy. Required.
    :vartype id: str
    :ivar ports: The ports that were opened for the virtual machine. Required.
    :vartype ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource ID of the virtual machine that is linked to this policy. Required."""
    ports: list["_models.JitNetworkAccessRequestPort"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The ports that were opened for the virtual machine. Required."""

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

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

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


class Label(_Model):
    """Microsoft information protection sensitivity label.

    :ivar name: The display name of the label.
    :vartype name: str
    :ivar id: The ID of the label.
    :vartype id: str
    :ivar order: Labels are ordered by sensitivity level. The higher the order of the label, the
     more sensitive it is.
    :vartype order: float
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The display name of the label."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the label."""
    order: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Labels are ordered by sensitivity level. The higher the order of the label, the more sensitive
     it is."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        order: 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 LogAnalyticsIdentifier(ResourceIdentifier, discriminator="LogAnalytics"):
    """Represents a Log Analytics workspace scope identifier.

    :ivar workspace_id: The LogAnalytics workspace id that stores this alert.
    :vartype workspace_id: str
    :ivar workspace_subscription_id: The azure subscription id for the LogAnalytics workspace
     storing this alert.
    :vartype workspace_subscription_id: str
    :ivar workspace_resource_group: The azure resource group for the LogAnalytics workspace storing
     this alert.
    :vartype workspace_resource_group: str
    :ivar agent_id: (optional) The LogAnalytics agent id reporting the event that this alert is
     based on.
    :vartype agent_id: str
    :ivar type: There can be multiple identifiers of different type per alert, this field specify
     the identifier type. Required. LogAnalytics.
    :vartype type: str or ~azure.mgmt.security.models.LOG_ANALYTICS
    """

    workspace_id: Optional[str] = rest_field(name="workspaceId", visibility=["read"])
    """The LogAnalytics workspace id that stores this alert."""
    workspace_subscription_id: Optional[str] = rest_field(name="workspaceSubscriptionId", visibility=["read"])
    """The azure subscription id for the LogAnalytics workspace storing this alert."""
    workspace_resource_group: Optional[str] = rest_field(name="workspaceResourceGroup", visibility=["read"])
    """The azure resource group for the LogAnalytics workspace storing this alert."""
    agent_id: Optional[str] = rest_field(name="agentId", visibility=["read"])
    """(optional) The LogAnalytics agent id reporting the event that this alert is based on."""
    type: Literal[ResourceIdentifierType.LOG_ANALYTICS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """There can be multiple identifiers of different type per alert, this field specify the
     identifier type. Required. LogAnalytics."""

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

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

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


class MalwareScan(_Model):
    """Describes the state of a malware scan operation.

    :ivar properties:
    :vartype properties: ~azure.mgmt.security.models.MalwareScanProperties
    """

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

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

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

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


class MalwareScanningProperties(_Model):
    """Properties of Malware Scanning.

    :ivar on_upload: Properties of On Upload malware scanning.
    :vartype on_upload: ~azure.mgmt.security.models.OnUploadProperties
    :ivar scan_results_event_grid_topic_resource_id: Optional. Resource id of an Event Grid Topic
     to send scan results to.
    :vartype scan_results_event_grid_topic_resource_id: str
    :ivar blob_scan_results_options: Optional. Write scan result on BlobIndexTags by default. Known
     values are: "BlobIndexTags" and "None".
    :vartype blob_scan_results_options: str or ~azure.mgmt.security.models.BlobScanResultsOptions
    :ivar automated_response: Optional. Specifies the automated response action to take when
     malware is detected. Known values are: "None" and "BlobSoftDelete".
    :vartype automated_response: str or ~azure.mgmt.security.models.AutomatedResponseType
    :ivar operation_status: Upon failure or partial success. Additional data describing Malware
     Scanning enable/disable operation.
    :vartype operation_status: ~azure.mgmt.security.models.OperationStatus
    """

    on_upload: Optional["_models.OnUploadProperties"] = rest_field(
        name="onUpload", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of On Upload malware scanning."""
    scan_results_event_grid_topic_resource_id: Optional[str] = rest_field(
        name="scanResultsEventGridTopicResourceId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Resource id of an Event Grid Topic to send scan results to."""
    blob_scan_results_options: Optional[Union[str, "_models.BlobScanResultsOptions"]] = rest_field(
        name="blobScanResultsOptions", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Write scan result on BlobIndexTags by default. Known values are: \"BlobIndexTags\"
     and \"None\"."""
    automated_response: Optional[Union[str, "_models.AutomatedResponseType"]] = rest_field(
        name="automatedResponse", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Specifies the automated response action to take when malware is detected. Known
     values are: \"None\" and \"BlobSoftDelete\"."""
    operation_status: Optional["_models.OperationStatus"] = rest_field(name="operationStatus", visibility=["read"])
    """Upon failure or partial success. Additional data describing Malware Scanning enable/disable
     operation."""

    @overload
    def __init__(
        self,
        *,
        on_upload: Optional["_models.OnUploadProperties"] = None,
        scan_results_event_grid_topic_resource_id: Optional[str] = None,
        blob_scan_results_options: Optional[Union[str, "_models.BlobScanResultsOptions"]] = None,
        automated_response: Optional[Union[str, "_models.AutomatedResponseType"]] = None,
    ) -> None: ...

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

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


class MalwareScanProperties(_Model):
    """MalwareScanProperties.

    :ivar scan_id: The identifier of the scan.
    :vartype scan_id: str
    :ivar scan_status: A status code of the scan operation.
    :vartype scan_status: str
    :ivar scan_status_message: A description of the status of the scan.
    :vartype scan_status_message: str
    :ivar scan_start_time: The time at which the scan had been initiated.
    :vartype scan_start_time: str
    :ivar scan_end_time: The time at which the scan has ended. Only available for a scan which has
     terminated.
    :vartype scan_end_time: str
    :ivar scan_summary: A summary of the scan results.
    :vartype scan_summary: ~azure.mgmt.security.models.ScanSummary
    """

    scan_id: Optional[str] = rest_field(name="scanId", visibility=["read", "create", "update", "delete", "query"])
    """The identifier of the scan."""
    scan_status: Optional[str] = rest_field(
        name="scanStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """A status code of the scan operation."""
    scan_status_message: Optional[str] = rest_field(
        name="scanStatusMessage", visibility=["read", "create", "update", "delete", "query"]
    )
    """A description of the status of the scan."""
    scan_start_time: Optional[str] = rest_field(
        name="scanStartTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time at which the scan had been initiated."""
    scan_end_time: Optional[str] = rest_field(
        name="scanEndTime", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time at which the scan has ended. Only available for a scan which has terminated."""
    scan_summary: Optional["_models.ScanSummary"] = rest_field(
        name="scanSummary", visibility=["read", "create", "update", "delete", "query"]
    )
    """A summary of the scan results."""

    @overload
    def __init__(
        self,
        *,
        scan_id: Optional[str] = None,
        scan_status: Optional[str] = None,
        scan_status_message: Optional[str] = None,
        scan_start_time: Optional[str] = None,
        scan_end_time: Optional[str] = None,
        scan_summary: Optional["_models.ScanSummary"] = None,
    ) -> None: ...

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

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


class MdeOnboardingData(ProxyResource):
    """The resource of the configuration or data needed to onboard the machine to MDE.

    :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.security.models.SystemData
    :ivar properties: Properties of the MDE configuration or data parameter needed to onboard the
     machine to MDE.
    :vartype properties: ~azure.mgmt.security.models.MdeOnboardingDataProperties
    """

    properties: Optional["_models.MdeOnboardingDataProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the MDE configuration or data parameter needed to onboard the machine to MDE."""

    __flattened_items = ["onboarding_package_windows", "onboarding_package_linux"]

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

    @overload
    def __init__(self, mapping: Mapping[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 MdeOnboardingDataList(_Model):
    """List of all MDE onboarding data resources.

    :ivar value: List of the resources of the configuration or data needed to onboard the machine
     to MDE.
    :vartype value: list[~azure.mgmt.security.models.MdeOnboardingData]
    """

    value: Optional[list["_models.MdeOnboardingData"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the resources of the configuration or data needed to onboard the machine to MDE."""

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

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

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


class MdeOnboardingDataProperties(_Model):
    """Properties of the MDE configuration or data parameter needed to onboard the machine to MDE.

    :ivar onboarding_package_windows: The onboarding package used to onboard Windows machines to
     MDE, coded in base64. This can also be used for onboarding using the dedicated VM Extension.
    :vartype onboarding_package_windows: bytes
    :ivar onboarding_package_linux: The onboarding package used to onboard Linux machines to MDE,
     coded in base64. This can also be used for onboarding using the dedicated VM Extension.
    :vartype onboarding_package_linux: bytes
    """

    onboarding_package_windows: Optional[bytes] = rest_field(
        name="onboardingPackageWindows", visibility=["read", "create", "update", "delete", "query"], format="base64"
    )
    """The onboarding package used to onboard Windows machines to MDE, coded in base64. This can also
     be used for onboarding using the dedicated VM Extension."""
    onboarding_package_linux: Optional[bytes] = rest_field(
        name="onboardingPackageLinux", visibility=["read", "create", "update", "delete", "query"], format="base64"
    )
    """The onboarding package used to onboard Linux machines to MDE, coded in base64. This can also be
     used for onboarding using the dedicated VM Extension."""

    @overload
    def __init__(
        self,
        *,
        onboarding_package_windows: Optional[bytes] = None,
        onboarding_package_linux: Optional[bytes] = None,
    ) -> None: ...

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

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


class NotificationsSource(_Model):
    """A valid notification source type.

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

    :ivar source_type: The source type that will trigger the notification. Required. Known values
     are: "Alert" and "AttackPath".
    :vartype source_type: str or ~azure.mgmt.security.models.SourceType
    """

    __mapping__: dict[str, _Model] = {}
    source_type: str = rest_discriminator(name="sourceType", visibility=["read", "create", "update", "delete", "query"])
    """The source type that will trigger the notification. Required. Known values are: \"Alert\" and
     \"AttackPath\"."""

    @overload
    def __init__(
        self,
        *,
        source_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 NotificationsSourceAlert(NotificationsSource, discriminator="Alert"):
    """Alert notification source.

    :ivar minimal_severity: Defines the minimal alert severity which will be sent as email
     notifications. Known values are: "High", "Medium", and "Low".
    :vartype minimal_severity: str or ~azure.mgmt.security.models.MinimalSeverity
    :ivar source_type: The source type that will trigger the notification. Required. Alert.
    :vartype source_type: str or ~azure.mgmt.security.models.ALERT
    """

    minimal_severity: Optional[Union[str, "_models.MinimalSeverity"]] = rest_field(
        name="minimalSeverity", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the minimal alert severity which will be sent as email notifications. Known values are:
     \"High\", \"Medium\", and \"Low\"."""
    source_type: Literal[SourceType.ALERT] = rest_discriminator(name="sourceType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The source type that will trigger the notification. Required. Alert."""

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

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


class NotificationsSourceAttackPath(NotificationsSource, discriminator="AttackPath"):
    """Attack path notification source.

    :ivar minimal_risk_level: Defines the minimal attach path risk level which will be sent as
     email notifications. Known values are: "Critical", "High", "Medium", and "Low".
    :vartype minimal_risk_level: str or ~azure.mgmt.security.models.MinimalRiskLevel
    :ivar source_type: The source type that will trigger the notification. Required. AttackPath.
    :vartype source_type: str or ~azure.mgmt.security.models.ATTACK_PATH
    """

    minimal_risk_level: Optional[Union[str, "_models.MinimalRiskLevel"]] = rest_field(
        name="minimalRiskLevel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the minimal attach path risk level which will be sent as email notifications. Known
     values are: \"Critical\", \"High\", \"Medium\", and \"Low\"."""
    source_type: Literal[SourceType.ATTACK_PATH] = rest_discriminator(name="sourceType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The source type that will trigger the notification. Required. AttackPath."""

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

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


class OnPremiseResourceDetails(CommonResourceDetails, discriminator="OnPremiseResourceDetails"):
    """Details of the On Premise resource that was assessed.

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

    :ivar workspace_id: Azure resource Id of the workspace the machine is attached to. Required.
    :vartype workspace_id: str
    :ivar vmuuid: The unique Id of the machine. Required.
    :vartype vmuuid: str
    :ivar source_computer_id: The oms agent Id installed on the machine. Required.
    :vartype source_computer_id: str
    :ivar machine_name: The name of the machine. Required.
    :vartype machine_name: str
    :ivar source: Required. On premise resource details.
    :vartype source: str or ~azure.mgmt.security.models.ON_PREMISE_RESOURCE_DETAILS
    """

    __mapping__: dict[str, _Model] = {}
    workspace_id: str = rest_field(name="workspaceId", visibility=["read", "create", "update", "delete", "query"])
    """Azure resource Id of the workspace the machine is attached to. Required."""
    vmuuid: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique Id of the machine. Required."""
    source_computer_id: str = rest_field(
        name="sourceComputerId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The oms agent Id installed on the machine. Required."""
    machine_name: str = rest_field(name="machineName", visibility=["read", "create", "update", "delete", "query"])
    """The name of the machine. Required."""
    source: Literal[Source.ON_PREMISE_RESOURCE_DETAILS] = rest_discriminator(name="source", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. On premise resource details."""

    @overload
    def __init__(
        self,
        *,
        workspace_id: str,
        vmuuid: str,
        source_computer_id: str,
        machine_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)
        self.source = Source.ON_PREMISE_RESOURCE_DETAILS  # type: ignore


class OnPremiseSqlResourceDetails(OnPremiseResourceDetails, discriminator="OnPremiseSql"):
    """Details of the On Premise Sql resource that was assessed.

    :ivar workspace_id: Azure resource Id of the workspace the machine is attached to. Required.
    :vartype workspace_id: str
    :ivar vmuuid: The unique Id of the machine. Required.
    :vartype vmuuid: str
    :ivar source_computer_id: The oms agent Id installed on the machine. Required.
    :vartype source_computer_id: str
    :ivar machine_name: The name of the machine. Required.
    :vartype machine_name: str
    :ivar server_name: The Sql server name installed on the machine. Required.
    :vartype server_name: str
    :ivar database_name: The Sql database name installed on the machine. Required.
    :vartype database_name: str
    :ivar source: The platform where the assessed resource resides. Required. SQL Resource in an on
     premise machine connected to Azure cloud.
    :vartype source: str or ~azure.mgmt.security.models.ON_PREMISE_SQL
    """

    server_name: str = rest_field(name="serverName", visibility=["read", "create", "update", "delete", "query"])
    """The Sql server name installed on the machine. Required."""
    database_name: str = rest_field(name="databaseName", visibility=["read", "create", "update", "delete", "query"])
    """The Sql database name installed on the machine. Required."""
    source: Literal[Source.ON_PREMISE_SQL] = rest_discriminator(name="source", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The platform where the assessed resource resides. Required. SQL Resource in an on premise
     machine connected to Azure cloud."""

    @overload
    def __init__(
        self,
        *,
        workspace_id: str,
        vmuuid: str,
        source_computer_id: str,
        machine_name: str,
        server_name: str,
        database_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)
        self.source = Source.ON_PREMISE_SQL  # type: ignore


class OnUploadFilters(_Model):
    """Optional. Determine which blobs get scanned by On Upload malware scanning. An Or operation is
    performed between each filter type.

    :ivar exclude_blobs_with_prefix: Optional. A list of prefixes to exclude from on-upload malware
     scanning. Format: ``container-name/blob-name`` (start with the container name; do not include
     the storage account name). Exclude entire containers: Use prefix of container names you want to
     exclude without a trailing ``/``. Exclude a single container: Add a trailing slash ``/`` after
     the container name to avoid excluding other containers with similar prefixes.
    :vartype exclude_blobs_with_prefix: list[str]
    :ivar exclude_blobs_with_suffix: Optional. A list of suffixes to exclude from on-upload malware
     scanning. Suffixes match only the end of blob names, and should be used for file extensions or
     blob name endings only.
    :vartype exclude_blobs_with_suffix: list[str]
    :ivar exclude_blobs_larger_than: Optional. Specifies the maximum size in bytes for blobs to be
     scanned. This parameter accepts a single positive integer value. Blobs larger than this value
     will be excluded from scanning.
    :vartype exclude_blobs_larger_than: any
    """

    exclude_blobs_with_prefix: Optional[list[str]] = rest_field(
        name="excludeBlobsWithPrefix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. A list of prefixes to exclude from on-upload malware scanning. Format:
     ``container-name/blob-name`` (start with the container name; do not include the storage account
     name). Exclude entire containers: Use prefix of container names you want to exclude without a
     trailing ``/``. Exclude a single container: Add a trailing slash ``/`` after the container name
     to avoid excluding other containers with similar prefixes."""
    exclude_blobs_with_suffix: Optional[list[str]] = rest_field(
        name="excludeBlobsWithSuffix", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. A list of suffixes to exclude from on-upload malware scanning. Suffixes match only
     the end of blob names, and should be used for file extensions or blob name endings only."""
    exclude_blobs_larger_than: Optional[Any] = rest_field(
        name="excludeBlobsLargerThan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Specifies the maximum size in bytes for blobs to be scanned. This parameter accepts a
     single positive integer value. Blobs larger than this value will be excluded from scanning."""

    @overload
    def __init__(
        self,
        *,
        exclude_blobs_with_prefix: Optional[list[str]] = None,
        exclude_blobs_with_suffix: Optional[list[str]] = None,
        exclude_blobs_larger_than: Optional[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 OnUploadProperties(_Model):
    """Properties of On Upload malware scanning.

    :ivar is_enabled: Indicates whether On Upload malware scanning should be enabled.
    :vartype is_enabled: bool
    :ivar cap_gb_per_month: Defines the max GB to be scanned per Month. Set to -1 if no capping is
     needed. If not specified, the default value is -1.
    :vartype cap_gb_per_month: int
    :ivar filters: Optional. Determine which blobs get scanned by On Upload malware scanning. An Or
     operation is performed between each filter type.
    :vartype filters: ~azure.mgmt.security.models.OnUploadFilters
    """

    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether On Upload malware scanning should be enabled."""
    cap_gb_per_month: Optional[int] = rest_field(
        name="capGBPerMonth", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. If not
     specified, the default value is -1."""
    filters: Optional["_models.OnUploadFilters"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. Determine which blobs get scanned by On Upload malware scanning. An Or operation is
     performed between each filter type."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: Optional[bool] = None,
        cap_gb_per_month: Optional[int] = None,
        filters: Optional["_models.OnUploadFilters"] = None,
    ) -> None: ...

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

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


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

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

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

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

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

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


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

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

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


class OperationResultAutoGenerated(_Model):
    """Long run operation status of governance rule over a given scope.

    :ivar status: The status of the long run operation result of governance rule. Known values are:
     "Succeeded", "Failed", and "Canceled".
    :vartype status: str or ~azure.mgmt.security.models.OperationResult
    """

    status: Optional[Union[str, "_models.OperationResult"]] = rest_field(visibility=["read"])
    """The status of the long run operation result of governance rule. Known values are:
     \"Succeeded\", \"Failed\", and \"Canceled\"."""


class OperationStatus(_Model):
    """A status describing the success/failure of the enablement/disablement operation.

    :ivar code: The operation status code.
    :vartype code: str
    :ivar message: Additional information regarding the success/failure of the operation.
    :vartype message: str
    """

    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The operation status code."""
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Additional information regarding the success/failure of the operation."""

    @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 OperationStatusResult(_Model):
    """The current status of an async operation.

    :ivar id: Fully qualified ID for the async operation.
    :vartype id: str
    :ivar name: Name of the async operation.
    :vartype name: str
    :ivar status: Operation status. Required.
    :vartype status: str
    :ivar percent_complete: Percent of the operation that is complete.
    :vartype percent_complete: float
    :ivar start_time: The start time of the operation.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: The end time of the operation.
    :vartype end_time: ~datetime.datetime
    :ivar operations: The operations list.
    :vartype operations: list[~azure.mgmt.security.models.OperationStatusResult]
    :ivar error: If present, details of the operation error.
    :vartype error: ~azure.mgmt.security.models.ErrorDetail
    :ivar resource_id: Fully qualified ID of the resource against which the original async
     operation was started.
    :vartype resource_id: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Fully qualified ID for the async operation."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the async operation."""
    status: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Operation status. Required."""
    percent_complete: Optional[float] = rest_field(
        name="percentComplete", visibility=["read", "create", "update", "delete", "query"]
    )
    """Percent of the operation that is complete."""
    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The start time of the operation."""
    end_time: Optional[datetime.datetime] = rest_field(
        name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The end time of the operation."""
    operations: Optional[list["_models.OperationStatusResult"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The operations list."""
    error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """If present, details of the operation error."""
    resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"])
    """Fully qualified ID of the resource against which the original async operation was started."""

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

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

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


class PartialAssessmentProperties(_Model):
    """Describes properties of an assessment as related to the standard.

    :ivar assessment_key: The assessment key.
    :vartype assessment_key: str
    """

    assessment_key: Optional[str] = rest_field(
        name="assessmentKey", visibility=["read", "create", "update", "delete", "query"]
    )
    """The assessment key."""

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

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

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


class Pricing(ExtensionResource):
    """Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard
    tier offers advanced security capabilities, while the free tier offers basic security features.

    :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.security.models.SystemData
    :ivar properties: Pricing data.
    :vartype properties: ~azure.mgmt.security.models.PricingProperties
    """

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

    __flattened_items = [
        "pricing_tier",
        "sub_plan",
        "free_trial_remaining_time",
        "enablement_time",
        "enforce",
        "inherited",
        "inherited_from",
        "resources_coverage_status",
        "extensions",
        "deprecated",
        "replaced_by",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 PricingList(_Model):
    """List of pricing configurations response.

    :ivar value: List of pricing configurations. Required.
    :vartype value: list[~azure.mgmt.security.models.Pricing]
    """

    value: list["_models.Pricing"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of pricing configurations. Required."""

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

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

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


class PricingProperties(_Model):
    """Pricing properties for the relevant scope.

    :ivar pricing_tier: Indicates whether the Defender plan is enabled on the selected scope.
     Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard
     tier offers advanced security capabilities, while the free tier offers basic security features.
     Required. Known values are: "Free" and "Standard".
    :vartype pricing_tier: str or ~azure.mgmt.security.models.PricingTier
    :ivar sub_plan: The sub-plan selected for a Standard pricing configuration, when more than one
     sub-plan is available. Each sub-plan enables a set of security features. When not specified,
     full plan is applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for
     resource level only 'P1' sub plan is supported.
    :vartype sub_plan: str
    :ivar free_trial_remaining_time: The duration left for the subscriptions free trial period - in
     ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
    :vartype free_trial_remaining_time: ~datetime.timedelta
    :ivar enablement_time: Optional. If ``pricingTier`` is ``Standard`` then this property holds
     the date of the last time the ``pricingTier`` was set to ``Standard``, when available (e.g
     2023-03-01T12:42:42.1921106Z).
    :vartype enablement_time: ~datetime.datetime
    :ivar enforce: If set to "False", it allows the descendants of this scope to override the
     pricing configuration set on this scope (allows setting inherited="False"). If set to "True",
     it prevents overrides and forces this pricing configuration on all the descendants of this
     scope. This field is only available for subscription-level pricing. Known values are: "False"
     and "True".
    :vartype enforce: str or ~azure.mgmt.security.models.Enforce
    :ivar inherited: "inherited" = "True" indicates that the current scope inherits its pricing
     configuration from its parent. The ID of the parent scope that provides the inherited
     configuration is displayed in the "inheritedFrom" field. On the other hand, "inherited" =
     "False" indicates that the current scope has its own pricing configuration explicitly set, and
     does not inherit from its parent. This field is read only and available only for resource-level
     pricing. Known values are: "True" and "False".
    :vartype inherited: str or ~azure.mgmt.security.models.Inherited
    :ivar inherited_from: The id of the scope inherited from. "Null" if not inherited. This field
     is only available for resource-level pricing.
    :vartype inherited_from: str
    :ivar resources_coverage_status: This field is available for subscription-level only, and
     reflects the coverage status of the resources under the subscription. Please note: The
     "pricingTier" field reflects the plan status of the subscription. However, since the plan
     status can also be defined at the resource level, there might be misalignment between the
     subscription's plan status and the resource status. This field helps indicate the coverage
     status of the resources. Known values are: "FullyCovered", "PartiallyCovered", and
     "NotCovered".
    :vartype resources_coverage_status: str or ~azure.mgmt.security.models.ResourcesCoverageStatus
    :ivar extensions: Optional. List of extensions offered under a plan.
    :vartype extensions: list[~azure.mgmt.security.models.Extension]
    :ivar deprecated: Optional. True if the plan is deprecated. If there are replacing plans they
     will appear in ``replacedBy`` property.
    :vartype deprecated: bool
    :ivar replaced_by: Optional. List of plans that replace this plan. This property exists only if
     this plan is deprecated.
    :vartype replaced_by: list[str]
    """

    pricing_tier: Union[str, "_models.PricingTier"] = rest_field(
        name="pricingTier", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the Defender plan is enabled on the selected scope. Microsoft Defender for
     Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced
     security capabilities, while the free tier offers basic security features. Required. Known
     values are: \"Free\" and \"Standard\"."""
    sub_plan: Optional[str] = rest_field(name="subPlan", visibility=["read", "create", "update", "delete", "query"])
    """The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is
     available. Each sub-plan enables a set of security features. When not specified, full plan is
     applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource
     level only 'P1' sub plan is supported."""
    free_trial_remaining_time: Optional[datetime.timedelta] = rest_field(
        name="freeTrialRemainingTime", visibility=["read"]
    )
    """The duration left for the subscriptions free trial period - in ISO 8601 format (e.g.
     P3Y6M4DT12H30M5S)."""
    enablement_time: Optional[datetime.datetime] = rest_field(
        name="enablementTime", visibility=["read"], format="rfc3339"
    )
    """Optional. If ``pricingTier`` is ``Standard`` then this property holds the date of the last time
     the ``pricingTier`` was set to ``Standard``, when available (e.g 2023-03-01T12:42:42.1921106Z)."""
    enforce: Optional[Union[str, "_models.Enforce"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """If set to \"False\", it allows the descendants of this scope to override the pricing
     configuration set on this scope (allows setting inherited=\"False\"). If set to \"True\", it
     prevents overrides and forces this pricing configuration on all the descendants of this scope.
     This field is only available for subscription-level pricing. Known values are: \"False\" and
     \"True\"."""
    inherited: Optional[Union[str, "_models.Inherited"]] = rest_field(visibility=["read"])
    """\"inherited\" = \"True\" indicates that the current scope inherits its pricing configuration
     from its parent. The ID of the parent scope that provides the inherited configuration is
     displayed in the \"inheritedFrom\" field. On the other hand, \"inherited\" = \"False\"
     indicates that the current scope has its own pricing configuration explicitly set, and does not
     inherit from its parent. This field is read only and available only for resource-level pricing.
     Known values are: \"True\" and \"False\"."""
    inherited_from: Optional[str] = rest_field(name="inheritedFrom", visibility=["read"])
    """The id of the scope inherited from. \"Null\" if not inherited. This field is only available for
     resource-level pricing."""
    resources_coverage_status: Optional[Union[str, "_models.ResourcesCoverageStatus"]] = rest_field(
        name="resourcesCoverageStatus", visibility=["read"]
    )
    """This field is available for subscription-level only, and reflects the coverage status of the
     resources under the subscription. Please note: The \"pricingTier\" field reflects the plan
     status of the subscription. However, since the plan status can also be defined at the resource
     level, there might be misalignment between the subscription's plan status and the resource
     status. This field helps indicate the coverage status of the resources. Known values are:
     \"FullyCovered\", \"PartiallyCovered\", and \"NotCovered\"."""
    extensions: Optional[list["_models.Extension"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional. List of extensions offered under a plan."""
    deprecated: Optional[bool] = rest_field(visibility=["read"])
    """Optional. True if the plan is deprecated. If there are replacing plans they will appear in
     ``replacedBy`` property."""
    replaced_by: Optional[list[str]] = rest_field(name="replacedBy", visibility=["read"])
    """Optional. List of plans that replace this plan. This property exists only if this plan is
     deprecated."""

    @overload
    def __init__(
        self,
        *,
        pricing_tier: Union[str, "_models.PricingTier"],
        sub_plan: Optional[str] = None,
        enforce: Optional[Union[str, "_models.Enforce"]] = None,
        extensions: Optional[list["_models.Extension"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.security.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.security.models.PrivateEndpointConnectionProperties
    """

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

    __flattened_items = ["group_ids", "private_endpoint", "private_link_service_connection_state", "provisioning_state"]

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

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

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

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

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


class PrivateEndpointConnectionProperties(_Model):
    """Properties of the private endpoint connection.

    :ivar group_ids: The group ids for the private endpoint resource.
    :vartype group_ids: list[str]
    :ivar private_endpoint: The private endpoint resource.
    :vartype private_endpoint: ~azure.mgmt.security.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.security.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.security.models.PrivateEndpointConnectionProvisioningState
    """

    group_ids: Optional[list[str]] = rest_field(name="groupIds", visibility=["read"])
    """The group ids for the private endpoint resource."""
    private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field(
        name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"]
    )
    """The 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 PrivateLinkGroupResource(ProxyResource):
    """A private link group resource that describes a grouping for the private link.

    :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.security.models.SystemData
    :ivar properties: Resource properties.
    :vartype properties: ~azure.mgmt.security.models.PrivateLinkResourceProperties
    """

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

    __flattened_items = ["group_id", "required_members", "required_zone_names"]

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

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

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

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

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


class PrivateLinkProperties(_Model):
    """Properties of a private link resource. These properties control the behavior and configuration
    of private endpoint connectivity to Defender services.

    :ivar provisioning_state: The current provisioning state of the private link resource.
     Indicates whether the resource is being created, updated, deleted, or has completed
     successfully. Known values are: "Succeeded", "Creating", "Updating", "Deleting", "Failed",
     "Canceled", and "InProgress".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.ProvisioningState
    :ivar private_endpoint_connections: List of private endpoint connections associated with this
     private link. Each connection represents a private endpoint from a customer's virtual network.
    :vartype private_endpoint_connections:
     list[~azure.mgmt.security.models.PrivateEndpointConnection]
    :ivar private_link_resources: List of private link resources available for connection. For
     Defender services, this typically includes the 'containers' group with 'api' and regional data
     endpoints.
    :vartype private_link_resources: list[~azure.mgmt.security.models.PrivateLinkGroupResource]
    :ivar public_network_access: This determines if traffic is allowed over public network. By
     default it is disabled. Known values are: "Enabled" and "Disabled".
    :vartype public_network_access: str or ~azure.mgmt.security.models.PublicNetworkAccess
    """

    provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
        name="provisioningState", visibility=["read"]
    )
    """The current provisioning state of the private link resource. Indicates whether the resource is
     being created, updated, deleted, or has completed successfully. Known values are:
     \"Succeeded\", \"Creating\", \"Updating\", \"Deleting\", \"Failed\", \"Canceled\", and
     \"InProgress\"."""
    private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field(
        name="privateEndpointConnections", visibility=["read"]
    )
    """List of private endpoint connections associated with this private link. Each connection
     represents a private endpoint from a customer's virtual network."""
    private_link_resources: Optional[list["_models.PrivateLinkGroupResource"]] = rest_field(
        name="privateLinkResources", visibility=["read"]
    )
    """List of private link resources available for connection. For Defender services, this typically
     includes the 'containers' group with 'api' and regional data endpoints."""
    public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(
        name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"]
    )
    """This determines if traffic is allowed over public network. By default it is disabled. Known
     values are: \"Enabled\" and \"Disabled\"."""

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

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

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


class 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.security.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 PrivateLinkResource(TrackedResource):
    """A private link resource that enables secure, private connectivity to Microsoft Defender for
    Cloud services. This resource manages the lifecycle of private endpoint connections and
    provides the necessary infrastructure for private connectivity.

    :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.security.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 specific to the private link resource. Required.
    :vartype properties: ~azure.mgmt.security.models.PrivateLinkProperties
    """

    properties: "_models.PrivateLinkProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties specific to the private link resource. Required."""

    __flattened_items = [
        "provisioning_state",
        "private_endpoint_connections",
        "private_link_resources",
        "public_network_access",
    ]

    @overload
    def __init__(
        self,
        *,
        location: str,
        properties: "_models.PrivateLinkProperties",
        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 PrivateLinkResourceProperties(_Model):
    """Properties of a private link resource.

    :ivar group_id: The private link resource group id.
    :vartype group_id: str
    :ivar required_members: The private link resource required member names.
    :vartype required_members: list[str]
    :ivar required_zone_names: The private link resource private link DNS zone name.
    :vartype required_zone_names: list[str]
    """

    group_id: Optional[str] = rest_field(name="groupId", visibility=["read"])
    """The private link resource group id."""
    required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"])
    """The private link resource required member names."""
    required_zone_names: Optional[list[str]] = rest_field(
        name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """The private link resource private link DNS zone name."""

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

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

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


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

    :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
     of the service. Known values are: "Pending", "Approved", and "Rejected".
    :vartype status: str or ~azure.mgmt.security.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 PrivateLinkUpdate(_Model):
    """Request payload for updating a private link resource. Used in PATCH operations to update
    specific mutable properties without affecting the entire resource configuration.

    :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 QueryCheck(_Model):
    """The rule query details.

    :ivar query: The rule query.
    :vartype query: str
    :ivar expected_result: Expected result.
    :vartype expected_result: list[list[str]]
    :ivar column_names: Column names of expected result.
    :vartype column_names: list[str]
    """

    query: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rule query."""
    expected_result: Optional[list[list[str]]] = rest_field(
        name="expectedResult", visibility=["read", "create", "update", "delete", "query"]
    )
    """Expected result."""
    column_names: Optional[list[str]] = rest_field(
        name="columnNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """Column names of expected result."""

    @overload
    def __init__(
        self,
        *,
        query: Optional[str] = None,
        expected_result: Optional[list[list[str]]] = None,
        column_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 RecommendationConfigurationProperties(_Model):
    """The type of IoT Security recommendation.

    :ivar recommendation_type: The type of IoT Security recommendation. Required. Known values are:
     "IoT_ACRAuthentication", "IoT_AgentSendsUnutilizedMessages", "IoT_Baseline",
     "IoT_EdgeHubMemOptimize", "IoT_EdgeLoggingOptions", "IoT_InconsistentModuleSettings",
     "IoT_InstallAgent", "IoT_IPFilter_DenyAll", "IoT_IPFilter_PermissiveRule", "IoT_OpenPorts",
     "IoT_PermissiveFirewallPolicy", "IoT_PermissiveInputFirewallRules",
     "IoT_PermissiveOutputFirewallRules", "IoT_PrivilegedDockerOptions", "IoT_SharedCredentials",
     and "IoT_VulnerableTLSCipherSuite".
    :vartype recommendation_type: str or ~azure.mgmt.security.models.RecommendationType
    :ivar name:
    :vartype name: str
    :ivar status: Recommendation status. When the recommendation status is disabled recommendations
     are not generated. Required. Known values are: "Disabled" and "Enabled".
    :vartype status: str or ~azure.mgmt.security.models.RecommendationConfigStatus
    """

    recommendation_type: Union[str, "_models.RecommendationType"] = rest_field(
        name="recommendationType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of IoT Security recommendation. Required. Known values are: \"IoT_ACRAuthentication\",
     \"IoT_AgentSendsUnutilizedMessages\", \"IoT_Baseline\", \"IoT_EdgeHubMemOptimize\",
     \"IoT_EdgeLoggingOptions\", \"IoT_InconsistentModuleSettings\", \"IoT_InstallAgent\",
     \"IoT_IPFilter_DenyAll\", \"IoT_IPFilter_PermissiveRule\", \"IoT_OpenPorts\",
     \"IoT_PermissiveFirewallPolicy\", \"IoT_PermissiveInputFirewallRules\",
     \"IoT_PermissiveOutputFirewallRules\", \"IoT_PrivilegedDockerOptions\",
     \"IoT_SharedCredentials\", and \"IoT_VulnerableTLSCipherSuite\"."""
    name: Optional[str] = rest_field(visibility=["read"])
    status: Union[str, "_models.RecommendationConfigStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Recommendation status. When the recommendation status is disabled recommendations are not
     generated. Required. Known values are: \"Disabled\" and \"Enabled\"."""

    @overload
    def __init__(
        self,
        *,
        recommendation_type: Union[str, "_models.RecommendationType"],
        status: Union[str, "_models.RecommendationConfigStatus"],
    ) -> None: ...

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

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


class RegulatoryComplianceAssessment(ProxyResource):
    """Regulatory compliance assessment details and state.

    :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.security.models.SystemData
    :ivar properties: Regulatory compliance assessment data.
    :vartype properties: ~azure.mgmt.security.models.RegulatoryComplianceAssessmentProperties
    """

    properties: Optional["_models.RegulatoryComplianceAssessmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Regulatory compliance assessment data."""

    __flattened_items = [
        "description",
        "assessment_type",
        "assessment_details_link",
        "state",
        "passed_resources",
        "failed_resources",
        "skipped_resources",
        "unsupported_resources",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 RegulatoryComplianceAssessmentProperties(_Model):
    """Regulatory compliance assessment data.

    :ivar description: The description of the regulatory compliance assessment.
    :vartype description: str
    :ivar assessment_type: The expected type of assessment contained in the AssessmentDetailsLink.
    :vartype assessment_type: str
    :ivar assessment_details_link: Link to more detailed assessment results data. The response type
     will be according to the assessmentType field.
    :vartype assessment_details_link: str
    :ivar state: Aggregative state based on the assessment's scanned resources states. Known values
     are: "Passed", "Failed", "Skipped", "Unsupported", "On", and "Off".
    :vartype state: str or ~azure.mgmt.security.models.State
    :ivar passed_resources: The given assessment's related resources count with passed state.
    :vartype passed_resources: int
    :ivar failed_resources: The given assessment's related resources count with failed state.
    :vartype failed_resources: int
    :ivar skipped_resources: The given assessment's related resources count with skipped state.
    :vartype skipped_resources: int
    :ivar unsupported_resources: The given assessment's related resources count with unsupported
     state.
    :vartype unsupported_resources: int
    """

    description: Optional[str] = rest_field(visibility=["read"])
    """The description of the regulatory compliance assessment."""
    assessment_type: Optional[str] = rest_field(name="assessmentType", visibility=["read"])
    """The expected type of assessment contained in the AssessmentDetailsLink."""
    assessment_details_link: Optional[str] = rest_field(name="assessmentDetailsLink", visibility=["read"])
    """Link to more detailed assessment results data. The response type will be according to the
     assessmentType field."""
    state: Optional[Union[str, "_models.State"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Aggregative state based on the assessment's scanned resources states. Known values are:
     \"Passed\", \"Failed\", \"Skipped\", \"Unsupported\", \"On\", and \"Off\"."""
    passed_resources: Optional[int] = rest_field(name="passedResources", visibility=["read"])
    """The given assessment's related resources count with passed state."""
    failed_resources: Optional[int] = rest_field(name="failedResources", visibility=["read"])
    """The given assessment's related resources count with failed state."""
    skipped_resources: Optional[int] = rest_field(name="skippedResources", visibility=["read"])
    """The given assessment's related resources count with skipped state."""
    unsupported_resources: Optional[int] = rest_field(name="unsupportedResources", visibility=["read"])
    """The given assessment's related resources count with unsupported state."""

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

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

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


class RegulatoryComplianceControl(ProxyResource):
    """Regulatory compliance control details and state.

    :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.security.models.SystemData
    :ivar properties: Regulatory compliance control data.
    :vartype properties: ~azure.mgmt.security.models.RegulatoryComplianceControlProperties
    """

    properties: Optional["_models.RegulatoryComplianceControlProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Regulatory compliance control data."""

    __flattened_items = ["description", "state", "passed_assessments", "failed_assessments", "skipped_assessments"]

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

    @overload
    def __init__(self, mapping: Mapping[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 RegulatoryComplianceControlProperties(_Model):
    """Regulatory compliance control data.

    :ivar description: The description of the regulatory compliance control.
    :vartype description: str
    :ivar state: Aggregative state based on the control's supported assessments states. Known
     values are: "Passed", "Failed", "Skipped", "Unsupported", "On", and "Off".
    :vartype state: str or ~azure.mgmt.security.models.State
    :ivar passed_assessments: The number of supported regulatory compliance assessments of the
     given control with a passed state.
    :vartype passed_assessments: int
    :ivar failed_assessments: The number of supported regulatory compliance assessments of the
     given control with a failed state.
    :vartype failed_assessments: int
    :ivar skipped_assessments: The number of supported regulatory compliance assessments of the
     given control with a skipped state.
    :vartype skipped_assessments: int
    """

    description: Optional[str] = rest_field(visibility=["read"])
    """The description of the regulatory compliance control."""
    state: Optional[Union[str, "_models.State"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Aggregative state based on the control's supported assessments states. Known values are:
     \"Passed\", \"Failed\", \"Skipped\", \"Unsupported\", \"On\", and \"Off\"."""
    passed_assessments: Optional[int] = rest_field(name="passedAssessments", visibility=["read"])
    """The number of supported regulatory compliance assessments of the given control with a passed
     state."""
    failed_assessments: Optional[int] = rest_field(name="failedAssessments", visibility=["read"])
    """The number of supported regulatory compliance assessments of the given control with a failed
     state."""
    skipped_assessments: Optional[int] = rest_field(name="skippedAssessments", visibility=["read"])
    """The number of supported regulatory compliance assessments of the given control with a skipped
     state."""

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

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

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


class RegulatoryComplianceStandard(ProxyResource):
    """Regulatory compliance standard details and state.

    :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.security.models.SystemData
    :ivar properties: Regulatory compliance standard data.
    :vartype properties: ~azure.mgmt.security.models.RegulatoryComplianceStandardProperties
    """

    properties: Optional["_models.RegulatoryComplianceStandardProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Regulatory compliance standard data."""

    __flattened_items = ["state", "passed_controls", "failed_controls", "skipped_controls", "unsupported_controls"]

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

    @overload
    def __init__(self, mapping: Mapping[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 RegulatoryComplianceStandardProperties(_Model):
    """Regulatory compliance standard data.

    :ivar state: Aggregative state based on the standard's supported controls states. Known values
     are: "Passed", "Failed", "Skipped", "Unsupported", "On", and "Off".
    :vartype state: str or ~azure.mgmt.security.models.State
    :ivar passed_controls: The number of supported regulatory compliance controls of the given
     standard with a passed state.
    :vartype passed_controls: int
    :ivar failed_controls: The number of supported regulatory compliance controls of the given
     standard with a failed state.
    :vartype failed_controls: int
    :ivar skipped_controls: The number of supported regulatory compliance controls of the given
     standard with a skipped state.
    :vartype skipped_controls: int
    :ivar unsupported_controls: The number of regulatory compliance controls of the given standard
     which are unsupported by automated assessments.
    :vartype unsupported_controls: int
    """

    state: Optional[Union[str, "_models.State"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Aggregative state based on the standard's supported controls states. Known values are:
     \"Passed\", \"Failed\", \"Skipped\", \"Unsupported\", \"On\", and \"Off\"."""
    passed_controls: Optional[int] = rest_field(name="passedControls", visibility=["read"])
    """The number of supported regulatory compliance controls of the given standard with a passed
     state."""
    failed_controls: Optional[int] = rest_field(name="failedControls", visibility=["read"])
    """The number of supported regulatory compliance controls of the given standard with a failed
     state."""
    skipped_controls: Optional[int] = rest_field(name="skippedControls", visibility=["read"])
    """The number of supported regulatory compliance controls of the given standard with a skipped
     state."""
    unsupported_controls: Optional[int] = rest_field(name="unsupportedControls", visibility=["read"])
    """The number of regulatory compliance controls of the given standard which are unsupported by
     automated assessments."""

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

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

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


class Remediation(_Model):
    """Remediation details.

    :ivar description: Remediation description.
    :vartype description: str
    :ivar scripts: Remediation script.
    :vartype scripts: list[str]
    :ivar automated: Is remediation automated.
    :vartype automated: bool
    :ivar portal_link: Optional link to remediate in Azure Portal.
    :vartype portal_link: str
    """

    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Remediation description."""
    scripts: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Remediation script."""
    automated: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is remediation automated."""
    portal_link: Optional[str] = rest_field(
        name="portalLink", visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional link to remediate in Azure Portal."""

    @overload
    def __init__(
        self,
        *,
        description: Optional[str] = None,
        scripts: Optional[list[str]] = None,
        automated: Optional[bool] = None,
        portal_link: Optional[str] = None,
    ) -> None: ...

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

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


class RemediationEta(_Model):
    """The ETA (estimated time of arrival) for remediation.

    :ivar eta: ETA for remediation. Required.
    :vartype eta: ~datetime.datetime
    :ivar justification: Justification for change of Eta. Required.
    :vartype justification: str
    """

    eta: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339")
    """ETA for remediation. Required."""
    justification: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Justification for change of Eta. Required."""

    @overload
    def __init__(
        self,
        *,
        eta: datetime.datetime,
        justification: 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 ResourceDetails(_Model):
    """The resource details of the health report.

    :ivar source: The status of the health report. Known values are: "Azure", "OnPremise",
     "OnPremiseSql", "Aws", "Gcp", and "OnPremiseResourceDetails".
    :vartype source: str or ~azure.mgmt.security.models.Source
    :ivar id: The azure id of the resource.
    :vartype id: str
    :ivar connector_id: The id of the connector.
    :vartype connector_id: str
    """

    source: Optional[Union[str, "_models.Source"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the health report. Known values are: \"Azure\", \"OnPremise\", \"OnPremiseSql\",
     \"Aws\", \"Gcp\", and \"OnPremiseResourceDetails\"."""
    id: Optional[str] = rest_field(visibility=["read"])
    """The azure id of the resource."""
    connector_id: Optional[str] = rest_field(name="connectorId", visibility=["read"])
    """The id of the connector."""

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

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

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


class RuleResults(ExtensionResource):
    """Rule results.

    :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.security.models.SystemData
    :ivar properties: Rule results properties.
    :vartype properties: ~azure.mgmt.security.models.RuleResultsProperties
    """

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

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

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

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


class RuleResultsInput(_Model):
    """Rule results input.

    :ivar latest_scan: Take results from latest scan.
    :vartype latest_scan: bool
    :ivar results: Expected results to be inserted into the baseline. Leave this field empty if
     latestScan == true.
    :vartype results: list[list[str]]
    """

    latest_scan: Optional[bool] = rest_field(
        name="latestScan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Take results from latest scan."""
    results: Optional[list[list[str]]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Expected results to be inserted into the baseline. Leave this field empty if latestScan ==
     true."""

    @overload
    def __init__(
        self,
        *,
        latest_scan: Optional[bool] = None,
        results: Optional[list[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 RuleResultsProperties(_Model):
    """Rule results properties.

    :ivar results: Expected results in the baseline.
    :vartype results: list[list[str]]
    :ivar latest_scan: Take results from latest scan.
    :vartype latest_scan: bool
    """

    results: Optional[list[list[str]]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Expected results in the baseline."""
    latest_scan: Optional[bool] = rest_field(
        name="latestScan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Take results from latest scan."""

    @overload
    def __init__(
        self,
        *,
        results: Optional[list[list[str]]] = None,
        latest_scan: 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 RulesResults(_Model):
    """A list of rules results.

    :ivar value: List of rule results.
    :vartype value: list[~azure.mgmt.security.models.RuleResults]
    :ivar next_link:
    :vartype next_link: str
    """

    value: Optional[list["_models.RuleResults"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of rule results."""
    next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])

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

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

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


class RulesResultsInput(_Model):
    """Rules results input.

    :ivar latest_scan: Take results from latest scan.
    :vartype latest_scan: bool
    :ivar results: Expected results to be inserted into the baseline. Leave this field empty if
     latestScan == true.
    :vartype results: dict[str, list[list[str]]]
    """

    latest_scan: Optional[bool] = rest_field(
        name="latestScan", visibility=["read", "create", "update", "delete", "query"]
    )
    """Take results from latest scan."""
    results: Optional[dict[str, list[list[str]]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Expected results to be inserted into the baseline. Leave this field empty if latestScan ==
     true."""

    @overload
    def __init__(
        self,
        *,
        latest_scan: Optional[bool] = None,
        results: Optional[dict[str, list[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 ScanPropertiesV2(_Model):
    """A vulnerability assessment scan record properties.

    :ivar trigger_type: The scan trigger type. Known values are: "OnDemand" and "Recurring".
    :vartype trigger_type: str or ~azure.mgmt.security.models.ScanTriggerType
    :ivar state: The scan status. Known values are: "Failed", "FailedToRun", "InProgress", and
     "Passed".
    :vartype state: str or ~azure.mgmt.security.models.ScanState
    :ivar server: The server name.
    :vartype server: str
    :ivar database: The database name.
    :vartype database: str
    :ivar sql_version: The SQL version.
    :vartype sql_version: str
    :ivar start_time: The scan start time (UTC).
    :vartype start_time: ~datetime.datetime
    :ivar end_time: Scan results are valid until end time (UTC).
    :vartype end_time: ~datetime.datetime
    :ivar high_severity_failed_rules_count: The number of failed rules with high severity.
    :vartype high_severity_failed_rules_count: int
    :ivar medium_severity_failed_rules_count: The number of failed rules with medium severity.
    :vartype medium_severity_failed_rules_count: int
    :ivar low_severity_failed_rules_count: The number of failed rules with low severity.
    :vartype low_severity_failed_rules_count: int
    :ivar total_passed_rules_count: The number of total passed rules.
    :vartype total_passed_rules_count: int
    :ivar total_failed_rules_count: The number of total failed rules.
    :vartype total_failed_rules_count: int
    :ivar total_rules_count: The number of total rules assessed.
    :vartype total_rules_count: int
    :ivar is_baseline_applied: Baseline created for this database, and has one or more rules.
    :vartype is_baseline_applied: bool
    :ivar last_scan_time: Last scan time.
    :vartype last_scan_time: ~datetime.datetime
    """

    trigger_type: Optional[Union[str, "_models.ScanTriggerType"]] = rest_field(
        name="triggerType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scan trigger type. Known values are: \"OnDemand\" and \"Recurring\"."""
    state: Optional[Union[str, "_models.ScanState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The scan status. Known values are: \"Failed\", \"FailedToRun\", \"InProgress\", and \"Passed\"."""
    server: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The server name."""
    database: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The database name."""
    sql_version: Optional[str] = rest_field(
        name="sqlVersion", visibility=["read", "create", "update", "delete", "query"]
    )
    """The SQL version."""
    start_time: Optional[datetime.datetime] = rest_field(
        name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """The scan start time (UTC)."""
    end_time: Optional[datetime.datetime] = rest_field(
        name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Scan results are valid until end time (UTC)."""
    high_severity_failed_rules_count: Optional[int] = rest_field(
        name="highSeverityFailedRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed rules with high severity."""
    medium_severity_failed_rules_count: Optional[int] = rest_field(
        name="mediumSeverityFailedRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed rules with medium severity."""
    low_severity_failed_rules_count: Optional[int] = rest_field(
        name="lowSeverityFailedRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of failed rules with low severity."""
    total_passed_rules_count: Optional[int] = rest_field(
        name="totalPassedRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of total passed rules."""
    total_failed_rules_count: Optional[int] = rest_field(
        name="totalFailedRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of total failed rules."""
    total_rules_count: Optional[int] = rest_field(
        name="totalRulesCount", visibility=["read", "create", "update", "delete", "query"]
    )
    """The number of total rules assessed."""
    is_baseline_applied: Optional[bool] = rest_field(
        name="isBaselineApplied", visibility=["read", "create", "update", "delete", "query"]
    )
    """Baseline created for this database, and has one or more rules."""
    last_scan_time: Optional[datetime.datetime] = rest_field(
        name="lastScanTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Last scan time."""

    @overload
    def __init__(
        self,
        *,
        trigger_type: Optional[Union[str, "_models.ScanTriggerType"]] = None,
        state: Optional[Union[str, "_models.ScanState"]] = None,
        server: Optional[str] = None,
        database: Optional[str] = None,
        sql_version: Optional[str] = None,
        start_time: Optional[datetime.datetime] = None,
        end_time: Optional[datetime.datetime] = None,
        high_severity_failed_rules_count: Optional[int] = None,
        medium_severity_failed_rules_count: Optional[int] = None,
        low_severity_failed_rules_count: Optional[int] = None,
        total_passed_rules_count: Optional[int] = None,
        total_failed_rules_count: Optional[int] = None,
        total_rules_count: Optional[int] = None,
        is_baseline_applied: Optional[bool] = None,
        last_scan_time: 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 ScanResult(ExtensionResource):
    """A vulnerability assessment scan result for a single rule.

    :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.security.models.SystemData
    :ivar properties: A vulnerability assessment scan result properties for a single rule.
    :vartype properties: ~azure.mgmt.security.models.ScanResultProperties
    """

    properties: Optional["_models.ScanResultProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A vulnerability assessment scan result properties for a single rule."""

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

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

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


class ScanResultProperties(_Model):
    """A vulnerability assessment scan result properties for a single rule.

    :ivar rule_id: The rule Id.
    :vartype rule_id: str
    :ivar status: The rule result status. Known values are: "NonFinding", "Finding",
     "InternalError", and "NotApplicable".
    :vartype status: str or ~azure.mgmt.security.models.RuleStatus
    :ivar is_trimmed: Indicates whether the results specified here are trimmed.
    :vartype is_trimmed: bool
    :ivar query_results: The results of the query that was run.
    :vartype query_results: list[list[str]]
    :ivar remediation: Remediation details.
    :vartype remediation: ~azure.mgmt.security.models.Remediation
    :ivar baseline_adjusted_result: The rule result adjusted with baseline.
    :vartype baseline_adjusted_result: ~azure.mgmt.security.models.BaselineAdjustedResult
    :ivar rule_metadata: vulnerability assessment rule metadata details.
    :vartype rule_metadata: ~azure.mgmt.security.models.VaRule
    """

    rule_id: Optional[str] = rest_field(name="ruleId", visibility=["read", "create", "update", "delete", "query"])
    """The rule Id."""
    status: Optional[Union[str, "_models.RuleStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule result status. Known values are: \"NonFinding\", \"Finding\", \"InternalError\", and
     \"NotApplicable\"."""
    is_trimmed: Optional[bool] = rest_field(
        name="isTrimmed", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the results specified here are trimmed."""
    query_results: Optional[list[list[str]]] = rest_field(
        name="queryResults", visibility=["read", "create", "update", "delete", "query"]
    )
    """The results of the query that was run."""
    remediation: Optional["_models.Remediation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Remediation details."""
    baseline_adjusted_result: Optional["_models.BaselineAdjustedResult"] = rest_field(
        name="baselineAdjustedResult", visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule result adjusted with baseline."""
    rule_metadata: Optional["_models.VaRule"] = rest_field(
        name="ruleMetadata", visibility=["read", "create", "update", "delete", "query"]
    )
    """vulnerability assessment rule metadata details."""

    @overload
    def __init__(
        self,
        *,
        rule_id: Optional[str] = None,
        status: Optional[Union[str, "_models.RuleStatus"]] = None,
        is_trimmed: Optional[bool] = None,
        query_results: Optional[list[list[str]]] = None,
        remediation: Optional["_models.Remediation"] = None,
        baseline_adjusted_result: Optional["_models.BaselineAdjustedResult"] = None,
        rule_metadata: Optional["_models.VaRule"] = None,
    ) -> None: ...

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

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


class ScanSummary(_Model):
    """A summary of the scan results.

    :ivar blobs: A summary of the scan results of the blobs that were scanned.
    :vartype blobs: ~azure.mgmt.security.models.BlobsScanSummary
    :ivar files: A summary of the scan results of the files that were scanned.
    :vartype files: ~azure.mgmt.security.models.FilesScanSummary
    :ivar estimated_scan_cost_usd: The estimated cost of the scan. Only available for a scan which
     has terminated.
    :vartype estimated_scan_cost_usd: float
    """

    blobs: Optional["_models.BlobsScanSummary"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A summary of the scan results of the blobs that were scanned."""
    files: Optional["_models.FilesScanSummary"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A summary of the scan results of the files that were scanned."""
    estimated_scan_cost_usd: Optional[float] = rest_field(
        name="estimatedScanCostUSD", visibility=["read", "create", "update", "delete", "query"]
    )
    """The estimated cost of the scan. Only available for a scan which has terminated."""

    @overload
    def __init__(
        self,
        *,
        blobs: Optional["_models.BlobsScanSummary"] = None,
        files: Optional["_models.FilesScanSummary"] = None,
        estimated_scan_cost_usd: 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 ScanV2(ExtensionResource):
    """A vulnerability assessment scan record.

    :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.security.models.SystemData
    :ivar properties: A vulnerability assessment scan record properties.
    :vartype properties: ~azure.mgmt.security.models.ScanPropertiesV2
    """

    properties: Optional["_models.ScanPropertiesV2"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A vulnerability assessment scan record properties."""

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

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

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


class ScopeElement(_Model):
    """A more specific scope used to identify the alerts to suppress.

    :ivar field: The alert entity type to suppress by.
    :vartype field: str
    """

    field: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The alert entity type to suppress by."""

    @overload
    def __init__(
        self,
        *,
        field: 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 ScoreDetails(_Model):
    """Calculation result data.

    :ivar max: Maximum score available.
    :vartype max: int
    :ivar current: Current score.
    :vartype current: float
    :ivar percentage: Ratio of the current score divided by the maximum. Rounded to 4 digits after
     the decimal point.
    :vartype percentage: float
    """

    max: Optional[int] = rest_field(visibility=["read"])
    """Maximum score available."""
    current: Optional[float] = rest_field(visibility=["read"])
    """Current score."""
    percentage: Optional[float] = rest_field(visibility=["read"])
    """Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point."""


class SecureScoreControlDefinitionItem(Resource):
    """Information about the security control.

    :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.security.models.SystemData
    :ivar properties: Security Control Definition Properties.
    :vartype properties: ~azure.mgmt.security.models.SecureScoreControlDefinitionItemProperties
    """

    properties: Optional["_models.SecureScoreControlDefinitionItemProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security Control Definition Properties."""

    __flattened_items = ["display_name", "description", "max_score", "source", "assessment_definitions"]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecureScoreControlDefinitionItemProperties(_Model):  # pylint: disable=name-too-long
    """Security Control Definition Properties.

    :ivar display_name: User friendly display name of the control.
    :vartype display_name: str
    :ivar description: User friendly description of the control.
    :vartype description: str
    :ivar max_score: Maximum control score (0..10).
    :vartype max_score: int
    :ivar source: Source object from which the control was created.
    :vartype source: ~azure.mgmt.security.models.SecureScoreControlDefinitionSource
    :ivar assessment_definitions: Array of assessments metadata IDs that are included in this
     security control.
    :vartype assessment_definitions: list[~azure.mgmt.security.models.AzureResourceLink]
    """

    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """User friendly display name of the control."""
    description: Optional[str] = rest_field(visibility=["read"])
    """User friendly description of the control."""
    max_score: Optional[int] = rest_field(name="maxScore", visibility=["read"])
    """Maximum control score (0..10)."""
    source: Optional["_models.SecureScoreControlDefinitionSource"] = rest_field(visibility=["read"])
    """Source object from which the control was created."""
    assessment_definitions: Optional[list["_models.AzureResourceLink"]] = rest_field(
        name="assessmentDefinitions", visibility=["read"]
    )
    """Array of assessments metadata IDs that are included in this security control."""


class SecureScoreControlDefinitionSource(_Model):
    """The type of the security control (For example, BuiltIn).

    :ivar source_type: The type of security control (for example, BuiltIn). Known values are:
     "BuiltIn" and "Custom".
    :vartype source_type: str or ~azure.mgmt.security.models.ControlType
    """

    source_type: Optional[Union[str, "_models.ControlType"]] = rest_field(
        name="sourceType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of security control (for example, BuiltIn). Known values are: \"BuiltIn\" and
     \"Custom\"."""

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

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

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


class SecureScoreControlDetails(Resource):
    """Details of the security control, its score, and the health status of the relevant resources.

    :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.security.models.SystemData
    :ivar properties: Calculation result data in control level.
    :vartype properties: ~azure.mgmt.security.models.SecureScoreControlScoreDetails
    """

    properties: Optional["_models.SecureScoreControlScoreDetails"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Calculation result data in control level."""

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

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

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


class SecureScoreControlScoreDetails(_Model):
    """Calculation result data in control level.

    :ivar display_name: User friendly display name of the control.
    :vartype display_name: str
    :ivar score: Actual score object for the control.
    :vartype score: ~azure.mgmt.security.models.ScoreDetails
    :ivar healthy_resource_count: Number of healthy resources in the control.
    :vartype healthy_resource_count: int
    :ivar unhealthy_resource_count: Number of unhealthy resources in the control.
    :vartype unhealthy_resource_count: int
    :ivar not_applicable_resource_count: Number of not applicable resources in the control.
    :vartype not_applicable_resource_count: int
    :ivar weight: The relative weight for this specific control in each of your subscriptions. Used
     when calculating an aggregated score for this control across all of your subscriptions.
    :vartype weight: int
    :ivar definition: Information about the security control.
    :vartype definition: ~azure.mgmt.security.models.SecureScoreControlDefinitionItem
    """

    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """User friendly display name of the control."""
    score: Optional["_models.ScoreDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Actual score object for the control."""
    healthy_resource_count: Optional[int] = rest_field(name="healthyResourceCount", visibility=["read"])
    """Number of healthy resources in the control."""
    unhealthy_resource_count: Optional[int] = rest_field(name="unhealthyResourceCount", visibility=["read"])
    """Number of unhealthy resources in the control."""
    not_applicable_resource_count: Optional[int] = rest_field(name="notApplicableResourceCount", visibility=["read"])
    """Number of not applicable resources in the control."""
    weight: Optional[int] = rest_field(visibility=["read"])
    """The relative weight for this specific control in each of your subscriptions. Used when
     calculating an aggregated score for this control across all of your subscriptions."""
    definition: Optional["_models.SecureScoreControlDefinitionItem"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Information about the security control."""

    __flattened_items = ["max", "current", "percentage"]

    @overload
    def __init__(
        self,
        *,
        score: Optional["_models.ScoreDetails"] = None,
        definition: Optional["_models.SecureScoreControlDefinitionItem"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[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.score is None:
                return None
            return getattr(self.score, 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.score is None:
                self.score = self._attr_to_rest_field["score"]._class_type()
            setattr(self.score, key, value)
        else:
            super().__setattr__(key, value)


class SecureScoreItem(ProxyResource):
    """Secure score item data model.

    :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.security.models.SystemData
    :ivar properties: Secure score item.
    :vartype properties: ~azure.mgmt.security.models.SecureScoreItemProperties
    """

    properties: Optional["_models.SecureScoreItemProperties"] = rest_field(visibility=["read"])
    """Secure score item."""


class SecureScoreItemProperties(_Model):
    """Describes properties of a calculated secure score.

    :ivar display_name: The initiative's name.
    :vartype display_name: str
    :ivar score: score object.
    :vartype score: ~azure.mgmt.security.models.ScoreDetails
    :ivar weight: The relative weight for each subscription. Used when calculating an aggregated
     secure score for multiple subscriptions.
    :vartype weight: int
    """

    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """The initiative's name."""
    score: Optional["_models.ScoreDetails"] = rest_field(visibility=["read"])
    """score object."""
    weight: Optional[int] = rest_field(visibility=["read"])
    """The relative weight for each subscription. Used when calculating an aggregated secure score for
     multiple subscriptions."""

    __flattened_items = ["max", "current", "percentage"]


class SecurityAssessment(Resource):
    """Security assessment on a resource.

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

    properties: Optional["_models.SecurityAssessmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of an assessment."""

    __flattened_items = [
        "risk",
        "resource_details",
        "display_name",
        "additional_data",
        "links",
        "metadata",
        "partners_data",
        "status",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityAssessmentMetadataPartnerData(_Model):
    """Describes the partner that created the assessment.

    :ivar partner_name: Name of the company of the partner. Required.
    :vartype partner_name: str
    :ivar product_name: Name of the product of the partner that created the assessment.
    :vartype product_name: str
    :ivar secret: Secret to authenticate the partner and verify it created the assessment - write
     only. Required.
    :vartype secret: str
    """

    partner_name: str = rest_field(name="partnerName", visibility=["read", "create", "update", "delete", "query"])
    """Name of the company of the partner. Required."""
    product_name: Optional[str] = rest_field(
        name="productName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Name of the product of the partner that created the assessment."""
    secret: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Secret to authenticate the partner and verify it created the assessment - write only. Required."""

    @overload
    def __init__(
        self,
        *,
        partner_name: str,
        secret: str,
        product_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 SecurityAssessmentMetadataProperties(_Model):
    """Describes properties of an assessment metadata.

    :ivar display_name: User friendly display name of the assessment. Required.
    :vartype display_name: str
    :ivar policy_definition_id: Azure resource ID of the policy definition that turns this
     assessment calculation on.
    :vartype policy_definition_id: str
    :ivar description: Human readable description of the assessment.
    :vartype description: str
    :ivar remediation_description: Human readable description of what you should do to mitigate
     this security issue.
    :vartype remediation_description: str
    :ivar categories:
    :vartype categories: list[str or ~azure.mgmt.security.models.Categories]
    :ivar severity: The severity level of the assessment. Required. Known values are: "Low",
     "Medium", "High", and "Critical".
    :vartype severity: str or ~azure.mgmt.security.models.Severity
    :ivar user_impact: The user impact of the assessment. Known values are: "Low", "Moderate", and
     "High".
    :vartype user_impact: str or ~azure.mgmt.security.models.UserImpact
    :ivar implementation_effort: The implementation effort required to remediate this assessment.
     Known values are: "Low", "Moderate", and "High".
    :vartype implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort
    :ivar threats:
    :vartype threats: list[str or ~azure.mgmt.security.models.Threats]
    :ivar preview: True if this assessment is in preview release status.
    :vartype preview: bool
    :ivar assessment_type: BuiltIn if the assessment based on built-in Azure Policy definition,
     Custom if the assessment based on custom Azure Policy definition. Required. Known values are:
     "Unknown", "BuiltIn", "Custom", "CustomPolicy", "CustomerManaged", "BuiltInPolicy",
     "VerifiedPartner", "ManualBuiltInPolicy", "ManualBuiltIn", "ManualCustomPolicy", and
     "DynamicBuiltIn".
    :vartype assessment_type: str or ~azure.mgmt.security.models.AssessmentType
    :ivar partner_data: Describes the partner that created the assessment.
    :vartype partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData
    """

    display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"])
    """User friendly display name of the assessment. Required."""
    policy_definition_id: Optional[str] = rest_field(name="policyDefinitionId", visibility=["read"])
    """Azure resource ID of the policy definition that turns this assessment calculation on."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Human readable description of the assessment."""
    remediation_description: Optional[str] = rest_field(
        name="remediationDescription", visibility=["read", "create", "update", "delete", "query"]
    )
    """Human readable description of what you should do to mitigate this security issue."""
    categories: Optional[list[Union[str, "_models.Categories"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    severity: Union[str, "_models.Severity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The severity level of the assessment. Required. Known values are: \"Low\", \"Medium\",
     \"High\", and \"Critical\"."""
    user_impact: Optional[Union[str, "_models.UserImpact"]] = rest_field(
        name="userImpact", visibility=["read", "create", "update", "delete", "query"]
    )
    """The user impact of the assessment. Known values are: \"Low\", \"Moderate\", and \"High\"."""
    implementation_effort: Optional[Union[str, "_models.ImplementationEffort"]] = rest_field(
        name="implementationEffort", visibility=["read", "create", "update", "delete", "query"]
    )
    """The implementation effort required to remediate this assessment. Known values are: \"Low\",
     \"Moderate\", and \"High\"."""
    threats: Optional[list[Union[str, "_models.Threats"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    preview: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """True if this assessment is in preview release status."""
    assessment_type: Union[str, "_models.AssessmentType"] = rest_field(
        name="assessmentType", visibility=["read", "create", "update", "delete", "query"]
    )
    """BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment
     based on custom Azure Policy definition. Required. Known values are: \"Unknown\", \"BuiltIn\",
     \"Custom\", \"CustomPolicy\", \"CustomerManaged\", \"BuiltInPolicy\", \"VerifiedPartner\",
     \"ManualBuiltInPolicy\", \"ManualBuiltIn\", \"ManualCustomPolicy\", and \"DynamicBuiltIn\"."""
    partner_data: Optional["_models.SecurityAssessmentMetadataPartnerData"] = rest_field(
        name="partnerData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes the partner that created the assessment."""

    @overload
    def __init__(
        self,
        *,
        display_name: str,
        severity: Union[str, "_models.Severity"],
        assessment_type: Union[str, "_models.AssessmentType"],
        description: Optional[str] = None,
        remediation_description: Optional[str] = None,
        categories: Optional[list[Union[str, "_models.Categories"]]] = None,
        user_impact: Optional[Union[str, "_models.UserImpact"]] = None,
        implementation_effort: Optional[Union[str, "_models.ImplementationEffort"]] = None,
        threats: Optional[list[Union[str, "_models.Threats"]]] = None,
        preview: Optional[bool] = None,
        partner_data: Optional["_models.SecurityAssessmentMetadataPartnerData"] = None,
    ) -> None: ...

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

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


class SecurityAssessmentMetadataPropertiesResponse(
    SecurityAssessmentMetadataProperties
):  # pylint: disable=name-too-long
    """Describes properties of an assessment metadata response.

    :ivar display_name: User friendly display name of the assessment. Required.
    :vartype display_name: str
    :ivar policy_definition_id: Azure resource ID of the policy definition that turns this
     assessment calculation on.
    :vartype policy_definition_id: str
    :ivar description: Human readable description of the assessment.
    :vartype description: str
    :ivar remediation_description: Human readable description of what you should do to mitigate
     this security issue.
    :vartype remediation_description: str
    :ivar categories:
    :vartype categories: list[str or ~azure.mgmt.security.models.Categories]
    :ivar severity: The severity level of the assessment. Required. Known values are: "Low",
     "Medium", "High", and "Critical".
    :vartype severity: str or ~azure.mgmt.security.models.Severity
    :ivar user_impact: The user impact of the assessment. Known values are: "Low", "Moderate", and
     "High".
    :vartype user_impact: str or ~azure.mgmt.security.models.UserImpact
    :ivar implementation_effort: The implementation effort required to remediate this assessment.
     Known values are: "Low", "Moderate", and "High".
    :vartype implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort
    :ivar threats:
    :vartype threats: list[str or ~azure.mgmt.security.models.Threats]
    :ivar preview: True if this assessment is in preview release status.
    :vartype preview: bool
    :ivar assessment_type: BuiltIn if the assessment based on built-in Azure Policy definition,
     Custom if the assessment based on custom Azure Policy definition. Required. Known values are:
     "Unknown", "BuiltIn", "Custom", "CustomPolicy", "CustomerManaged", "BuiltInPolicy",
     "VerifiedPartner", "ManualBuiltInPolicy", "ManualBuiltIn", "ManualCustomPolicy", and
     "DynamicBuiltIn".
    :vartype assessment_type: str or ~azure.mgmt.security.models.AssessmentType
    :ivar partner_data: Describes the partner that created the assessment.
    :vartype partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData
    :ivar publish_dates:
    :vartype publish_dates:
     ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates
    :ivar planned_deprecation_date:
    :vartype planned_deprecation_date: str
    :ivar tactics:
    :vartype tactics: list[str or ~azure.mgmt.security.models.Tactics]
    :ivar techniques:
    :vartype techniques: list[str or ~azure.mgmt.security.models.Techniques]
    """

    publish_dates: Optional["_models.SecurityAssessmentMetadataPropertiesResponsePublishDates"] = rest_field(
        name="publishDates", visibility=["read", "create", "update", "delete", "query"]
    )
    planned_deprecation_date: Optional[str] = rest_field(
        name="plannedDeprecationDate", visibility=["read", "create", "update", "delete", "query"]
    )
    tactics: Optional[list[Union[str, "_models.Tactics"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    techniques: Optional[list[Union[str, "_models.Techniques"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        display_name: str,
        severity: Union[str, "_models.Severity"],
        assessment_type: Union[str, "_models.AssessmentType"],
        description: Optional[str] = None,
        remediation_description: Optional[str] = None,
        categories: Optional[list[Union[str, "_models.Categories"]]] = None,
        user_impact: Optional[Union[str, "_models.UserImpact"]] = None,
        implementation_effort: Optional[Union[str, "_models.ImplementationEffort"]] = None,
        threats: Optional[list[Union[str, "_models.Threats"]]] = None,
        preview: Optional[bool] = None,
        partner_data: Optional["_models.SecurityAssessmentMetadataPartnerData"] = None,
        publish_dates: Optional["_models.SecurityAssessmentMetadataPropertiesResponsePublishDates"] = None,
        planned_deprecation_date: Optional[str] = None,
        tactics: Optional[list[Union[str, "_models.Tactics"]]] = None,
        techniques: Optional[list[Union[str, "_models.Techniques"]]] = None,
    ) -> None: ...

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

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


class SecurityAssessmentMetadataPropertiesResponsePublishDates(_Model):  # pylint: disable=name-too-long
    """SecurityAssessmentMetadataPropertiesResponsePublishDates.

    :ivar ga:
    :vartype ga: str
    :ivar public: Required.
    :vartype public: str
    """

    ga: Optional[str] = rest_field(name="GA", visibility=["read", "create", "update", "delete", "query"])
    public: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        public: str,
        ga: 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 SecurityAssessmentMetadataResponse(ProxyResource):
    """Security assessment metadata response.

    :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.security.models.SystemData
    :ivar properties: Describes properties of an assessment metadata response.
    :vartype properties: ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponse
    """

    properties: Optional["_models.SecurityAssessmentMetadataPropertiesResponse"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of an assessment metadata response."""

    __flattened_items = [
        "display_name",
        "policy_definition_id",
        "description",
        "remediation_description",
        "categories",
        "severity",
        "user_impact",
        "implementation_effort",
        "threats",
        "preview",
        "assessment_type",
        "partner_data",
        "publish_dates",
        "planned_deprecation_date",
        "tactics",
        "techniques",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityAssessmentPartnerData(_Model):
    """Data regarding 3rd party partner integration.

    :ivar partner_name: Name of the company of the partner. Required.
    :vartype partner_name: str
    :ivar secret: secret to authenticate the partner - write only. Required.
    :vartype secret: str
    """

    partner_name: str = rest_field(name="partnerName", visibility=["read", "create", "update", "delete", "query"])
    """Name of the company of the partner. Required."""
    secret: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """secret to authenticate the partner - write only. Required."""

    @overload
    def __init__(
        self,
        *,
        partner_name: str,
        secret: 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 SecurityAssessmentPropertiesBase(_Model):
    """Describes properties of an assessment.

    :ivar risk: External model of risk result.
    :vartype risk: ~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRisk
    :ivar resource_details: Details of the resource that was assessed. Required.
    :vartype resource_details: ~azure.mgmt.security.models.CommonResourceDetails
    :ivar display_name: User friendly display name of the assessment.
    :vartype display_name: str
    :ivar additional_data: Additional data regarding the assessment.
    :vartype additional_data: dict[str, str]
    :ivar links: Links relevant to the assessment.
    :vartype links: ~azure.mgmt.security.models.AssessmentLinks
    :ivar metadata: Describes properties of an assessment metadata.
    :vartype metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties
    :ivar partners_data: Data regarding 3rd party partner integration.
    :vartype partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData
    """

    risk: Optional["_models.SecurityAssessmentPropertiesBaseRisk"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """External model of risk result."""
    resource_details: "_models.CommonResourceDetails" = rest_field(
        name="resourceDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details of the resource that was assessed. Required."""
    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """User friendly display name of the assessment."""
    additional_data: Optional[dict[str, str]] = rest_field(
        name="additionalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional data regarding the assessment."""
    links: Optional["_models.AssessmentLinks"] = rest_field(visibility=["read"])
    """Links relevant to the assessment."""
    metadata: Optional["_models.SecurityAssessmentMetadataProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of an assessment metadata."""
    partners_data: Optional["_models.SecurityAssessmentPartnerData"] = rest_field(
        name="partnersData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Data regarding 3rd party partner integration."""

    @overload
    def __init__(
        self,
        *,
        resource_details: "_models.CommonResourceDetails",
        risk: Optional["_models.SecurityAssessmentPropertiesBaseRisk"] = None,
        additional_data: Optional[dict[str, str]] = None,
        metadata: Optional["_models.SecurityAssessmentMetadataProperties"] = None,
        partners_data: Optional["_models.SecurityAssessmentPartnerData"] = None,
    ) -> None: ...

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

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


class SecurityAssessmentProperties(SecurityAssessmentPropertiesBase):
    """Describes properties of an assessment.

    :ivar risk: External model of risk result.
    :vartype risk: ~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRisk
    :ivar resource_details: Details of the resource that was assessed. Required.
    :vartype resource_details: ~azure.mgmt.security.models.CommonResourceDetails
    :ivar display_name: User friendly display name of the assessment.
    :vartype display_name: str
    :ivar additional_data: Additional data regarding the assessment.
    :vartype additional_data: dict[str, str]
    :ivar links: Links relevant to the assessment.
    :vartype links: ~azure.mgmt.security.models.AssessmentLinks
    :ivar metadata: Describes properties of an assessment metadata.
    :vartype metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties
    :ivar partners_data: Data regarding 3rd party partner integration.
    :vartype partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData
    :ivar status: The result of the assessment. Required.
    :vartype status: ~azure.mgmt.security.models.AssessmentStatus
    """

    status: "_models.AssessmentStatus" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The result of the assessment. Required."""

    @overload
    def __init__(
        self,
        *,
        resource_details: "_models.CommonResourceDetails",
        status: "_models.AssessmentStatus",
        risk: Optional["_models.SecurityAssessmentPropertiesBaseRisk"] = None,
        additional_data: Optional[dict[str, str]] = None,
        metadata: Optional["_models.SecurityAssessmentMetadataProperties"] = None,
        partners_data: Optional["_models.SecurityAssessmentPartnerData"] = None,
    ) -> None: ...

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

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


class SecurityAssessmentPropertiesBaseRisk(_Model):
    """External model of risk result.

    :ivar risk_factors: The factors of the risk adding base factor.
    :vartype risk_factors: list[str]
    :ivar level: The risk level. Known values are: "None", "Low", "Medium", "High", and "Critical".
    :vartype level: str or ~azure.mgmt.security.models.RiskLevel
    :ivar attack_paths_references: The attack paths references of the risk.
    :vartype attack_paths_references: list[str]
    :ivar paths:
    :vartype paths: list[~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRiskPathsItem]
    :ivar is_contextual_risk: Indicates if the risk is contextual or static.
    :vartype is_contextual_risk: bool
    """

    risk_factors: Optional[list[str]] = rest_field(
        name="riskFactors", visibility=["read", "create", "update", "delete", "query"]
    )
    """The factors of the risk adding base factor."""
    level: Optional[Union[str, "_models.RiskLevel"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The risk level. Known values are: \"None\", \"Low\", \"Medium\", \"High\", and \"Critical\"."""
    attack_paths_references: Optional[list[str]] = rest_field(
        name="attackPathsReferences", visibility=["read", "create", "update", "delete", "query"]
    )
    """The attack paths references of the risk."""
    paths: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    is_contextual_risk: Optional[bool] = rest_field(
        name="isContextualRisk", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates if the risk is contextual or static."""

    @overload
    def __init__(
        self,
        *,
        risk_factors: Optional[list[str]] = None,
        level: Optional[Union[str, "_models.RiskLevel"]] = None,
        attack_paths_references: Optional[list[str]] = None,
        paths: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItem"]] = None,
        is_contextual_risk: 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 SecurityAssessmentPropertiesBaseRiskPathsItem(_Model):  # pylint: disable=name-too-long
    """SecurityAssessmentPropertiesBaseRiskPathsItem.

    :ivar id: Unique identifier for the path.
    :vartype id: str
    :ivar nodes:
    :vartype nodes:
     list[~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRiskPathsItemNodesItem]
    :ivar edges: Connections between nodes.
    :vartype edges:
     list[~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRiskPathsItemEdgeItem]
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique identifier for the path."""
    nodes: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItemNodesItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    edges: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItemEdgeItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Connections between nodes."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        nodes: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItemNodesItem"]] = None,
        edges: Optional[list["_models.SecurityAssessmentPropertiesBaseRiskPathsItemEdgeItem"]] = None,
    ) -> None: ...

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

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


class SecurityAssessmentPropertiesBaseRiskPathsItemEdgeItem(_Model):  # pylint: disable=name-too-long
    """SecurityAssessmentPropertiesBaseRiskPathsItemEdgeItem.

    :ivar id: Edge identifier. Required.
    :vartype id: str
    :ivar target_id: Target node identifier. Required.
    :vartype target_id: str
    :ivar source_id: Source node identifier. Required.
    :vartype source_id: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Edge identifier. Required."""
    target_id: str = rest_field(name="targetId", visibility=["read", "create", "update", "delete", "query"])
    """Target node identifier. Required."""
    source_id: str = rest_field(name="sourceId", visibility=["read", "create", "update", "delete", "query"])
    """Source node identifier. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        target_id: str,
        source_id: 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 SecurityAssessmentPropertiesBaseRiskPathsItemNodesItem(_Model):  # pylint: disable=name-too-long
    """SecurityAssessmentPropertiesBaseRiskPathsItemNodesItem.

    :ivar id: Node identifier.
    :vartype id: str
    :ivar node_properties_label: Properties associated with the node.
    :vartype node_properties_label: list[str]
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Node identifier."""
    node_properties_label: Optional[list[str]] = rest_field(
        name="nodePropertiesLabel", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties associated with the node."""

    @overload
    def __init__(
        self,
        *,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        node_properties_label: 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 SecurityAssessmentPropertiesResponse(SecurityAssessmentPropertiesBase):
    """Describes properties of an assessment.

    :ivar risk: External model of risk result.
    :vartype risk: ~azure.mgmt.security.models.SecurityAssessmentPropertiesBaseRisk
    :ivar resource_details: Details of the resource that was assessed. Required.
    :vartype resource_details: ~azure.mgmt.security.models.CommonResourceDetails
    :ivar display_name: User friendly display name of the assessment.
    :vartype display_name: str
    :ivar additional_data: Additional data regarding the assessment.
    :vartype additional_data: dict[str, str]
    :ivar links: Links relevant to the assessment.
    :vartype links: ~azure.mgmt.security.models.AssessmentLinks
    :ivar metadata: Describes properties of an assessment metadata.
    :vartype metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties
    :ivar partners_data: Data regarding 3rd party partner integration.
    :vartype partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData
    :ivar status: The result of the assessment. Required.
    :vartype status: ~azure.mgmt.security.models.AssessmentStatusResponse
    """

    status: "_models.AssessmentStatusResponse" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The result of the assessment. Required."""

    @overload
    def __init__(
        self,
        *,
        resource_details: "_models.CommonResourceDetails",
        status: "_models.AssessmentStatusResponse",
        risk: Optional["_models.SecurityAssessmentPropertiesBaseRisk"] = None,
        additional_data: Optional[dict[str, str]] = None,
        metadata: Optional["_models.SecurityAssessmentMetadataProperties"] = None,
        partners_data: Optional["_models.SecurityAssessmentPartnerData"] = None,
    ) -> None: ...

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

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


class SecurityAssessmentResponse(ExtensionResource):
    """Security assessment on a resource - response format.

    :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.security.models.SystemData
    :ivar properties: Describes properties of an assessment.
    :vartype properties: ~azure.mgmt.security.models.SecurityAssessmentPropertiesResponse
    """

    properties: Optional["_models.SecurityAssessmentPropertiesResponse"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of an assessment."""

    __flattened_items = [
        "risk",
        "resource_details",
        "display_name",
        "additional_data",
        "links",
        "metadata",
        "partners_data",
        "status",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityConnector(ProxyResource):
    """The security connector 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.security.models.SystemData
    :ivar properties: Security connector data.
    :vartype properties: ~azure.mgmt.security.models.SecurityConnectorProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar kind: Kind of the resource.
    :vartype kind: str
    :ivar etag: Entity tag is used for comparing two or more entities from the same requested
     resource.
    :vartype etag: str
    """

    properties: Optional["_models.SecurityConnectorProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security connector data."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the resource."""
    etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Entity tag is used for comparing two or more entities from the same requested resource."""

    __flattened_items = [
        "hierarchy_identifier",
        "hierarchy_identifier_trial_end_date",
        "environment_name",
        "offerings",
        "environment_data",
    ]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.SecurityConnectorProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        location: Optional[str] = None,
        kind: Optional[str] = None,
        etag: 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 SecurityConnectorProperties(_Model):
    """A set of properties that defines the security connector configuration.

    :ivar hierarchy_identifier: The multi cloud resource identifier (account id in case of AWS
     connector, project number in case of GCP connector).
    :vartype hierarchy_identifier: str
    :ivar hierarchy_identifier_trial_end_date: The date on which the trial period will end, if
     applicable. Trial period exists for 30 days after upgrading to payed offerings.
    :vartype hierarchy_identifier_trial_end_date: ~datetime.datetime
    :ivar environment_name: The multi cloud resource's cloud name. Known values are: "Azure",
     "AWS", "GCP", "Github", "AzureDevOps", "GitLab", "DockerHub", and "JFrog".
    :vartype environment_name: str or ~azure.mgmt.security.models.CloudName
    :ivar offerings: A collection of offerings for the security connector.
    :vartype offerings: list[~azure.mgmt.security.models.CloudOffering]
    :ivar environment_data: The security connector environment data.
    :vartype environment_data: ~azure.mgmt.security.models.EnvironmentData
    """

    hierarchy_identifier: Optional[str] = rest_field(
        name="hierarchyIdentifier", visibility=["read", "create", "update", "delete", "query"]
    )
    """The multi cloud resource identifier (account id in case of AWS connector, project number in
     case of GCP connector)."""
    hierarchy_identifier_trial_end_date: Optional[datetime.datetime] = rest_field(
        name="hierarchyIdentifierTrialEndDate", visibility=["read"], format="rfc3339"
    )
    """The date on which the trial period will end, if applicable. Trial period exists for 30 days
     after upgrading to payed offerings."""
    environment_name: Optional[Union[str, "_models.CloudName"]] = rest_field(
        name="environmentName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The multi cloud resource's cloud name. Known values are: \"Azure\", \"AWS\", \"GCP\",
     \"Github\", \"AzureDevOps\", \"GitLab\", \"DockerHub\", and \"JFrog\"."""
    offerings: Optional[list["_models.CloudOffering"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of offerings for the security connector."""
    environment_data: Optional["_models.EnvironmentData"] = rest_field(
        name="environmentData", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security connector environment data."""

    @overload
    def __init__(
        self,
        *,
        hierarchy_identifier: Optional[str] = None,
        environment_name: Optional[Union[str, "_models.CloudName"]] = None,
        offerings: Optional[list["_models.CloudOffering"]] = None,
        environment_data: Optional["_models.EnvironmentData"] = None,
    ) -> None: ...

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

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


class SecurityContact(ProxyResource):
    """Contact details and configurations for notifications coming from Microsoft Defender for Cloud.

    :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.security.models.SystemData
    :ivar properties: Security contact data.
    :vartype properties: ~azure.mgmt.security.models.SecurityContactProperties
    """

    properties: Optional["_models.SecurityContactProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security contact data."""

    __flattened_items = ["emails", "phone", "is_enabled", "notifications_sources", "notifications_by_role"]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityContactProperties(_Model):
    """Describes security contact properties.

    :ivar emails: List of email addresses which will get notifications from Microsoft Defender for
     Cloud by the configurations defined in this security contact.
    :vartype emails: str
    :ivar phone: The security contact's phone number.
    :vartype phone: str
    :ivar is_enabled: Indicates whether the security contact is enabled.
    :vartype is_enabled: bool
    :ivar notifications_sources: A collection of sources types which evaluate the email
     notification.
    :vartype notifications_sources: list[~azure.mgmt.security.models.NotificationsSource]
    :ivar notifications_by_role: Defines whether to send email notifications from Microsoft
     Defender for Cloud to persons with specific RBAC roles on the subscription.
    :vartype notifications_by_role:
     ~azure.mgmt.security.models.SecurityContactPropertiesNotificationsByRole
    """

    emails: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of email addresses which will get notifications from Microsoft Defender for Cloud by the
     configurations defined in this security contact."""
    phone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security contact's phone number."""
    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether the security contact is enabled."""
    notifications_sources: Optional[list["_models.NotificationsSource"]] = rest_field(
        name="notificationsSources", visibility=["read", "create", "update", "delete", "query"]
    )
    """A collection of sources types which evaluate the email notification."""
    notifications_by_role: Optional["_models.SecurityContactPropertiesNotificationsByRole"] = rest_field(
        name="notificationsByRole", visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether to send email notifications from Microsoft Defender for Cloud to persons with
     specific RBAC roles on the subscription."""

    @overload
    def __init__(
        self,
        *,
        emails: Optional[str] = None,
        phone: Optional[str] = None,
        is_enabled: Optional[bool] = None,
        notifications_sources: Optional[list["_models.NotificationsSource"]] = None,
        notifications_by_role: Optional["_models.SecurityContactPropertiesNotificationsByRole"] = None,
    ) -> None: ...

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

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


class SecurityContactPropertiesNotificationsByRole(_Model):  # pylint: disable=name-too-long
    """Defines whether to send email notifications from Microsoft Defender for Cloud to persons with
    specific RBAC roles on the subscription.

    :ivar state: Defines whether to send email notifications from AMicrosoft Defender for Cloud to
     persons with specific RBAC roles on the subscription. Known values are: "Passed", "Failed",
     "Skipped", "Unsupported", "On", and "Off".
    :vartype state: str or ~azure.mgmt.security.models.State
    :ivar roles: Defines which RBAC roles will get email notifications from Microsoft Defender for
     Cloud. List of allowed RBAC roles:.
    :vartype roles: list[str or ~azure.mgmt.security.models.SecurityContactRole]
    """

    state: Optional[Union[str, "_models.State"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with
     specific RBAC roles on the subscription. Known values are: \"Passed\", \"Failed\", \"Skipped\",
     \"Unsupported\", \"On\", and \"Off\"."""
    roles: Optional[list[Union[str, "_models.SecurityContactRole"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List
     of allowed RBAC roles:."""

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

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

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


class SecurityOperator(ProxyResource):
    """Security operator under a given subscription and pricing.

    :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.security.models.SystemData
    :ivar identity: Identity for the resource.
    :vartype identity: ~azure.mgmt.security.models.Identity
    """

    identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Identity for the resource."""

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

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

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


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

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

    properties: Optional["_models.SecuritySolutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    location: str = rest_field(visibility=["read"])
    """Location where the resource is stored. Required."""

    __flattened_items = ["security_family", "provisioning_state", "template", "protection_status"]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecuritySolutionProperties(_Model):
    """SecuritySolutionProperties.

    :ivar security_family: The security family of the security solution. Required. Known values
     are: "Waf", "Ngfw", "SaasWaf", and "Va".
    :vartype security_family: str or ~azure.mgmt.security.models.SecurityFamily
    :ivar provisioning_state: The security family provisioning State. Required. Known values are:
     "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Canceled", and "InProgress".
    :vartype provisioning_state: str or ~azure.mgmt.security.models.ProvisioningState
    :ivar template: The security solutions' template. Required.
    :vartype template: str
    :ivar protection_status: The security solutions' status. Required.
    :vartype protection_status: str
    """

    security_family: Union[str, "_models.SecurityFamily"] = rest_field(
        name="securityFamily", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security family of the security solution. Required. Known values are: \"Waf\", \"Ngfw\",
     \"SaasWaf\", and \"Va\"."""
    provisioning_state: Union[str, "_models.ProvisioningState"] = rest_field(
        name="provisioningState", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security family provisioning State. Required. Known values are: \"Succeeded\",
     \"Creating\", \"Updating\", \"Deleting\", \"Failed\", \"Canceled\", and \"InProgress\"."""
    template: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' template. Required."""
    protection_status: str = rest_field(
        name="protectionStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security solutions' status. Required."""

    @overload
    def __init__(
        self,
        *,
        security_family: Union[str, "_models.SecurityFamily"],
        provisioning_state: Union[str, "_models.ProvisioningState"],
        template: str,
        protection_status: 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 SecuritySolutionsReferenceData(_Model):
    """SecuritySolutionsReferenceData.

    :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.security.models.SystemData
    :ivar location: Location where the resource is stored.
    :vartype location: str
    :ivar properties: Required.
    :vartype properties: ~azure.mgmt.security.models.SecuritySolutionsReferenceDataProperties
    """

    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."""
    location: Optional[str] = rest_field(visibility=["read"])
    """Location where the resource is stored."""
    properties: "_models.SecuritySolutionsReferenceDataProperties" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""

    __flattened_items = [
        "security_family",
        "alert_vendor_name",
        "package_info_url",
        "product_name",
        "publisher",
        "publisher_display_name",
        "template",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecuritySolutionsReferenceDataList(_Model):
    """SecuritySolutionsReferenceDataList.

    :ivar value:
    :vartype value: list[~azure.mgmt.security.models.SecuritySolutionsReferenceData]
    """

    value: Optional[list["_models.SecuritySolutionsReferenceData"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class SecuritySolutionsReferenceDataProperties(_Model):
    """SecuritySolutionsReferenceDataProperties.

    :ivar security_family: The security family of the security solution. Required. Known values
     are: "Waf", "Ngfw", "SaasWaf", and "Va".
    :vartype security_family: str or ~azure.mgmt.security.models.SecurityFamily
    :ivar alert_vendor_name: The security solutions' vendor name. Required.
    :vartype alert_vendor_name: str
    :ivar package_info_url: The security solutions' package info url. Required.
    :vartype package_info_url: str
    :ivar product_name: The security solutions' product name. Required.
    :vartype product_name: str
    :ivar publisher: The security solutions' publisher. Required.
    :vartype publisher: str
    :ivar publisher_display_name: The security solutions' publisher display name. Required.
    :vartype publisher_display_name: str
    :ivar template: The security solutions' template. Required.
    :vartype template: str
    """

    security_family: Union[str, "_models.SecurityFamily"] = rest_field(
        name="securityFamily", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security family of the security solution. Required. Known values are: \"Waf\", \"Ngfw\",
     \"SaasWaf\", and \"Va\"."""
    alert_vendor_name: str = rest_field(
        name="alertVendorName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security solutions' vendor name. Required."""
    package_info_url: str = rest_field(
        name="packageInfoUrl", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security solutions' package info url. Required."""
    product_name: str = rest_field(name="productName", visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' product name. Required."""
    publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' publisher. Required."""
    publisher_display_name: str = rest_field(
        name="publisherDisplayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The security solutions' publisher display name. Required."""
    template: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The security solutions' template. Required."""

    @overload
    def __init__(
        self,
        *,
        security_family: Union[str, "_models.SecurityFamily"],
        alert_vendor_name: str,
        package_info_url: str,
        product_name: str,
        publisher: str,
        publisher_display_name: str,
        template: 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 SecurityStandard(ExtensionResource):
    """Security Standard on a resource.

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

    properties: Optional["_models.SecurityStandardProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a security standard."""

    __flattened_items = [
        "display_name",
        "standard_type",
        "description",
        "assessments",
        "cloud_providers",
        "policy_set_definition_id",
        "metadata",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityStandardProperties(_Model):
    """Describes properties of a standard.

    :ivar display_name: Display name of the standard, equivalent to the standardId.
    :vartype display_name: str
    :ivar standard_type: Standard type (Custom or Default or Compliance only currently). Known
     values are: "Custom", "Default", and "Compliance".
    :vartype standard_type: str or ~azure.mgmt.security.models.StandardType
    :ivar description: Description of the standard.
    :vartype description: str
    :ivar assessments: List of assessment keys to apply to standard scope.
    :vartype assessments: list[~azure.mgmt.security.models.PartialAssessmentProperties]
    :ivar cloud_providers: List of all standard supported clouds.
    :vartype cloud_providers: list[str or ~azure.mgmt.security.models.StandardSupportedCloud]
    :ivar policy_set_definition_id: The policy set definition id associated with the standard.
    :vartype policy_set_definition_id: str
    :ivar metadata: The security standard metadata.
    :vartype metadata: ~azure.mgmt.security.models.StandardMetadata
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Display name of the standard, equivalent to the standardId."""
    standard_type: Optional[Union[str, "_models.StandardType"]] = rest_field(name="standardType", visibility=["read"])
    """Standard type (Custom or Default or Compliance only currently). Known values are: \"Custom\",
     \"Default\", and \"Compliance\"."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the standard."""
    assessments: Optional[list["_models.PartialAssessmentProperties"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of assessment keys to apply to standard scope."""
    cloud_providers: Optional[list[Union[str, "_models.StandardSupportedCloud"]]] = rest_field(
        name="cloudProviders", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of all standard supported clouds."""
    policy_set_definition_id: Optional[str] = rest_field(
        name="policySetDefinitionId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The policy set definition id associated with the standard."""
    metadata: Optional["_models.StandardMetadata"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The security standard metadata."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        assessments: Optional[list["_models.PartialAssessmentProperties"]] = None,
        cloud_providers: Optional[list[Union[str, "_models.StandardSupportedCloud"]]] = None,
        policy_set_definition_id: Optional[str] = None,
        metadata: Optional["_models.StandardMetadata"] = None,
    ) -> None: ...

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

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


class SecuritySubAssessment(ExtensionResource):
    """Security sub-assessment on a resource.

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

    properties: Optional["_models.SecuritySubAssessmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of an sub-assessment."""

    __flattened_items = [
        "id",
        "display_name",
        "status",
        "remediation",
        "impact",
        "category",
        "description",
        "time_generated",
        "resource_details",
        "additional_data",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecuritySubAssessmentProperties(_Model):
    """Describes properties of an sub-assessment.

    :ivar id: Vulnerability ID.
    :vartype id: str
    :ivar display_name: User friendly display name of the sub-assessment.
    :vartype display_name: str
    :ivar status: Status of the sub-assessment.
    :vartype status: ~azure.mgmt.security.models.SubAssessmentStatus
    :ivar remediation: Information on how to remediate this sub-assessment.
    :vartype remediation: str
    :ivar impact: Description of the impact of this sub-assessment.
    :vartype impact: str
    :ivar category: Category of the sub-assessment.
    :vartype category: str
    :ivar description: Human readable description of the assessment status.
    :vartype description: str
    :ivar time_generated: The date and time the sub-assessment was generated.
    :vartype time_generated: ~datetime.datetime
    :ivar resource_details: Details of the resource that was assessed.
    :vartype resource_details: ~azure.mgmt.security.models.CommonResourceDetails
    :ivar additional_data: Details of the sub-assessment.
    :vartype additional_data: ~azure.mgmt.security.models.AdditionalData
    """

    id: Optional[str] = rest_field(visibility=["read"])
    """Vulnerability ID."""
    display_name: Optional[str] = rest_field(name="displayName", visibility=["read"])
    """User friendly display name of the sub-assessment."""
    status: Optional["_models.SubAssessmentStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status of the sub-assessment."""
    remediation: Optional[str] = rest_field(visibility=["read"])
    """Information on how to remediate this sub-assessment."""
    impact: Optional[str] = rest_field(visibility=["read"])
    """Description of the impact of this sub-assessment."""
    category: Optional[str] = rest_field(visibility=["read"])
    """Category of the sub-assessment."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Human readable description of the assessment status."""
    time_generated: Optional[datetime.datetime] = rest_field(
        name="timeGenerated", visibility=["read"], format="rfc3339"
    )
    """The date and time the sub-assessment was generated."""
    resource_details: Optional["_models.CommonResourceDetails"] = rest_field(
        name="resourceDetails", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details of the resource that was assessed."""
    additional_data: Optional["_models.AdditionalData"] = rest_field(
        name="additionalData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Details of the sub-assessment."""

    @overload
    def __init__(
        self,
        *,
        status: Optional["_models.SubAssessmentStatus"] = None,
        resource_details: Optional["_models.CommonResourceDetails"] = None,
        additional_data: Optional["_models.AdditionalData"] = None,
    ) -> None: ...

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

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


class SecurityTask(ProxyResource):
    """Security task that we recommend to do in order to strengthen security.

    :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.security.models.SystemData
    :ivar properties: Describes properties of a task.
    :vartype properties: ~azure.mgmt.security.models.SecurityTaskProperties
    """

    properties: Optional["_models.SecurityTaskProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Describes properties of a task."""

    __flattened_items = [
        "state",
        "creation_time_utc",
        "security_task_parameters",
        "last_state_change_time_utc",
        "sub_state",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 SecurityTaskParameters(_Model):
    """Changing set of properties, depending on the task type that is derived from the name field.

    :ivar name: Name of the task type.
    :vartype name: str
    """

    name: Optional[str] = rest_field(visibility=["read"])
    """Name of the task type."""


class SecurityTaskProperties(_Model):
    """Describes properties of a task.

    :ivar state: State of the task (Active, Resolved etc.).
    :vartype state: str
    :ivar creation_time_utc: The time this task was discovered in UTC.
    :vartype creation_time_utc: ~datetime.datetime
    :ivar security_task_parameters: Changing set of properties, depending on the task type that is
     derived from the name field.
    :vartype security_task_parameters: ~azure.mgmt.security.models.SecurityTaskParameters
    :ivar last_state_change_time_utc: The time this task's details were last changed in UTC.
    :vartype last_state_change_time_utc: ~datetime.datetime
    :ivar sub_state: Additional data on the state of the task.
    :vartype sub_state: str
    """

    state: Optional[str] = rest_field(visibility=["read"])
    """State of the task (Active, Resolved etc.)."""
    creation_time_utc: Optional[datetime.datetime] = rest_field(
        name="creationTimeUtc", visibility=["read"], format="rfc3339"
    )
    """The time this task was discovered in UTC."""
    security_task_parameters: Optional["_models.SecurityTaskParameters"] = rest_field(
        name="securityTaskParameters", visibility=["read", "create", "update", "delete", "query"]
    )
    """Changing set of properties, depending on the task type that is derived from the name field."""
    last_state_change_time_utc: Optional[datetime.datetime] = rest_field(
        name="lastStateChangeTimeUtc", visibility=["read"], format="rfc3339"
    )
    """The time this task's details were last changed in UTC."""
    sub_state: Optional[str] = rest_field(name="subState", visibility=["read"])
    """Additional data on the state of the task."""

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

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

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


class SensitiveDataDiscoveryProperties(_Model):
    """Properties of Sensitive Data Discovery.

    :ivar is_enabled: Indicates whether Sensitive Data Discovery should be enabled.
    :vartype is_enabled: bool
    :ivar operation_status: Upon failure or partial success. Additional data describing Sensitive
     Data Discovery enable/disable operation.
    :vartype operation_status: ~azure.mgmt.security.models.OperationStatus
    """

    is_enabled: Optional[bool] = rest_field(
        name="isEnabled", visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates whether Sensitive Data Discovery should be enabled."""
    operation_status: Optional["_models.OperationStatus"] = rest_field(name="operationStatus", visibility=["read"])
    """Upon failure or partial success. Additional data describing Sensitive Data Discovery
     enable/disable operation."""

    @overload
    def __init__(
        self,
        *,
        is_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 SensitivityLabel(_Model):
    """The sensitivity label.

    :ivar display_name: The name of the sensitivity label.
    :vartype display_name: str
    :ivar description: The description of the sensitivity label.
    :vartype description: str
    :ivar rank: The rank of the sensitivity label. Known values are: "None", "Low", "Medium",
     "High", and "Critical".
    :vartype rank: str or ~azure.mgmt.security.models.Rank
    :ivar order: The order of the sensitivity label.
    :vartype order: int
    :ivar enabled: Indicates whether the label is enabled or not.
    :vartype enabled: bool
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """The name of the sensitivity label."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the sensitivity label."""
    rank: Optional[Union[str, "_models.Rank"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rank of the sensitivity label. Known values are: \"None\", \"Low\", \"Medium\", \"High\",
     and \"Critical\"."""
    order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The order of the sensitivity label."""
    enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether the label is enabled or not."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        rank: Optional[Union[str, "_models.Rank"]] = None,
        order: Optional[int] = None,
        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 ServerVulnerabilityAssessment(ProxyResource):
    """Describes the server vulnerability assessment details on a resource.

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

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

    __flattened_items = ["provisioning_state"]

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

    @overload
    def __init__(self, mapping: Mapping[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 ServerVulnerabilityAssessmentProperties(_Model):
    """describes ServerVulnerabilityAssessment properties.

    :ivar provisioning_state: The provisioningState of the vulnerability assessment capability on
     the VM. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", and
     "Deprovisioning".
    :vartype provisioning_state: str or
     ~azure.mgmt.security.models.ServerVulnerabilityAssessmentPropertiesProvisioningState
    """

    provisioning_state: Optional[Union[str, "_models.ServerVulnerabilityAssessmentPropertiesProvisioningState"]] = (
        rest_field(name="provisioningState", visibility=["read"])
    )
    """The provisioningState of the vulnerability assessment capability on the VM. Known values are:
     \"Succeeded\", \"Failed\", \"Canceled\", \"Provisioning\", and \"Deprovisioning\"."""


class ServerVulnerabilityAssessmentsAzureSettingProperties(_Model):  # pylint: disable=name-too-long
    """Describes the vulnerability assessments setting properties on Azure servers in the defined
    scope.

    :ivar selected_provider: The selected vulnerability assessments provider on Azure servers in
     the defined scope. Required. "MdeTvm"
    :vartype selected_provider: str or
     ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider
    """

    selected_provider: Union[str, "_models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider"] = rest_field(
        name="selectedProvider", visibility=["read", "create", "update", "delete", "query"]
    )
    """The selected vulnerability assessments provider on Azure servers in the defined scope.
     Required. \"MdeTvm\""""

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

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

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


class ServerVulnerabilityAssessmentsList(_Model):
    """List of server vulnerability assessments.

    :ivar value:
    :vartype value: list[~azure.mgmt.security.models.ServerVulnerabilityAssessment]
    """

    value: Optional[list["_models.ServerVulnerabilityAssessment"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

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

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

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


class ServerVulnerabilityProperties(AdditionalData, discriminator="ServerVulnerabilityAssessment"):
    """Additional context fields for server vulnerability assessment.

    :ivar type: Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information
     Gathered.
    :vartype type: str
    :ivar cvss: Dictionary from cvss version to cvss details object.
    :vartype cvss: dict[str, ~azure.mgmt.security.models.CVSS]
    :ivar patchable: Indicates whether a patch is available or not.
    :vartype patchable: bool
    :ivar cve: List of CVEs.
    :vartype cve: list[~azure.mgmt.security.models.CVE]
    :ivar threat: Threat name.
    :vartype threat: str
    :ivar published_time: Published time.
    :vartype published_time: ~datetime.datetime
    :ivar vendor_references:
    :vartype vendor_references: list[~azure.mgmt.security.models.VendorReference]
    :ivar assessed_resource_type: Sub-assessment resource type. Required.
     ServerVulnerabilityAssessment.
    :vartype assessed_resource_type: str or
     ~azure.mgmt.security.models.SERVER_VULNERABILITY_ASSESSMENT
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered."""
    cvss: Optional[dict[str, "_models.CVSS"]] = rest_field(visibility=["read"])
    """Dictionary from cvss version to cvss details object."""
    patchable: Optional[bool] = rest_field(visibility=["read"])
    """Indicates whether a patch is available or not."""
    cve: Optional[list["_models.CVE"]] = rest_field(visibility=["read"])
    """List of CVEs."""
    threat: Optional[str] = rest_field(visibility=["read"])
    """Threat name."""
    published_time: Optional[datetime.datetime] = rest_field(
        name="publishedTime", visibility=["read"], format="rfc3339"
    )
    """Published time."""
    vendor_references: Optional[list["_models.VendorReference"]] = rest_field(
        name="vendorReferences", visibility=["read"]
    )
    assessed_resource_type: Literal[AssessedResourceType.SERVER_VULNERABILITY_ASSESSMENT] = rest_discriminator(name="assessedResourceType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Sub-assessment resource type. Required. ServerVulnerabilityAssessment."""

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

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

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


class SqlServerVulnerabilityProperties(AdditionalData, discriminator="SqlServerVulnerability"):
    """Details of the resource that was assessed.

    :ivar type: The resource type the sub assessment refers to in its resource details.
    :vartype type: str
    :ivar query: The T-SQL query that runs on your SQL database to perform the particular check.
    :vartype query: str
    :ivar assessed_resource_type: Sub-assessment resource type. Required. SqlServerVulnerability.
    :vartype assessed_resource_type: str or ~azure.mgmt.security.models.SQL_SERVER_VULNERABILITY
    """

    type: Optional[str] = rest_field(visibility=["read"])
    """The resource type the sub assessment refers to in its resource details."""
    query: Optional[str] = rest_field(visibility=["read"])
    """The T-SQL query that runs on your SQL database to perform the particular check."""
    assessed_resource_type: Literal[AssessedResourceType.SQL_SERVER_VULNERABILITY] = rest_discriminator(name="assessedResourceType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Sub-assessment resource type. Required. SqlServerVulnerability."""

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

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

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


class SqlVulnerabilityAssessmentScanOperationResult(Resource):  # pylint: disable=name-too-long
    """Represents the result of a SQL Vulnerability Assessment scan operation, wrapped in the ARM
    resource envelope.

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

    properties: Optional["_models.SqlVulnerabilityAssessmentScanOperationResultProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Represents the properties of a SQL Vulnerability Assessment scan operation result."""

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

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

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


class SqlVulnerabilityAssessmentScanOperationResultProperties(_Model):  # pylint: disable=name-too-long
    """Represents the properties of a SQL Vulnerability Assessment scan operation result.

    :ivar operation_id: Gets or sets the operation id.
    :vartype operation_id: str
    :ivar scan_status: The scan operation status. Known values are: "Passed", "Failed",
     "FailedToRun", and "InProgress".
    :vartype scan_status: str or ~azure.mgmt.security.models.ScanOperationStatus
    """

    operation_id: Optional[str] = rest_field(
        name="operationId", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets the operation id."""
    scan_status: Optional[Union[str, "_models.ScanOperationStatus"]] = rest_field(
        name="scanStatus", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scan operation status. Known values are: \"Passed\", \"Failed\", \"FailedToRun\", and
     \"InProgress\"."""

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

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

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


class SqlVulnerabilityAssessmentSettings(ExtensionResource):
    """SQL Vulnerability Assessment settings 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.security.models.SystemData
    :ivar properties: SQL Vulnerability Assessment settings properties.
    :vartype properties: ~azure.mgmt.security.models.SqlVulnerabilityAssessmentSettingsProperties
    """

    properties: Optional["_models.SqlVulnerabilityAssessmentSettingsProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """SQL Vulnerability Assessment settings properties."""

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

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

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


class SqlVulnerabilityAssessmentSettingsProperties(_Model):  # pylint: disable=name-too-long
    """SQL Vulnerability Assessment settings properties.

    :ivar creation_time: The creation time of the SQL Vulnerability Assessment settings.
    :vartype creation_time: ~datetime.datetime
    :ivar state: Represents the state of a SQL Vulnerability Assessment. Known values are:
     "Enabled" and "Disabled".
    :vartype state: str or ~azure.mgmt.security.models.SqlVulnerabilityAssessmentState
    """

    creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", visibility=["read"], format="rfc3339")
    """The creation time of the SQL Vulnerability Assessment settings."""
    state: Optional[Union[str, "_models.SqlVulnerabilityAssessmentState"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Represents the state of a SQL Vulnerability Assessment. Known values are: \"Enabled\" and
     \"Disabled\"."""

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

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

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


class Standard(ProxyResource):
    """Security Standard on a resource.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
     information.
    :vartype system_data: ~azure.mgmt.security.models.SystemData
    :ivar properties: Properties of a security standard.
    :vartype properties: ~azure.mgmt.security.models.StandardProperties
    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar location: The geo-location where the resource lives.
    :vartype location: str
    :ivar kind: Kind of the resource.
    :vartype kind: str
    :ivar etag: Entity tag is used for comparing two or more entities from the same requested
     resource.
    :vartype etag: str
    """

    properties: Optional["_models.StandardProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a security standard."""
    tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Resource tags."""
    location: Optional[str] = rest_field(visibility=["read", "create"])
    """The geo-location where the resource lives."""
    kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Kind of the resource."""
    etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Entity tag is used for comparing two or more entities from the same requested resource."""

    __flattened_items = ["display_name", "standard_type", "description", "category", "components", "supported_clouds"]

    @overload
    def __init__(
        self,
        *,
        properties: Optional["_models.StandardProperties"] = None,
        tags: Optional[dict[str, str]] = None,
        location: Optional[str] = None,
        kind: Optional[str] = None,
        etag: 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 StandardAssignment(ExtensionResource):
    """Security Assignment on a resource group over a given scope.

    :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.security.models.SystemData
    :ivar properties: Properties of a standard assignments assignment.
    :vartype properties: ~azure.mgmt.security.models.StandardAssignmentProperties
    """

    properties: Optional["_models.StandardAssignmentProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of a standard assignments assignment."""

    __flattened_items = [
        "display_name",
        "description",
        "assigned_standard",
        "effect",
        "excluded_scopes",
        "expires_on",
        "exemption_data",
        "attestation_data",
        "metadata",
    ]

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

    @overload
    def __init__(self, mapping: Mapping[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 StandardAssignmentMetadata(_Model):
    """The standard assignment metadata.

    :ivar created_by: Standard assignment Created by object id (GUID).
    :vartype created_by: str
    :ivar created_on: Standard assignment creation date.
    :vartype created_on: ~datetime.datetime
    :ivar last_updated_by: Standard assignment last updated by object id (GUID).
    :vartype last_updated_by: str
    :ivar last_updated_on: Standard assignment last update date.
    :vartype last_updated_on: ~datetime.datetime
    """

    created_by: Optional[str] = rest_field(name="createdBy", visibility=["read"])
    """Standard assignment Created by object id (GUID)."""
    created_on: Optional[datetime.datetime] = rest_field(name="createdOn", visibility=["read"], format="rfc3339")
    """Standard assignment creation date."""
    last_updated_by: Optional[str] = rest_field(name="lastUpdatedBy", visibility=["read"])
    """Standard assignment last updated by object id (GUID)."""
    last_updated_on: Optional[datetime.datetime] = rest_field(
        name="lastUpdatedOn", visibility=["read"], format="rfc3339"
    )
    """Standard assignment last update date."""


class StandardAssignmentProperties(_Model):
    """Describes the properties of a standardAssignment.

    :ivar display_name: Display name of the standardAssignment.
    :vartype display_name: str
    :ivar description: Description of the standardAssignment.
    :vartype description: str
    :ivar assigned_standard: Standard item with key as applied to this standard assignment over the
     given scope.
    :vartype assigned_standard: ~azure.mgmt.security.models.AssignedStandardItem
    :ivar effect: Expected effect of this assignment (Audit/Exempt/Attest). Known values are:
     "Audit", "Exempt", and "Attest".
    :vartype effect: str or ~azure.mgmt.security.models.Effect
    :ivar excluded_scopes: Excluded scopes, filter out the descendants of the scope (on management
     scopes).
    :vartype excluded_scopes: list[str]
    :ivar expires_on: Expiration date of this assignment as a full ISO date.
    :vartype expires_on: ~datetime.datetime
    :ivar exemption_data: Additional data about assignment that has Exempt effect.
    :vartype exemption_data: ~azure.mgmt.security.models.StandardAssignmentPropertiesExemptionData
    :ivar attestation_data: Additional data about assignment that has Attest effect.
    :vartype attestation_data:
     ~azure.mgmt.security.models.StandardAssignmentPropertiesAttestationData
    :ivar metadata: The standard assignment metadata.
    :vartype metadata: ~azure.mgmt.security.models.StandardAssignmentMetadata
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """Display name of the standardAssignment."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Description of the standardAssignment."""
    assigned_standard: Optional["_models.AssignedStandardItem"] = rest_field(
        name="assignedStandard", visibility=["read", "create", "update", "delete", "query"]
    )
    """Standard item with key as applied to this standard assignment over the given scope."""
    effect: Optional[Union[str, "_models.Effect"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Expected effect of this assignment (Audit/Exempt/Attest). Known values are: \"Audit\",
     \"Exempt\", and \"Attest\"."""
    excluded_scopes: Optional[list[str]] = rest_field(
        name="excludedScopes", visibility=["read", "create", "update", "delete", "query"]
    )
    """Excluded scopes, filter out the descendants of the scope (on management scopes)."""
    expires_on: Optional[datetime.datetime] = rest_field(
        name="expiresOn", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
    )
    """Expiration date of this assignment as a full ISO date."""
    exemption_data: Optional["_models.StandardAssignmentPropertiesExemptionData"] = rest_field(
        name="exemptionData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional data about assignment that has Exempt effect."""
    attestation_data: Optional["_models.StandardAssignmentPropertiesAttestationData"] = rest_field(
        name="attestationData", visibility=["read", "create", "update", "delete", "query"]
    )
    """Additional data about assignment that has Attest effect."""
    metadata: Optional["_models.StandardAssignmentMetadata"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The standard assignment metadata."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        assigned_standard: Optional["_models.AssignedStandardItem"] = None,
        effect: Optional[Union[str, "_models.Effect"]] = None,
        excluded_scopes: Optional[list[str]] = None,
        expires_on: Optional[datetime.datetime] = None,
        exemption_data: Optional["_models.StandardAssignmentPropertiesExemptionData"] = None,
        attestation_data: Optional["_models.StandardAssignmentPropertiesAttestationData"] = None,
        metadata: Optional["_models.StandardAssignmentMetadata"] = None,
    ) -> None: ...

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

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


class StandardAssignmentPropertiesAttestationData(_Model):  # pylint: disable=name-too-long
    """Additional data about assignment that has Attest effect.

    :ivar compliance_state: Attest category of this assignment. Known values are: "unknown",
     "compliant", and "nonCompliant".
    :vartype compliance_state: str or ~azure.mgmt.security.models.AttestationComplianceState
    :ivar assigned_assessment: Component item with key as applied to this standard assignment over
     the given scope.
    :vartype assigned_assessment: ~azure.mgmt.security.models.AssignedAssessmentItem
    :ivar compliance_date: Attestation compliance date.
    :vartype compliance_date: ~datetime.datetime
    :ivar evidence: Array of links to attestation evidence.
    :vartype evidence: list[~azure.mgmt.security.models.AttestationEvidence]
    """

    compliance_state: Optional[Union[str, "_models.AttestationComplianceState"]] = rest_field(
        name="complianceState", visibility=["read", "create", "update", "delete", "query"]
    )
    """Attest category of this assignment. Known values are: \"unknown\", \"compliant\", and
     \"nonCompliant\"."""
    assigned_assessment: Optional["_models.AssignedAssessmentItem"] = rest_field(
        name="assignedAssessment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Component item with key as applied to this standard assignment over the given scope."""
    compliance_date: Optional[datetime.datetime] = rest_field(
        name="complianceDate", visibility=["read"], format="rfc3339"
    )
    """Attestation compliance date."""
    evidence: Optional[list["_models.AttestationEvidence"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Array of links to attestation evidence."""

    @overload
    def __init__(
        self,
        *,
        compliance_state: Optional[Union[str, "_models.AttestationComplianceState"]] = None,
        assigned_assessment: Optional["_models.AssignedAssessmentItem"] = None,
        evidence: Optional[list["_models.AttestationEvidence"]] = None,
    ) -> None: ...

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

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


class StandardAssignmentPropertiesExemptionData(_Model):  # pylint: disable=name-too-long
    """Additional data about assignment that has Exempt effect.

    :ivar exemption_category: Exemption category of this assignment. Known values are: "waiver" and
     "mitigated".
    :vartype exemption_category: str or ~azure.mgmt.security.models.ExemptionCategory
    :ivar assigned_assessment: Component item with key as applied to this standard assignment over
     the given scope.
    :vartype assigned_assessment: ~azure.mgmt.security.models.AssignedAssessmentItem
    """

    exemption_category: Optional[Union[str, "_models.ExemptionCategory"]] = rest_field(
        name="exemptionCategory", visibility=["read", "create", "update", "delete", "query"]
    )
    """Exemption category of this assignment. Known values are: \"waiver\" and \"mitigated\"."""
    assigned_assessment: Optional["_models.AssignedAssessmentItem"] = rest_field(
        name="assignedAssessment", visibility=["read", "create", "update", "delete", "query"]
    )
    """Component item with key as applied to this standard assignment over the given scope."""

    @overload
    def __init__(
        self,
        *,
        exemption_category: Optional[Union[str, "_models.ExemptionCategory"]] = None,
        assigned_assessment: Optional["_models.AssignedAssessmentItem"] = None,
    ) -> None: ...

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

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


class StandardComponentProperties(_Model):
    """Describes properties of an component as related to the standard.

    :ivar key: Component Key matching componentMetadata.
    :vartype key: str
    """

    key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Component Key matching componentMetadata."""

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

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

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


class StandardMetadata(_Model):
    """The standard metadata.

    :ivar created_by: Standard Created by object id (GUID).
    :vartype created_by: str
    :ivar created_on: Standard creation date.
    :vartype created_on: ~datetime.datetime
    :ivar last_updated_by: Standard last updated by object id (GUID).
    :vartype last_updated_by: str
    :ivar last_updated_on: Standard last update date.
    :vartype last_updated_on: ~datetime.datetime
    """

    created_by: Optional[str] = rest_field(name="createdBy", visibility=["read"])
    """Standard Created by object id (GUID)."""
    created_on: Optional[datetime.datetime] = rest_field(name="createdOn", visibility=["read"], format="rfc3339")
    """Standard creation date."""
    last_updated_by: Optional[str] = rest_field(name="lastUpdatedBy", visibility=["read"])
    """Standard last updated by object id (GUID)."""
    last_updated_on: Optional[datetime.datetime] = rest_field(
        name="lastUpdatedOn", visibility=["read"], format="rfc3339"
    )
    """Standard last update date."""


class StandardProperties(_Model):
    """Describes properties of a standard.

    :ivar display_name: display name of the standard, equivalent to the standardId.
    :vartype display_name: str
    :ivar standard_type: standard type (Custom or BuiltIn only currently).
    :vartype standard_type: str
    :ivar description: description of the standard.
    :vartype description: str
    :ivar category: category of the standard provided.
    :vartype category: str
    :ivar components: List of component objects containing component unique keys (such as
     assessment keys) to apply to standard scope.  Currently only supports assessment keys.
    :vartype components: list[~azure.mgmt.security.models.StandardComponentProperties]
    :ivar supported_clouds: List of all standard supported clouds.
    :vartype supported_clouds: list[str or ~azure.mgmt.security.models.StandardSupportedClouds]
    """

    display_name: Optional[str] = rest_field(
        name="displayName", visibility=["read", "create", "update", "delete", "query"]
    )
    """display name of the standard, equivalent to the standardId."""
    standard_type: Optional[str] = rest_field(name="standardType", visibility=["read"])
    """standard type (Custom or BuiltIn only currently)."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """description of the standard."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """category of the standard provided."""
    components: Optional[list["_models.StandardComponentProperties"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """List of component objects containing component unique keys (such as assessment keys) to apply
     to standard scope.  Currently only supports assessment keys."""
    supported_clouds: Optional[list[Union[str, "_models.StandardSupportedClouds"]]] = rest_field(
        name="supportedClouds", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of all standard supported clouds."""

    @overload
    def __init__(
        self,
        *,
        display_name: Optional[str] = None,
        description: Optional[str] = None,
        category: Optional[str] = None,
        components: Optional[list["_models.StandardComponentProperties"]] = None,
        supported_clouds: Optional[list[Union[str, "_models.StandardSupportedClouds"]]] = None,
    ) -> None: ...

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

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


class StatusAutoGenerated(_Model):
    """The status of the health report.

    :ivar code: The status of the health report. Known values are: "Healthy", "NotHealthy", and
     "NotApplicable".
    :vartype code: str or ~azure.mgmt.security.models.StatusName
    :ivar reason: The reason of the given status.
    :vartype reason: str
    :ivar last_scanned_date: The date of when the resource was scanned in the last time.
    :vartype last_scanned_date: ~datetime.datetime
    :ivar status_change_date: The date of when the status of the health report was changed in the
     last time.
    :vartype status_change_date: ~datetime.datetime
    :ivar first_evaluation_date: The date of when the resource of the health report was scanned in
     the first time.
    :vartype first_evaluation_date: ~datetime.datetime
    """

    code: Optional[Union[str, "_models.StatusName"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the health report. Known values are: \"Healthy\", \"NotHealthy\", and
     \"NotApplicable\"."""
    reason: Optional[str] = rest_field(visibility=["read"])
    """The reason of the given status."""
    last_scanned_date: Optional[datetime.datetime] = rest_field(
        name="lastScannedDate", visibility=["read"], format="rfc3339"
    )
    """The date of when the resource was scanned in the last time."""
    status_change_date: Optional[datetime.datetime] = rest_field(
        name="statusChangeDate", visibility=["read"], format="rfc3339"
    )
    """The date of when the status of the health report was changed in the last time."""
    first_evaluation_date: Optional[datetime.datetime] = rest_field(
        name="firstEvaluationDate", visibility=["read"], format="rfc3339"
    )
    """The date of when the resource of the health report was scanned in the first time."""

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

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

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


class SubAssessmentStatus(_Model):
    """Status of the sub-assessment.

    :ivar code: Programmatic code for the status of the assessment. Known values are: "Healthy",
     "Unhealthy", and "NotApplicable".
    :vartype code: str or ~azure.mgmt.security.models.SubAssessmentStatusCode
    :ivar cause: Programmatic code for the cause of the assessment status.
    :vartype cause: str
    :ivar description: Human readable description of the assessment status.
    :vartype description: str
    :ivar severity: The sub-assessment severity level. Known values are: "Low", "Medium", "High",
     and "Critical".
    :vartype severity: str or ~azure.mgmt.security.models.Severity
    """

    code: Optional[Union[str, "_models.SubAssessmentStatusCode"]] = rest_field(visibility=["read"])
    """Programmatic code for the status of the assessment. Known values are: \"Healthy\",
     \"Unhealthy\", and \"NotApplicable\"."""
    cause: Optional[str] = rest_field(visibility=["read"])
    """Programmatic code for the cause of the assessment status."""
    description: Optional[str] = rest_field(visibility=["read"])
    """Human readable description of the assessment status."""
    severity: Optional[Union[str, "_models.Severity"]] = rest_field(visibility=["read"])
    """The sub-assessment severity level. Known values are: \"Low\", \"Medium\", \"High\", and
     \"Critical\"."""


class SuppressionAlertsScope(_Model):
    """SuppressionAlertsScope.

    :ivar all_of: All the conditions inside need to be true in order to suppress the alert.
     Required.
    :vartype all_of: list[~azure.mgmt.security.models.ScopeElement]
    """

    all_of: list["_models.ScopeElement"] = rest_field(
        name="allOf", visibility=["read", "create", "update", "delete", "query"]
    )
    """All the conditions inside need to be true in order to suppress the alert. Required."""

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

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: 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.security.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.security.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.

    :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 TargetBranchConfiguration(_Model):
    """Repository branch configuration for PR Annotations.

    :ivar branch_names: Gets or sets branches that should have annotations.
    :vartype branch_names: list[str]
    :ivar annotate_default_branch: Configuration of PR Annotations on default branch.

     Enabled - PR Annotations are enabled on the resource's default branch.
     Disabled - PR Annotations are disabled on the resource's default branch. Known values are:
     "Disabled" and "Enabled".
    :vartype annotate_default_branch: str or ~azure.mgmt.security.models.AnnotateDefaultBranchState
    """

    branch_names: Optional[list[str]] = rest_field(
        name="branchNames", visibility=["read", "create", "update", "delete", "query"]
    )
    """Gets or sets branches that should have annotations."""
    annotate_default_branch: Optional[Union[str, "_models.AnnotateDefaultBranchState"]] = rest_field(
        name="annotateDefaultBranch", visibility=["read", "create", "update", "delete", "query"]
    )
    """Configuration of PR Annotations on default branch.
     
     Enabled - PR Annotations are enabled on the resource's default branch.
     Disabled - PR Annotations are disabled on the resource's default branch. Known values are:
     \"Disabled\" and \"Enabled\"."""

    @overload
    def __init__(
        self,
        *,
        branch_names: Optional[list[str]] = None,
        annotate_default_branch: Optional[Union[str, "_models.AnnotateDefaultBranchState"]] = None,
    ) -> None: ...

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

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


class ThresholdCustomAlertRule(CustomAlertRule, discriminator="ThresholdCustomAlertRule"):
    """A custom alert rule that checks if a value (depends on the custom alert type) is within the
    given range.

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

    :ivar display_name: The display name of the custom alert.
    :vartype display_name: str
    :ivar description: The description of the custom alert.
    :vartype description: str
    :ivar is_enabled: Status of the custom alert. Required.
    :vartype is_enabled: bool
    :ivar min_threshold: The minimum threshold. Required.
    :vartype min_threshold: int
    :ivar max_threshold: The maximum threshold. Required.
    :vartype max_threshold: int
    :ivar rule_type: Required. Default value is "ThresholdCustomAlertRule".
    :vartype rule_type: str
    """

    __mapping__: dict[str, _Model] = {}
    min_threshold: int = rest_field(name="minThreshold", visibility=["read", "create", "update", "delete", "query"])
    """The minimum threshold. Required."""
    max_threshold: int = rest_field(name="maxThreshold", visibility=["read", "create", "update", "delete", "query"])
    """The maximum threshold. Required."""
    rule_type: Literal["ThresholdCustomAlertRule"] = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. Default value is \"ThresholdCustomAlertRule\"."""

    @overload
    def __init__(
        self,
        *,
        is_enabled: bool,
        min_threshold: int,
        max_threshold: 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)
        self.rule_type = "ThresholdCustomAlertRule"  # type: ignore


class TimeWindowCustomAlertRule(ThresholdCustomAlertRule, discriminator="TimeWindowCustomAlertRule"):
    """A custom alert rule that checks if the number of activities (depends on the custom alert type)
    in a time window is within the given range.

    :ivar time_window_size: The time window size in iso8601 format. Required.
    :vartype time_window_size: ~datetime.timedelta
    :ivar rule_type: Required. Default value is "TimeWindowCustomAlertRule".
    :vartype rule_type: str
    """

    time_window_size: datetime.timedelta = rest_field(
        name="timeWindowSize", visibility=["read", "create", "update", "delete", "query"]
    )
    """The time window size in iso8601 format. Required."""
    rule_type: Literal["TimeWindowCustomAlertRule"] = rest_discriminator(name="ruleType", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. Default value is \"TimeWindowCustomAlertRule\"."""

    @overload
    def __init__(
        self,
        *,
        time_window_size: 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)
        self.rule_type = "TimeWindowCustomAlertRule"  # type: ignore


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

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

    properties: Optional["_models.TopologyResourceProperties"] = rest_field(visibility=["read"])
    location: str = rest_field(visibility=["read"])
    """Location where the resource is stored. Required."""

    __flattened_items = ["calculated_date_time", "topology_resources"]


class TopologyResourceProperties(_Model):
    """TopologyResourceProperties.

    :ivar calculated_date_time: The UTC time on which the topology was calculated.
    :vartype calculated_date_time: ~datetime.datetime
    :ivar topology_resources: Azure resources which are part of this topology resource.
    :vartype topology_resources: list[~azure.mgmt.security.models.TopologySingleResource]
    """

    calculated_date_time: Optional[datetime.datetime] = rest_field(
        name="calculatedDateTime", visibility=["read"], format="rfc3339"
    )
    """The UTC time on which the topology was calculated."""
    topology_resources: Optional[list["_models.TopologySingleResource"]] = rest_field(
        name="topologyResources", visibility=["read"]
    )
    """Azure resources which are part of this topology resource."""


class TopologySingleResource(_Model):
    """TopologySingleResource.

    :ivar resource_id: Azure resource id.
    :vartype resource_id: str
    :ivar severity: The security severity of the resource.
    :vartype severity: str
    :ivar recommendations_exist: Indicates if the resource has security recommendations.
    :vartype recommendations_exist: bool
    :ivar network_zones: Indicates the resource connectivity level to the Internet (InternetFacing,
     Internal ,etc.).
    :vartype network_zones: str
    :ivar topology_score: Score of the resource based on its security severity.
    :vartype topology_score: int
    :ivar location: The location of this resource.
    :vartype location: str
    :ivar parents: Azure resources connected to this resource which are in higher level in the
     topology view.
    :vartype parents: list[~azure.mgmt.security.models.TopologySingleResourceParent]
    :ivar children: Azure resources connected to this resource which are in lower level in the
     topology view.
    :vartype children: list[~azure.mgmt.security.models.TopologySingleResourceChild]
    """

    resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"])
    """Azure resource id."""
    severity: Optional[str] = rest_field(visibility=["read"])
    """The security severity of the resource."""
    recommendations_exist: Optional[bool] = rest_field(name="recommendationsExist", visibility=["read"])
    """Indicates if the resource has security recommendations."""
    network_zones: Optional[str] = rest_field(name="networkZones", visibility=["read"])
    """Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.)."""
    topology_score: Optional[int] = rest_field(name="topologyScore", visibility=["read"])
    """Score of the resource based on its security severity."""
    location: Optional[str] = rest_field(visibility=["read"])
    """The location of this resource."""
    parents: Optional[list["_models.TopologySingleResourceParent"]] = rest_field(visibility=["read"])
    """Azure resources connected to this resource which are in higher level in the topology view."""
    children: Optional[list["_models.TopologySingleResourceChild"]] = rest_field(visibility=["read"])
    """Azure resources connected to this resource which are in lower level in the topology view."""


class TopologySingleResourceChild(_Model):
    """TopologySingleResourceChild.

    :ivar resource_id: Azure resource id which serves as child resource in topology view.
    :vartype resource_id: str
    """

    resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"])
    """Azure resource id which serves as child resource in topology view."""


class TopologySingleResourceParent(_Model):
    """TopologySingleResourceParent.

    :ivar resource_id: Azure resource id which serves as parent resource in topology view.
    :vartype resource_id: str
    """

    resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"])
    """Azure resource id which serves as parent resource in topology view."""


class UpdateIotSecuritySolutionData(TagsResource):
    """UpdateIotSecuritySolutionData.

    :ivar tags: Resource tags.
    :vartype tags: dict[str, str]
    :ivar properties: Security Solution data.
    :vartype properties: ~azure.mgmt.security.models.UpdateIoTSecuritySolutionProperties
    """

    properties: Optional["_models.UpdateIoTSecuritySolutionProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Security Solution data."""

    __flattened_items = ["user_defined_resources", "recommendations_configuration"]

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

    @overload
    def __init__(self, mapping: Mapping[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 UpdateIoTSecuritySolutionProperties(_Model):
    """Update Security Solution setting data.

    :ivar user_defined_resources: Properties of the IoT Security solution's user defined resources.
    :vartype user_defined_resources: ~azure.mgmt.security.models.UserDefinedResourcesProperties
    :ivar recommendations_configuration: List of the configuration status for each recommendation
     type.
    :vartype recommendations_configuration:
     list[~azure.mgmt.security.models.RecommendationConfigurationProperties]
    """

    user_defined_resources: Optional["_models.UserDefinedResourcesProperties"] = rest_field(
        name="userDefinedResources", visibility=["read", "create", "update", "delete", "query"]
    )
    """Properties of the IoT Security solution's user defined resources."""
    recommendations_configuration: Optional[list["_models.RecommendationConfigurationProperties"]] = rest_field(
        name="recommendationsConfiguration", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of the configuration status for each recommendation type."""

    @overload
    def __init__(
        self,
        *,
        user_defined_resources: Optional["_models.UserDefinedResourcesProperties"] = None,
        recommendations_configuration: Optional[list["_models.RecommendationConfigurationProperties"]] = None,
    ) -> None: ...

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

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


class UpdateSensitivitySettingsRequest(_Model):
    """Request to update data sensitivity settings for sensitive data discovery.

    :ivar sensitive_info_types_ids: List of selected sensitive info types' IDs. Required.
    :vartype sensitive_info_types_ids: list[str]
    :ivar sensitivity_threshold_label_order: The order of the sensitivity threshold label. Any
     label at or above this order will be considered sensitive. If set to -1, sensitivity by labels
     is turned off.
    :vartype sensitivity_threshold_label_order: float
    :ivar sensitivity_threshold_label_id: The id of the sensitivity threshold label. Any label at
     or above this rank will be considered sensitive.
    :vartype sensitivity_threshold_label_id: str
    """

    sensitive_info_types_ids: list[str] = rest_field(
        name="sensitiveInfoTypesIds", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of selected sensitive info types' IDs. Required."""
    sensitivity_threshold_label_order: Optional[float] = rest_field(
        name="sensitivityThresholdLabelOrder", visibility=["read", "create", "update", "delete", "query"]
    )
    """The order of the sensitivity threshold label. Any label at or above this order will be
     considered sensitive. If set to -1, sensitivity by labels is turned off."""
    sensitivity_threshold_label_id: Optional[str] = rest_field(
        name="sensitivityThresholdLabelId", visibility=["read", "create", "update", "delete", "query"]
    )
    """The id of the sensitivity threshold label. Any label at or above this rank will be considered
     sensitive."""

    @overload
    def __init__(
        self,
        *,
        sensitive_info_types_ids: list[str],
        sensitivity_threshold_label_order: Optional[float] = None,
        sensitivity_threshold_label_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 UserDefinedResourcesProperties(_Model):
    """Properties of the IoT Security solution's user defined resources.

    :ivar query: Azure Resource Graph query which represents the security solution's user defined
     resources. Required to start with "where type != "Microsoft.Devices/IotHubs"". Required.
    :vartype query: str
    :ivar query_subscriptions: List of Azure subscription ids on which the user defined resources
     query should be executed. Required.
    :vartype query_subscriptions: list[str]
    """

    query: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Azure Resource Graph query which represents the security solution's user defined resources.
     Required to start with \"where type != \"Microsoft.Devices/IotHubs\"\". Required."""
    query_subscriptions: list[str] = rest_field(
        name="querySubscriptions", visibility=["read", "create", "update", "delete", "query"]
    )
    """List of Azure subscription ids on which the user defined resources query should be executed.
     Required."""

    @overload
    def __init__(
        self,
        *,
        query: str,
        query_subscriptions: 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 VaRule(_Model):
    """vulnerability assessment rule metadata details.

    :ivar rule_id: The rule Id.
    :vartype rule_id: str
    :ivar severity: The rule severity. Known values are: "High", "Medium", "Low", "Informational",
     and "Obsolete".
    :vartype severity: str or ~azure.mgmt.security.models.RuleSeverity
    :ivar category: The rule category.
    :vartype category: str
    :ivar rule_type: The rule type. Known values are: "Binary", "BaselineExpected", "PositiveList",
     and "NegativeList".
    :vartype rule_type: str or ~azure.mgmt.security.models.RuleType
    :ivar title: The rule title.
    :vartype title: str
    :ivar description: The rule description.
    :vartype description: str
    :ivar rationale: The rule rationale.
    :vartype rationale: str
    :ivar query_check: The rule query details.
    :vartype query_check: ~azure.mgmt.security.models.QueryCheck
    :ivar benchmark_references: The benchmark references.
    :vartype benchmark_references: list[~azure.mgmt.security.models.BenchmarkReference]
    """

    rule_id: Optional[str] = rest_field(name="ruleId", visibility=["read", "create", "update", "delete", "query"])
    """The rule Id."""
    severity: Optional[Union[str, "_models.RuleSeverity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule severity. Known values are: \"High\", \"Medium\", \"Low\", \"Informational\", and
     \"Obsolete\"."""
    category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rule category."""
    rule_type: Optional[Union[str, "_models.RuleType"]] = rest_field(
        name="ruleType", visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule type. Known values are: \"Binary\", \"BaselineExpected\", \"PositiveList\", and
     \"NegativeList\"."""
    title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rule title."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rule description."""
    rationale: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The rule rationale."""
    query_check: Optional["_models.QueryCheck"] = rest_field(
        name="queryCheck", visibility=["read", "create", "update", "delete", "query"]
    )
    """The rule query details."""
    benchmark_references: Optional[list["_models.BenchmarkReference"]] = rest_field(
        name="benchmarkReferences", visibility=["read", "create", "update", "delete", "query"]
    )
    """The benchmark references."""

    @overload
    def __init__(
        self,
        *,
        rule_id: Optional[str] = None,
        severity: Optional[Union[str, "_models.RuleSeverity"]] = None,
        category: Optional[str] = None,
        rule_type: Optional[Union[str, "_models.RuleType"]] = None,
        title: Optional[str] = None,
        description: Optional[str] = None,
        rationale: Optional[str] = None,
        query_check: Optional["_models.QueryCheck"] = None,
        benchmark_references: Optional[list["_models.BenchmarkReference"]] = None,
    ) -> None: ...

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

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


class VendorReference(_Model):
    """Vendor reference.

    :ivar title: Link title.
    :vartype title: str
    :ivar link: Link url.
    :vartype link: str
    """

    title: Optional[str] = rest_field(visibility=["read"])
    """Link title."""
    link: Optional[str] = rest_field(visibility=["read"])
    """Link url."""


class VmScannersBaseConfiguration(_Model):
    """Configuration for VM scanning.

    :ivar scanning_mode: The scanning mode for the VM scan. "Default"
    :vartype scanning_mode: str or ~azure.mgmt.security.models.ScanningMode
    :ivar exclusion_tags: Tags that indicates that a resource should not be scanned.
    :vartype exclusion_tags: dict[str, str]
    """

    scanning_mode: Optional[Union[str, "_models.ScanningMode"]] = rest_field(
        name="scanningMode", visibility=["read", "create", "update", "delete", "query"]
    )
    """The scanning mode for the VM scan. \"Default\""""
    exclusion_tags: Optional[dict[str, str]] = rest_field(
        name="exclusionTags", visibility=["read", "create", "update", "delete", "query"]
    )
    """Tags that indicates that a resource should not be scanned."""

    @overload
    def __init__(
        self,
        *,
        scanning_mode: Optional[Union[str, "_models.ScanningMode"]] = None,
        exclusion_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 WorkspaceSetting(ProxyResource):
    """Configures where to store the OMS agent data for workspaces under a scope.

    :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.security.models.SystemData
    :ivar properties: Workspace setting data.
    :vartype properties: ~azure.mgmt.security.models.WorkspaceSettingProperties
    """

    properties: Optional["_models.WorkspaceSettingProperties"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Workspace setting data."""

    __flattened_items = ["workspace_id", "scope"]

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

    @overload
    def __init__(self, mapping: Mapping[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 WorkspaceSettingProperties(_Model):
    """Workspace setting data.

    :ivar workspace_id: The full Azure ID of the workspace to save the data in. Required.
    :vartype workspace_id: str
    :ivar scope: All the VMs in this scope will send their security data to the mentioned workspace
     unless overridden by a setting with more specific scope. Required.
    :vartype scope: str
    """

    workspace_id: str = rest_field(name="workspaceId", visibility=["read", "create", "update", "delete", "query"])
    """The full Azure ID of the workspace to save the data in. Required."""
    scope: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """All the VMs in this scope will send their security data to the mentioned workspace unless
     overridden by a setting with more specific scope. Required."""

    @overload
    def __init__(
        self,
        *,
        workspace_id: str,
        scope: 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)
