viam.proto.rpc.webrtc.grpc ========================== .. py:module:: viam.proto.rpc.webrtc.grpc .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Classes ------- .. autoapisummary:: viam.proto.rpc.webrtc.grpc.Metadata viam.proto.rpc.webrtc.grpc.PacketMessage viam.proto.rpc.webrtc.grpc.Request viam.proto.rpc.webrtc.grpc.RequestHeaders viam.proto.rpc.webrtc.grpc.RequestMessage viam.proto.rpc.webrtc.grpc.Response viam.proto.rpc.webrtc.grpc.ResponseHeaders viam.proto.rpc.webrtc.grpc.ResponseMessage viam.proto.rpc.webrtc.grpc.ResponseTrailers viam.proto.rpc.webrtc.grpc.Stream viam.proto.rpc.webrtc.grpc.Strings viam.proto.rpc.webrtc.grpc.SignalingServiceBase viam.proto.rpc.webrtc.grpc.SignalingServiceStub viam.proto.rpc.webrtc.grpc.UnimplementedSignalingServiceBase Module Contents --------------- .. py:class:: Metadata(*, md: collections.abc.Mapping[str, Global___Strings] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Metadata is for custom key values provided by a client or server during a stream. .. py:class:: MdEntry(*, key: str = ..., value: Global___Strings | 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:: key :type: str .. py:method:: value() -> Global___Strings .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:method:: md() -> google.protobuf.internal.containers.MessageMap[str, Global___Strings] .. py:class:: PacketMessage(*, data: bytes = ..., eom: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` A PacketMessage is used to packetize large messages (> 64KiB) to be able to safely transmit over WebRTC data channels. .. py:attribute:: data :type: bytes .. py:attribute:: eom :type: bool .. py:class:: Request(*, stream: Global___Stream | None = ..., headers: Global___RequestHeaders | None = ..., message: Global___RequestMessage | None = ..., rst_stream: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` A Request is a frame coming from a client. It is always associated with a stream where the client assigns the stream identifier. Servers will drop frames where the stream identifier has no association (if a non-header frames are sent). .. py:attribute:: rst_stream :type: bool .. py:method:: stream() -> Global___Stream .. py:method:: headers() -> Global___RequestHeaders .. py:method:: message() -> Global___RequestMessage .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:method:: WhichOneof(oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None Returns the name of the field that is set inside a oneof group. If no field is set, returns None. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: RequestHeaders(*, method: str = ..., metadata: Global___Metadata | None = ..., timeout: google.protobuf.duration_pb2.Duration | None = ...) Bases: :py:obj:`google.protobuf.message.Message` RequestHeaders describe the unary or streaming call to make. .. py:attribute:: method :type: str .. py:method:: metadata() -> Global___Metadata .. py:method:: timeout() -> google.protobuf.duration_pb2.Duration .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:: RequestMessage(*, has_message: bool = ..., packet_message: Global___PacketMessage | None = ..., eos: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` A RequestMessage contains individual gRPC messages and a potential end-of-stream (EOS) marker. .. py:attribute:: has_message :type: bool .. py:attribute:: eos :type: bool .. py:method:: packet_message() -> Global___PacketMessage .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:: Response(*, stream: Global___Stream | None = ..., headers: Global___ResponseHeaders | None = ..., message: Global___ResponseMessage | None = ..., trailers: Global___ResponseTrailers | None = ...) Bases: :py:obj:`google.protobuf.message.Message` A Response is a frame coming from a server. It is always associated with a stream where the client assigns the stream identifier. Clients will drop frames where the stream identifier has no association. .. py:method:: stream() -> Global___Stream .. py:method:: headers() -> Global___ResponseHeaders .. py:method:: message() -> Global___ResponseMessage .. py:method:: trailers() -> Global___ResponseTrailers .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:method:: WhichOneof(oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None Returns the name of the field that is set inside a oneof group. If no field is set, returns None. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: ResponseHeaders(*, metadata: Global___Metadata | None = ...) Bases: :py:obj:`google.protobuf.message.Message` ResponseHeaders contain custom metadata that are sent to the client before any message or trailers (unless only trailers are sent). .. py:method:: metadata() -> Global___Metadata .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:: ResponseMessage(*, packet_message: Global___PacketMessage | None = ...) Bases: :py:obj:`google.protobuf.message.Message` ResponseMessage contains the data of a response to a call. .. py:method:: packet_message() -> Global___PacketMessage .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:: ResponseTrailers(*, status: google.rpc.status_pb2.Status | None = ..., metadata: Global___Metadata | None = ...) Bases: :py:obj:`google.protobuf.message.Message` ResponseTrailers contain the status of a response and any custom metadata. .. py:method:: status() -> google.rpc.status_pb2.Status .. py:method:: metadata() -> Global___Metadata .. py:method:: HasField(field_name: _HasFieldArgType) -> 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:: Stream(*, id: int = ...) Bases: :py:obj:`google.protobuf.message.Message` A Stream represents an instance of a gRPC stream between a client and a server. .. py:attribute:: id :type: int .. py:class:: Strings(*, values: collections.abc.Iterable[str] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Strings are a series of values. .. py:method:: values() -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[str] .. py:class:: SignalingServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: Call(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.CallRequest, proto.rpc.webrtc.v1.signaling_pb2.CallResponse]) -> None :abstractmethod: :async: .. py:method:: CallUpdate(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.CallUpdateRequest, proto.rpc.webrtc.v1.signaling_pb2.CallUpdateResponse]) -> None :abstractmethod: :async: .. py:method:: Answer(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.AnswerResponse, proto.rpc.webrtc.v1.signaling_pb2.AnswerRequest]) -> None :abstractmethod: :async: .. py:method:: OptionalWebRTCConfig(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.OptionalWebRTCConfigRequest, proto.rpc.webrtc.v1.signaling_pb2.OptionalWebRTCConfigResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: SignalingServiceStub(channel: grpclib.client.Channel) .. py:attribute:: Call .. py:attribute:: CallUpdate .. py:attribute:: Answer .. py:attribute:: OptionalWebRTCConfig .. py:class:: UnimplementedSignalingServiceBase Bases: :py:obj:`SignalingServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: Call(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.CallRequest, proto.rpc.webrtc.v1.signaling_pb2.CallResponse]) -> None :async: .. py:method:: CallUpdate(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.CallUpdateRequest, proto.rpc.webrtc.v1.signaling_pb2.CallUpdateResponse]) -> None :async: .. py:method:: Answer(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.AnswerResponse, proto.rpc.webrtc.v1.signaling_pb2.AnswerRequest]) -> None :async: .. py:method:: OptionalWebRTCConfig(stream: grpclib.server.Stream[proto.rpc.webrtc.v1.signaling_pb2.OptionalWebRTCConfigRequest, proto.rpc.webrtc.v1.signaling_pb2.OptionalWebRTCConfigResponse]) -> None :async: