"""
@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 libp2p.peer.pb.crypto_pb2
import libp2p.peer.pb.envelope_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 PeerAddresses(google.protobuf.message.Message):
    """PeerAddresses contains a list of multiaddresses for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ADDRESSES_FIELD_NUMBER: builtins.int
    @property
    def addresses(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
        """Each address is a serialized multiaddr"""

    def __init__(
        self,
        *,
        addresses: collections.abc.Iterable[builtins.bytes] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["addresses", b"addresses"]) -> None: ...

global___PeerAddresses = PeerAddresses

@typing.final
class PeerProtocols(google.protobuf.message.Message):
    """PeerProtocols contains a list of supported protocols for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

global___PeerProtocols = PeerProtocols

@typing.final
class PeerMetadata(google.protobuf.message.Message):
    """PeerMetadata contains key-value metadata for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

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

    METADATA_FIELD_NUMBER: builtins.int
    @property
    def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.bytes]: ...
    def __init__(
        self,
        *,
        metadata: collections.abc.Mapping[builtins.str, builtins.bytes] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["metadata", b"metadata"]) -> None: ...

global___PeerMetadata = PeerMetadata

@typing.final
class PeerKeys(google.protobuf.message.Message):
    """PeerKeys contains the public and private keys for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PUBLIC_KEY_FIELD_NUMBER: builtins.int
    PRIVATE_KEY_FIELD_NUMBER: builtins.int
    @property
    def public_key(self) -> libp2p.peer.pb.crypto_pb2.PublicKey: ...
    @property
    def private_key(self) -> libp2p.peer.pb.crypto_pb2.PrivateKey: ...
    def __init__(
        self,
        *,
        public_key: libp2p.peer.pb.crypto_pb2.PublicKey | None = ...,
        private_key: libp2p.peer.pb.crypto_pb2.PrivateKey | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["private_key", b"private_key", "public_key", b"public_key"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["private_key", b"private_key", "public_key", b"public_key"]) -> None: ...

global___PeerKeys = PeerKeys

@typing.final
class PeerLatency(google.protobuf.message.Message):
    """PeerLatency contains latency information for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    LATENCY_NS_FIELD_NUMBER: builtins.int
    latency_ns: builtins.int
    """Latency in nanoseconds"""
    def __init__(
        self,
        *,
        latency_ns: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["latency_ns", b"latency_ns"]) -> None: ...

global___PeerLatency = PeerLatency

@typing.final
class PeerEnvelope(google.protobuf.message.Message):
    """PeerEnvelope contains a signed envelope for a peer"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ENVELOPE_FIELD_NUMBER: builtins.int
    @property
    def envelope(self) -> libp2p.peer.pb.envelope_pb2.Envelope: ...
    def __init__(
        self,
        *,
        envelope: libp2p.peer.pb.envelope_pb2.Envelope | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["envelope", b"envelope"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["envelope", b"envelope"]) -> None: ...

global___PeerEnvelope = PeerEnvelope

@typing.final
class PeerRecordState(google.protobuf.message.Message):
    """PeerRecordState contains the state of a peer record"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

    class _StateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[PeerRecordState._State.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        UNKNOWN: PeerRecordState._State.ValueType  # 0
        VALID: PeerRecordState._State.ValueType  # 1
        INVALID: PeerRecordState._State.ValueType  # 2
        EXPIRED: PeerRecordState._State.ValueType  # 3

    class State(_State, metaclass=_StateEnumTypeWrapper): ...
    UNKNOWN: PeerRecordState.State.ValueType  # 0
    VALID: PeerRecordState.State.ValueType  # 1
    INVALID: PeerRecordState.State.ValueType  # 2
    EXPIRED: PeerRecordState.State.ValueType  # 3

    STATE_FIELD_NUMBER: builtins.int
    state: global___PeerRecordState.State.ValueType
    def __init__(
        self,
        *,
        state: global___PeerRecordState.State.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["state", b"state"]) -> None: ...

global___PeerRecordState = PeerRecordState
