jina.types.mixin module

class jina.types.mixin.ProtoTypeMixin[source]

Bases: object

Mixin class of ProtoType.

json()[source]

Return the object in JSON string

Return type

str

Returns

JSON string of the object

dict()[source]

Return the object in Python dictionary

Return type

Dict

Returns

dict representation of the object

property proto: google.protobuf.pyext.cpp_message.GeneratedProtocolMessageType

Return the underlying Protobuf object

Return type

GeneratedProtocolMessageType

Returns

Protobuf representation of the object

binary_str()[source]

Return the serialized the message to a string.

Return type

bytes

Returns

binary string representation of the object

property nbytes: int

Return total bytes consumed by protobuf.

Return type

int

Returns

number of bytes