viam.proto.component.switch =========================== .. py:module:: viam.proto.component.switch .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Classes ------- .. autoapisummary:: viam.proto.component.switch.SwitchServiceBase viam.proto.component.switch.SwitchServiceStub viam.proto.component.switch.UnimplementedSwitchServiceBase viam.proto.component.switch.GetNumberOfPositionsRequest viam.proto.component.switch.GetNumberOfPositionsResponse viam.proto.component.switch.GetPositionRequest viam.proto.component.switch.GetPositionResponse viam.proto.component.switch.SetPositionRequest viam.proto.component.switch.SetPositionResponse Package Contents ---------------- .. py:class:: SwitchServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: SetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.SetPositionRequest, component.switch.v1.switch_pb2.SetPositionResponse]) -> None :abstractmethod: :async: .. py:method:: GetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetPositionRequest, component.switch.v1.switch_pb2.GetPositionResponse]) -> None :abstractmethod: :async: .. py:method:: GetNumberOfPositions(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetNumberOfPositionsRequest, component.switch.v1.switch_pb2.GetNumberOfPositionsResponse]) -> None :abstractmethod: :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: SwitchServiceStub(channel: grpclib.client.Channel) .. py:attribute:: SetPosition .. py:attribute:: GetPosition .. py:attribute:: GetNumberOfPositions .. py:attribute:: DoCommand .. py:class:: UnimplementedSwitchServiceBase Bases: :py:obj:`SwitchServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: SetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.SetPositionRequest, component.switch.v1.switch_pb2.SetPositionResponse]) -> None :async: .. py:method:: GetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetPositionRequest, component.switch.v1.switch_pb2.GetPositionResponse]) -> None :async: .. py:method:: GetNumberOfPositions(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetNumberOfPositionsRequest, component.switch.v1.switch_pb2.GetNumberOfPositionsResponse]) -> None :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :async: .. py:class:: GetNumberOfPositionsRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:attribute:: name :type: str .. py:property:: extra :type: google.protobuf.struct_pb2.Struct .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetNumberOfPositionsResponse(*, number_of_positions: int = ...) Bases: :py:obj:`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. .. py:attribute:: number_of_positions :type: int .. py:class:: GetPositionRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:attribute:: name :type: str .. py:property:: extra :type: google.protobuf.struct_pb2.Struct .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetPositionResponse(*, position: int = ...) Bases: :py:obj:`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. .. py:attribute:: position :type: int .. py:class:: SetPositionRequest(*, name: str = ..., position: int = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:attribute:: name :type: str .. py:attribute:: position :type: int .. py:property:: extra :type: google.protobuf.struct_pb2.Struct .. py: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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: SetPositionResponse Bases: :py:obj:`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.