"""
@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 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 Message(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

    class _MessageTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Message._MessageType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        REGISTER: Message._MessageType.ValueType  # 0
        REGISTER_RESPONSE: Message._MessageType.ValueType  # 1
        UNREGISTER: Message._MessageType.ValueType  # 2
        DISCOVER: Message._MessageType.ValueType  # 3
        DISCOVER_RESPONSE: Message._MessageType.ValueType  # 4
        DISCOVER_SUBSCRIBE: Message._MessageType.ValueType  # 100
        DISCOVER_SUBSCRIBE_RESPONSE: Message._MessageType.ValueType  # 101

    class MessageType(_MessageType, metaclass=_MessageTypeEnumTypeWrapper): ...
    REGISTER: Message.MessageType.ValueType  # 0
    REGISTER_RESPONSE: Message.MessageType.ValueType  # 1
    UNREGISTER: Message.MessageType.ValueType  # 2
    DISCOVER: Message.MessageType.ValueType  # 3
    DISCOVER_RESPONSE: Message.MessageType.ValueType  # 4
    DISCOVER_SUBSCRIBE: Message.MessageType.ValueType  # 100
    DISCOVER_SUBSCRIBE_RESPONSE: Message.MessageType.ValueType  # 101

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

    class _ResponseStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Message._ResponseStatus.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        OK: Message._ResponseStatus.ValueType  # 0
        E_INVALID_NAMESPACE: Message._ResponseStatus.ValueType  # 100
        E_INVALID_PEER_INFO: Message._ResponseStatus.ValueType  # 101
        E_INVALID_TTL: Message._ResponseStatus.ValueType  # 102
        E_INVALID_COOKIE: Message._ResponseStatus.ValueType  # 103
        E_NOT_AUTHORIZED: Message._ResponseStatus.ValueType  # 200
        E_INTERNAL_ERROR: Message._ResponseStatus.ValueType  # 300
        E_UNAVAILABLE: Message._ResponseStatus.ValueType  # 400

    class ResponseStatus(_ResponseStatus, metaclass=_ResponseStatusEnumTypeWrapper): ...
    OK: Message.ResponseStatus.ValueType  # 0
    E_INVALID_NAMESPACE: Message.ResponseStatus.ValueType  # 100
    E_INVALID_PEER_INFO: Message.ResponseStatus.ValueType  # 101
    E_INVALID_TTL: Message.ResponseStatus.ValueType  # 102
    E_INVALID_COOKIE: Message.ResponseStatus.ValueType  # 103
    E_NOT_AUTHORIZED: Message.ResponseStatus.ValueType  # 200
    E_INTERNAL_ERROR: Message.ResponseStatus.ValueType  # 300
    E_UNAVAILABLE: Message.ResponseStatus.ValueType  # 400

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

        ID_FIELD_NUMBER: builtins.int
        ADDRS_FIELD_NUMBER: builtins.int
        id: builtins.bytes
        @property
        def addrs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
        def __init__(
            self,
            *,
            id: builtins.bytes = ...,
            addrs: collections.abc.Iterable[builtins.bytes] | None = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["addrs", b"addrs", "id", b"id"]) -> None: ...

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

        NS_FIELD_NUMBER: builtins.int
        PEER_FIELD_NUMBER: builtins.int
        TTL_FIELD_NUMBER: builtins.int
        ns: builtins.str
        ttl: builtins.int
        """in seconds"""
        @property
        def peer(self) -> global___Message.PeerInfo: ...
        def __init__(
            self,
            *,
            ns: builtins.str = ...,
            peer: global___Message.PeerInfo | None = ...,
            ttl: builtins.int = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["peer", b"peer"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["ns", b"ns", "peer", b"peer", "ttl", b"ttl"]) -> None: ...

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

        STATUS_FIELD_NUMBER: builtins.int
        STATUSTEXT_FIELD_NUMBER: builtins.int
        TTL_FIELD_NUMBER: builtins.int
        status: global___Message.ResponseStatus.ValueType
        statusText: builtins.str
        ttl: builtins.int
        def __init__(
            self,
            *,
            status: global___Message.ResponseStatus.ValueType = ...,
            statusText: builtins.str = ...,
            ttl: builtins.int = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["status", b"status", "statusText", b"statusText", "ttl", b"ttl"]) -> None: ...

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

        NS_FIELD_NUMBER: builtins.int
        ID_FIELD_NUMBER: builtins.int
        ns: builtins.str
        id: builtins.bytes
        def __init__(
            self,
            *,
            ns: builtins.str = ...,
            id: builtins.bytes = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["id", b"id", "ns", b"ns"]) -> None: ...

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

        NS_FIELD_NUMBER: builtins.int
        LIMIT_FIELD_NUMBER: builtins.int
        COOKIE_FIELD_NUMBER: builtins.int
        ns: builtins.str
        limit: builtins.int
        cookie: builtins.bytes
        def __init__(
            self,
            *,
            ns: builtins.str = ...,
            limit: builtins.int = ...,
            cookie: builtins.bytes = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["cookie", b"cookie", "limit", b"limit", "ns", b"ns"]) -> None: ...

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

        REGISTRATIONS_FIELD_NUMBER: builtins.int
        COOKIE_FIELD_NUMBER: builtins.int
        STATUS_FIELD_NUMBER: builtins.int
        STATUSTEXT_FIELD_NUMBER: builtins.int
        cookie: builtins.bytes
        status: global___Message.ResponseStatus.ValueType
        statusText: builtins.str
        @property
        def registrations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Message.Register]: ...
        def __init__(
            self,
            *,
            registrations: collections.abc.Iterable[global___Message.Register] | None = ...,
            cookie: builtins.bytes = ...,
            status: global___Message.ResponseStatus.ValueType = ...,
            statusText: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["cookie", b"cookie", "registrations", b"registrations", "status", b"status", "statusText", b"statusText"]) -> None: ...

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

        SUPPORTED_SUBSCRIPTION_TYPES_FIELD_NUMBER: builtins.int
        NS_FIELD_NUMBER: builtins.int
        ns: builtins.str
        @property
        def supported_subscription_types(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
        def __init__(
            self,
            *,
            supported_subscription_types: collections.abc.Iterable[builtins.str] | None = ...,
            ns: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["ns", b"ns", "supported_subscription_types", b"supported_subscription_types"]) -> None: ...

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

        SUBSCRIPTION_TYPE_FIELD_NUMBER: builtins.int
        SUBSCRIPTION_DETAILS_FIELD_NUMBER: builtins.int
        STATUS_FIELD_NUMBER: builtins.int
        STATUSTEXT_FIELD_NUMBER: builtins.int
        subscription_type: builtins.str
        subscription_details: builtins.str
        status: global___Message.ResponseStatus.ValueType
        statusText: builtins.str
        def __init__(
            self,
            *,
            subscription_type: builtins.str = ...,
            subscription_details: builtins.str = ...,
            status: global___Message.ResponseStatus.ValueType = ...,
            statusText: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["status", b"status", "statusText", b"statusText", "subscription_details", b"subscription_details", "subscription_type", b"subscription_type"]) -> None: ...

    TYPE_FIELD_NUMBER: builtins.int
    REGISTER_FIELD_NUMBER: builtins.int
    REGISTERRESPONSE_FIELD_NUMBER: builtins.int
    UNREGISTER_FIELD_NUMBER: builtins.int
    DISCOVER_FIELD_NUMBER: builtins.int
    DISCOVERRESPONSE_FIELD_NUMBER: builtins.int
    DISCOVERSUBSCRIBE_FIELD_NUMBER: builtins.int
    DISCOVERSUBSCRIBERESPONSE_FIELD_NUMBER: builtins.int
    type: global___Message.MessageType.ValueType
    @property
    def register(self) -> global___Message.Register: ...
    @property
    def registerResponse(self) -> global___Message.RegisterResponse: ...
    @property
    def unregister(self) -> global___Message.Unregister: ...
    @property
    def discover(self) -> global___Message.Discover: ...
    @property
    def discoverResponse(self) -> global___Message.DiscoverResponse: ...
    @property
    def discoverSubscribe(self) -> global___Message.DiscoverSubscribe: ...
    @property
    def discoverSubscribeResponse(self) -> global___Message.DiscoverSubscribeResponse: ...
    def __init__(
        self,
        *,
        type: global___Message.MessageType.ValueType = ...,
        register: global___Message.Register | None = ...,
        registerResponse: global___Message.RegisterResponse | None = ...,
        unregister: global___Message.Unregister | None = ...,
        discover: global___Message.Discover | None = ...,
        discoverResponse: global___Message.DiscoverResponse | None = ...,
        discoverSubscribe: global___Message.DiscoverSubscribe | None = ...,
        discoverSubscribeResponse: global___Message.DiscoverSubscribeResponse | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["discover", b"discover", "discoverResponse", b"discoverResponse", "discoverSubscribe", b"discoverSubscribe", "discoverSubscribeResponse", b"discoverSubscribeResponse", "register", b"register", "registerResponse", b"registerResponse", "unregister", b"unregister"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["discover", b"discover", "discoverResponse", b"discoverResponse", "discoverSubscribe", b"discoverSubscribe", "discoverSubscribeResponse", b"discoverSubscribeResponse", "register", b"register", "registerResponse", b"registerResponse", "type", b"type", "unregister", b"unregister"]) -> None: ...

global___Message = Message

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

    ID_FIELD_NUMBER: builtins.int
    ADDRS_FIELD_NUMBER: builtins.int
    NS_FIELD_NUMBER: builtins.int
    TTL_FIELD_NUMBER: builtins.int
    id: builtins.str
    ns: builtins.str
    ttl: builtins.int
    @property
    def addrs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
    def __init__(
        self,
        *,
        id: builtins.str = ...,
        addrs: collections.abc.Iterable[builtins.bytes] | None = ...,
        ns: builtins.str = ...,
        ttl: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["addrs", b"addrs", "id", b"id", "ns", b"ns", "ttl", b"ttl"]) -> None: ...

global___RegistrationRecord = RegistrationRecord
