"""
@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.message
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class PBLink(google.protobuf.message.Message):
    """Official DAG-PB spec: https://ipld.io/specs/codecs/dag-pb/spec/
    This is the EXACT format used by IPFS/Kubo for interoperability
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    HASH_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    TSIZE_FIELD_NUMBER: builtins.int
    Hash: builtins.bytes
    """binary CID (with no multibase prefix) of the target object"""
    Name: builtins.str
    """UTF-8 string name"""
    Tsize: builtins.int
    """cumulative size of target object"""
    def __init__(
        self,
        *,
        Hash: builtins.bytes | None = ...,
        Name: builtins.str | None = ...,
        Tsize: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["Hash", b"Hash", "Name", b"Name", "Tsize", b"Tsize"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["Hash", b"Hash", "Name", b"Name", "Tsize", b"Tsize"]) -> None: ...

global___PBLink = PBLink

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

    LINKS_FIELD_NUMBER: builtins.int
    DATA_FIELD_NUMBER: builtins.int
    Data: builtins.bytes
    """opaque user data"""
    @property
    def Links(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PBLink]:
        """refs to other objects"""

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

global___PBNode = PBNode
