"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Modified from https://github.com/libp2p/go-libp2p-pubsub/blob/master/pb/rpc.proto"""

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

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

        SUBSCRIBE_FIELD_NUMBER: builtins.int
        TOPICID_FIELD_NUMBER: builtins.int
        subscribe: builtins.bool
        """subscribe or unsubscribe"""
        topicid: builtins.str
        def __init__(
            self,
            *,
            subscribe: builtins.bool | None = ...,
            topicid: builtins.str | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["subscribe", b"subscribe", "topicid", b"topicid"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["subscribe", b"subscribe", "topicid", b"topicid"]) -> None: ...

    SUBSCRIPTIONS_FIELD_NUMBER: builtins.int
    PUBLISH_FIELD_NUMBER: builtins.int
    CONTROL_FIELD_NUMBER: builtins.int
    SENDERRECORD_FIELD_NUMBER: builtins.int
    senderRecord: builtins.bytes
    @property
    def subscriptions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RPC.SubOpts]: ...
    @property
    def publish(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Message]: ...
    @property
    def control(self) -> global___ControlMessage: ...
    def __init__(
        self,
        *,
        subscriptions: collections.abc.Iterable[global___RPC.SubOpts] | None = ...,
        publish: collections.abc.Iterable[global___Message] | None = ...,
        control: global___ControlMessage | None = ...,
        senderRecord: builtins.bytes | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["control", b"control", "senderRecord", b"senderRecord"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["control", b"control", "publish", b"publish", "senderRecord", b"senderRecord", "subscriptions", b"subscriptions"]) -> None: ...

global___RPC = RPC

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

    FROM_ID_FIELD_NUMBER: builtins.int
    DATA_FIELD_NUMBER: builtins.int
    SEQNO_FIELD_NUMBER: builtins.int
    TOPICIDS_FIELD_NUMBER: builtins.int
    SIGNATURE_FIELD_NUMBER: builtins.int
    KEY_FIELD_NUMBER: builtins.int
    from_id: builtins.bytes
    data: builtins.bytes
    seqno: builtins.bytes
    signature: builtins.bytes
    key: builtins.bytes
    @property
    def topicIDs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
    def __init__(
        self,
        *,
        from_id: builtins.bytes | None = ...,
        data: builtins.bytes | None = ...,
        seqno: builtins.bytes | None = ...,
        topicIDs: collections.abc.Iterable[builtins.str] | None = ...,
        signature: builtins.bytes | None = ...,
        key: builtins.bytes | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["data", b"data", "from_id", b"from_id", "key", b"key", "seqno", b"seqno", "signature", b"signature"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["data", b"data", "from_id", b"from_id", "key", b"key", "seqno", b"seqno", "signature", b"signature", "topicIDs", b"topicIDs"]) -> None: ...

global___Message = Message

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

    IHAVE_FIELD_NUMBER: builtins.int
    IWANT_FIELD_NUMBER: builtins.int
    GRAFT_FIELD_NUMBER: builtins.int
    PRUNE_FIELD_NUMBER: builtins.int
    IDONTWANT_FIELD_NUMBER: builtins.int
    @property
    def ihave(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlIHave]: ...
    @property
    def iwant(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlIWant]: ...
    @property
    def graft(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlGraft]: ...
    @property
    def prune(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlPrune]: ...
    @property
    def idontwant(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlIDontWant]: ...
    def __init__(
        self,
        *,
        ihave: collections.abc.Iterable[global___ControlIHave] | None = ...,
        iwant: collections.abc.Iterable[global___ControlIWant] | None = ...,
        graft: collections.abc.Iterable[global___ControlGraft] | None = ...,
        prune: collections.abc.Iterable[global___ControlPrune] | None = ...,
        idontwant: collections.abc.Iterable[global___ControlIDontWant] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["graft", b"graft", "idontwant", b"idontwant", "ihave", b"ihave", "iwant", b"iwant", "prune", b"prune"]) -> None: ...

global___ControlMessage = ControlMessage

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

    TOPICID_FIELD_NUMBER: builtins.int
    MESSAGEIDS_FIELD_NUMBER: builtins.int
    topicID: builtins.str
    @property
    def messageIDs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
    def __init__(
        self,
        *,
        topicID: builtins.str | None = ...,
        messageIDs: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["topicID", b"topicID"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["messageIDs", b"messageIDs", "topicID", b"topicID"]) -> None: ...

global___ControlIHave = ControlIHave

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

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

global___ControlIWant = ControlIWant

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

    TOPICID_FIELD_NUMBER: builtins.int
    topicID: builtins.str
    def __init__(
        self,
        *,
        topicID: builtins.str | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["topicID", b"topicID"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["topicID", b"topicID"]) -> None: ...

global___ControlGraft = ControlGraft

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

    TOPICID_FIELD_NUMBER: builtins.int
    PEERS_FIELD_NUMBER: builtins.int
    BACKOFF_FIELD_NUMBER: builtins.int
    topicID: builtins.str
    backoff: builtins.int
    @property
    def peers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PeerInfo]: ...
    def __init__(
        self,
        *,
        topicID: builtins.str | None = ...,
        peers: collections.abc.Iterable[global___PeerInfo] | None = ...,
        backoff: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["backoff", b"backoff", "topicID", b"topicID"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["backoff", b"backoff", "peers", b"peers", "topicID", b"topicID"]) -> None: ...

global___ControlPrune = ControlPrune

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

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

global___ControlIDontWant = ControlIDontWant

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

    PEERID_FIELD_NUMBER: builtins.int
    SIGNEDPEERRECORD_FIELD_NUMBER: builtins.int
    peerID: builtins.bytes
    signedPeerRecord: builtins.bytes
    def __init__(
        self,
        *,
        peerID: builtins.bytes | None = ...,
        signedPeerRecord: builtins.bytes | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["peerID", b"peerID", "signedPeerRecord", b"signedPeerRecord"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["peerID", b"peerID", "signedPeerRecord", b"signedPeerRecord"]) -> None: ...

global___PeerInfo = PeerInfo

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

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

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

        class _AuthModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[TopicDescriptor.AuthOpts._AuthMode.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            NONE: TopicDescriptor.AuthOpts._AuthMode.ValueType  # 0
            """no authentication, anyone can publish"""
            KEY: TopicDescriptor.AuthOpts._AuthMode.ValueType  # 1
            """only messages signed by keys in the topic descriptor are accepted"""
            WOT: TopicDescriptor.AuthOpts._AuthMode.ValueType  # 2
            """web of trust, certificates can allow publisher set to grow"""

        class AuthMode(_AuthMode, metaclass=_AuthModeEnumTypeWrapper): ...
        NONE: TopicDescriptor.AuthOpts.AuthMode.ValueType  # 0
        """no authentication, anyone can publish"""
        KEY: TopicDescriptor.AuthOpts.AuthMode.ValueType  # 1
        """only messages signed by keys in the topic descriptor are accepted"""
        WOT: TopicDescriptor.AuthOpts.AuthMode.ValueType  # 2
        """web of trust, certificates can allow publisher set to grow"""

        MODE_FIELD_NUMBER: builtins.int
        KEYS_FIELD_NUMBER: builtins.int
        mode: global___TopicDescriptor.AuthOpts.AuthMode.ValueType
        @property
        def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
            """root keys to trust"""

        def __init__(
            self,
            *,
            mode: global___TopicDescriptor.AuthOpts.AuthMode.ValueType | None = ...,
            keys: collections.abc.Iterable[builtins.bytes] | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["mode", b"mode"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["keys", b"keys", "mode", b"mode"]) -> None: ...

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

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

        class _EncModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[TopicDescriptor.EncOpts._EncMode.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            NONE: TopicDescriptor.EncOpts._EncMode.ValueType  # 0
            """no encryption, anyone can read"""
            SHAREDKEY: TopicDescriptor.EncOpts._EncMode.ValueType  # 1
            """messages are encrypted with shared key"""
            WOT: TopicDescriptor.EncOpts._EncMode.ValueType  # 2
            """web of trust, certificates can allow publisher set to grow"""

        class EncMode(_EncMode, metaclass=_EncModeEnumTypeWrapper): ...
        NONE: TopicDescriptor.EncOpts.EncMode.ValueType  # 0
        """no encryption, anyone can read"""
        SHAREDKEY: TopicDescriptor.EncOpts.EncMode.ValueType  # 1
        """messages are encrypted with shared key"""
        WOT: TopicDescriptor.EncOpts.EncMode.ValueType  # 2
        """web of trust, certificates can allow publisher set to grow"""

        MODE_FIELD_NUMBER: builtins.int
        KEYHASHES_FIELD_NUMBER: builtins.int
        mode: global___TopicDescriptor.EncOpts.EncMode.ValueType
        @property
        def keyHashes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
            """the hashes of the shared keys used (salted)"""

        def __init__(
            self,
            *,
            mode: global___TopicDescriptor.EncOpts.EncMode.ValueType | None = ...,
            keyHashes: collections.abc.Iterable[builtins.bytes] | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["mode", b"mode"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["keyHashes", b"keyHashes", "mode", b"mode"]) -> None: ...

    NAME_FIELD_NUMBER: builtins.int
    AUTH_FIELD_NUMBER: builtins.int
    ENC_FIELD_NUMBER: builtins.int
    name: builtins.str
    @property
    def auth(self) -> global___TopicDescriptor.AuthOpts: ...
    @property
    def enc(self) -> global___TopicDescriptor.EncOpts: ...
    def __init__(
        self,
        *,
        name: builtins.str | None = ...,
        auth: global___TopicDescriptor.AuthOpts | None = ...,
        enc: global___TopicDescriptor.EncOpts | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["auth", b"auth", "enc", b"enc", "name", b"name"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["auth", b"auth", "enc", b"enc", "name", b"name"]) -> None: ...

global___TopicDescriptor = TopicDescriptor
