viam.proto.service.shell

@generated by Viam. Do not edit manually!

Classes

ShellServiceBase

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

ShellServiceStub

UnimplementedShellServiceBase

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

CopyFilesFromMachineRequest

Abstract base class for protocol messages.

CopyFilesFromMachineRequestMetadata

Abstract base class for protocol messages.

CopyFilesFromMachineResponse

Abstract base class for protocol messages.

CopyFilesFromMachineResponseMetadata

Abstract base class for protocol messages.

CopyFilesSourceType

CopyFilesSourceType indicates what will be copied. It's important

CopyFilesToMachineRequest

Abstract base class for protocol messages.

CopyFilesToMachineRequestMetadata

Abstract base class for protocol messages.

CopyFilesToMachineResponse

Abstract base class for protocol messages.

FileData

FileData contains partial (sometimes complete) information about a File.

ShellRequest

Abstract base class for protocol messages.

ShellResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.service.shell.ShellServiceBase[source]

Bases: abc.ABC

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

abstract Shell(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.ShellRequest, service.shell.v1.shell_pb2.ShellResponse]) None[source]
Async:

abstract CopyFilesToMachine(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.CopyFilesToMachineRequest, service.shell.v1.shell_pb2.CopyFilesToMachineResponse]) None[source]
Async:

abstract CopyFilesFromMachine(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.CopyFilesFromMachineRequest, service.shell.v1.shell_pb2.CopyFilesFromMachineResponse]) None[source]
Async:

abstract DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.service.shell.ShellServiceStub(channel: grpclib.client.Channel)[source]
Shell
CopyFilesToMachine
CopyFilesFromMachine
DoCommand
class viam.proto.service.shell.UnimplementedShellServiceBase[source]

Bases: ShellServiceBase

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

async Shell(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.ShellRequest, service.shell.v1.shell_pb2.ShellResponse]) None[source]
async CopyFilesToMachine(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.CopyFilesToMachineRequest, service.shell.v1.shell_pb2.CopyFilesToMachineResponse]) None[source]
async CopyFilesFromMachine(stream: grpclib.server.Stream[service.shell.v1.shell_pb2.CopyFilesFromMachineRequest, service.shell.v1.shell_pb2.CopyFilesFromMachineResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
class viam.proto.service.shell.CopyFilesFromMachineRequest(*, metadata: global___CopyFilesFromMachineRequestMetadata | None = ..., ack_last_file: bool = ...)

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.

ack_last_file: bool

ack_last_file is sent only after metadata and after each file has been received. The value does not matter.

property metadata: global___CopyFilesFromMachineRequestMetadata

metadata is sent first and only once.

HasField(field_name: Literal['ack_last_file', b'ack_last_file', 'metadata', b'metadata', 'request', b'request']) 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['request', b'request']) Literal['metadata', 'ack_last_file'] | 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.service.shell.CopyFilesFromMachineRequestMetadata(*, name: str = ..., paths: collections.abc.Iterable[str] | None = ..., allow_recursion: bool = ..., preserve: bool = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

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

name is the service name.

allow_recursion: bool

allow_recursion indicates if directories should be recursed into. If a directory is encountered and this is false, an error MUST occur.

preserve: bool

preserve indicates the the receiver should provide the metadata in the file to reflect the same state in the sender’s filesystem as applicable.

property paths: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]

paths are the paths to copy from and send back over the wire.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['extra', b'extra']) 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.

class viam.proto.service.shell.CopyFilesFromMachineResponse(*, metadata: global___CopyFilesFromMachineResponseMetadata | None = ..., file_data: global___FileData | None = ...)

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.

property metadata: global___CopyFilesFromMachineResponseMetadata

metadata is sent first and only once.

property file_data: global___FileData

file_data is sent only after metadata. All data MUST be sent in order per-file.

HasField(field_name: Literal['file_data', b'file_data', 'metadata', b'metadata', 'response', b'response']) 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['response', b'response']) Literal['metadata', 'file_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.service.shell.CopyFilesFromMachineResponseMetadata(*, source_type: global___CopyFilesSourceType = ...)

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.

source_type: global___CopyFilesSourceType

source_type is the type of files that will be transmitted in this response stream.

class viam.proto.service.shell.CopyFilesSourceType

Bases: _CopyFilesSourceType

CopyFilesSourceType indicates what will be copied. It’s important to disambiguate the single directory case from the multiple files case in order to indicate that the user’s intent is to copy a directory into a single location which may result in a new top-level directory versus the cause of multiples files that always go into the existing target destination.

class viam.proto.service.shell.CopyFilesToMachineRequest(*, metadata: global___CopyFilesToMachineRequestMetadata | None = ..., file_data: global___FileData | None = ...)

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.

property metadata: global___CopyFilesToMachineRequestMetadata

metadata is sent first and only once.

property file_data: global___FileData

file_data is sent only after metadata. All data MUST be sent in order per-file.

HasField(field_name: Literal['file_data', b'file_data', 'metadata', b'metadata', 'request', b'request']) 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['request', b'request']) Literal['metadata', 'file_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.service.shell.CopyFilesToMachineRequestMetadata(*, name: str = ..., source_type: global___CopyFilesSourceType = ..., destination: str = ..., preserve: bool = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

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

name is the service name.

source_type: global___CopyFilesSourceType

source_type is the type of files that will be transmitted in this request stream.

destination: str

destination is where the files should be placed. The receiver can choose to reasonably modify this destination based on its implementation semantics.

preserve: bool

preserve indicates the the receiver should use the metadata in the file to reflect the same state in its filesystem as applicable.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['extra', b'extra']) 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.

class viam.proto.service.shell.CopyFilesToMachineResponse(*, ack_last_file: bool = ...)

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.

ack_last_file: bool

value does not matter here but responses must be sent after every file has been received.

class viam.proto.service.shell.FileData(*, name: str = ..., size: int = ..., is_dir: bool = ..., data: bytes = ..., eof: bool = ..., mod_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., mode: int | None = ...)

Bases: google.protobuf.message.Message

FileData contains partial (sometimes complete) information about a File. When transmitting FileData with CopyFilesToMachine and CopyFilesFromMachine, it MUST initially contain its name, size, and is_dir. Depending on whether preservation is in use, the mod_time and mode fields may be initially set as well. On all transmissions, data and eof must be set. Because files are sent one-by-one, it is currently permitted to exclude the initially set fields. If this ever changes, a new scheme should be used for identifying files (like a number) in order to reduce data transmission while allowing out-of-order transfers. eof must be true and its own message once no more data is to be sent for this file.

name: str
size: int
is_dir: bool
data: bytes
eof: bool
mode: int
property mod_time: google.protobuf.timestamp_pb2.Timestamp

maybe support access time in the future if needed

Type:

Note(erd)

HasField(field_name: Literal['_mod_time', b'_mod_time', '_mode', b'_mode', 'mod_time', b'mod_time', 'mode', b'mode']) 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['_mod_time', b'_mod_time']) Literal['mod_time'] | None
WhichOneof(oneof_group: Literal['_mode', b'_mode']) Literal['mode'] | 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.service.shell.ShellRequest(*, name: str = ..., data_in: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

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
data_in: str
property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

HasField(field_name: Literal['extra', b'extra']) 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.

class viam.proto.service.shell.ShellResponse(*, data_out: str = ..., data_err: str = ..., eof: bool = ...)

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.

data_out: str
data_err: str
eof: bool