viam.proto.rpc.examples.fileupload

@generated by Viam. Do not edit manually!

Package Contents

Classes

FileUploadServiceBase

Helper class that provides a standard way to create an ABC using

FileUploadServiceStub

UploadFileRequest

Abstract base class for protocol messages.

UploadFileResponse

Abstract base class for protocol messages.

class viam.proto.rpc.examples.fileupload.FileUploadServiceBase[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract async UploadFile(stream: grpclib.server.Stream[proto.rpc.examples.fileupload.v1.fileupload_pb2.UploadFileRequest, proto.rpc.examples.fileupload.v1.fileupload_pb2.UploadFileResponse]) None[source]
__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.rpc.examples.fileupload.FileUploadServiceStub(channel: grpclib.client.Channel)[source]
class viam.proto.rpc.examples.fileupload.UploadFileRequest(*, name: str = ..., chunk_data: bytes = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

name: str
chunk_data: bytes
HasField(field_name: Literal[chunk_data, b'chunk_data', data, b'data', name, b'name']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal[data, b'data']) Literal[name, chunk_data] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.proto.rpc.examples.fileupload.UploadFileResponse(*, name: str = ..., size: int = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

name: str
size: int