"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class DnsFirewall(google.protobuf.message.Message):
    """A DNS firewall. For details about the concept, see [DNS firewalls](/docs/dns/concepts/dns-firewall)."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class LabelsEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: builtins.str
        value: builtins.str
        def __init__(
            self,
            *,
            key: builtins.str = ...,
            value: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...

    @typing.final
    class ResourceConfig(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class _ResourceType:
            ValueType = typing.NewType("ValueType", builtins.int)
            V: typing_extensions.TypeAlias = ValueType

        class _ResourceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DnsFirewall.ResourceConfig._ResourceType.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            RESOURCE_TYPE_UNSPECIFIED: DnsFirewall.ResourceConfig._ResourceType.ValueType  # 0
            """Unspecified resource type."""
            NETWORK: DnsFirewall.ResourceConfig._ResourceType.ValueType  # 1
            """VPC network resource type."""
            FOLDER: DnsFirewall.ResourceConfig._ResourceType.ValueType  # 2
            """Folder resource type."""
            CLOUD: DnsFirewall.ResourceConfig._ResourceType.ValueType  # 3
            """Cloud resource type."""

        class ResourceType(_ResourceType, metaclass=_ResourceTypeEnumTypeWrapper): ...
        RESOURCE_TYPE_UNSPECIFIED: DnsFirewall.ResourceConfig.ResourceType.ValueType  # 0
        """Unspecified resource type."""
        NETWORK: DnsFirewall.ResourceConfig.ResourceType.ValueType  # 1
        """VPC network resource type."""
        FOLDER: DnsFirewall.ResourceConfig.ResourceType.ValueType  # 2
        """Folder resource type."""
        CLOUD: DnsFirewall.ResourceConfig.ResourceType.ValueType  # 3
        """Cloud resource type."""

        TYPE_FIELD_NUMBER: builtins.int
        RESOURCE_IDS_FIELD_NUMBER: builtins.int
        LOCKING_POLICY_ENABLED_FIELD_NUMBER: builtins.int
        type: global___DnsFirewall.ResourceConfig.ResourceType.ValueType
        """Type of the resource."""
        locking_policy_enabled: builtins.bool
        """Whether the locking policy is enabled."""
        @property
        def resource_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
            """Resource ids."""

        def __init__(
            self,
            *,
            type: global___DnsFirewall.ResourceConfig.ResourceType.ValueType = ...,
            resource_ids: collections.abc.Iterable[builtins.str] | None = ...,
            locking_policy_enabled: builtins.bool = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["locking_policy_enabled", b"locking_policy_enabled", "resource_ids", b"resource_ids", "type", b"type"]) -> None: ...

    ID_FIELD_NUMBER: builtins.int
    FOLDER_ID_FIELD_NUMBER: builtins.int
    CREATED_AT_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    DESCRIPTION_FIELD_NUMBER: builtins.int
    LABELS_FIELD_NUMBER: builtins.int
    DELETION_PROTECTION_FIELD_NUMBER: builtins.int
    ENABLED_FIELD_NUMBER: builtins.int
    RESOURCE_CONFIG_FIELD_NUMBER: builtins.int
    WHITELIST_FQDNS_FIELD_NUMBER: builtins.int
    BLACKLIST_FQDNS_FIELD_NUMBER: builtins.int
    id: builtins.str
    """ID of the DNS firewall. Generated at creation time."""
    folder_id: builtins.str
    """ID of the folder that the DNS firewall belongs to."""
    name: builtins.str
    """Name of the DNS firewall.
    The name is unique within the folder.
    """
    description: builtins.str
    """Description of the DNS firewall."""
    deletion_protection: builtins.bool
    """Prevents accidental firewall removal."""
    enabled: builtins.bool
    """Whether the DNS firewall is enabled."""
    @property
    def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Creation timestamp."""

    @property
    def labels(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
        """DNS firewall labels as `key:value` pairs."""

    @property
    def resource_config(self) -> global___DnsFirewall.ResourceConfig:
        """Resource settings.
        Specifies resources that the DNS firewall applies to.
        """

    @property
    def whitelist_fqdns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of FQDNs that the DNS firewall allows to pass."""

    @property
    def blacklist_fqdns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of FQDNs that the DNS firewall blocks."""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        folder_id: builtins.str = ...,
        created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        name: builtins.str = ...,
        description: builtins.str = ...,
        labels: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
        deletion_protection: builtins.bool = ...,
        enabled: builtins.bool = ...,
        resource_config: global___DnsFirewall.ResourceConfig | None = ...,
        whitelist_fqdns: collections.abc.Iterable[builtins.str] | None = ...,
        blacklist_fqdns: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["created_at", b"created_at", "resource_config", b"resource_config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["blacklist_fqdns", b"blacklist_fqdns", "created_at", b"created_at", "deletion_protection", b"deletion_protection", "description", b"description", "enabled", b"enabled", "folder_id", b"folder_id", "id", b"id", "labels", b"labels", "name", b"name", "resource_config", b"resource_config", "whitelist_fqdns", b"whitelist_fqdns"]) -> None: ...

global___DnsFirewall = DnsFirewall
