# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from cmvr.api import dexhand_command_pb2 as cmvr_dot_api_dot_dexhand__command__pb2

GRPC_GENERATED_VERSION = '1.81.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in cmvr/api/dexhand_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class DexHandServiceStub:
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.GetStatus = channel.unary_unary(
                '/cmvr.api.DexHandService/GetStatus',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.FromString,
                _registered_method=True)
        self.SetDexHandPos = channel.unary_unary(
                '/cmvr.api.DexHandService/SetDexHandPos',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.FromString,
                _registered_method=True)
        self.SetDexHandAngle = channel.unary_unary(
                '/cmvr.api.DexHandService/SetDexHandAngle',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.FromString,
                _registered_method=True)
        self.SetDexHandForce = channel.unary_unary(
                '/cmvr.api.DexHandService/SetDexHandForce',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.FromString,
                _registered_method=True)
        self.SetDexHandSpeed = channel.unary_unary(
                '/cmvr.api.DexHandService/SetDexHandSpeed',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.FromString,
                _registered_method=True)
        self.SetDexHandPresetAct = channel.unary_unary(
                '/cmvr.api.DexHandService/SetDexHandPresetAct',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.FromString,
                _registered_method=True)
        self.GetSensorData = channel.unary_unary(
                '/cmvr.api.DexHandService/GetSensorData',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.FromString,
                _registered_method=True)
        self.GetSensorDataStream = channel.stream_stream(
                '/cmvr.api.DexHandService/GetSensorDataStream',
                request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.FromString,
                _registered_method=True)


class DexHandServiceServicer:
    """Missing associated documentation comment in .proto file."""

    def GetStatus(self, request, context):
        """基本控制
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetDexHandPos(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetDexHandAngle(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetDexHandForce(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetDexHandSpeed(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetDexHandPresetAct(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSensorData(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSensorDataStream(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DexHandServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.SerializeToString,
            ),
            'SetDexHandPos': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDexHandPos,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.SerializeToString,
            ),
            'SetDexHandAngle': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDexHandAngle,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.SerializeToString,
            ),
            'SetDexHandForce': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDexHandForce,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.SerializeToString,
            ),
            'SetDexHandSpeed': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDexHandSpeed,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.SerializeToString,
            ),
            'SetDexHandPresetAct': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDexHandPresetAct,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.SerializeToString,
            ),
            'GetSensorData': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSensorData,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.SerializeToString,
            ),
            'GetSensorDataStream': grpc.stream_stream_rpc_method_handler(
                    servicer.GetSensorDataStream,
                    request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cmvr.api.DexHandService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cmvr.api.DexHandService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class DexHandService:
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetStatus(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/GetStatus',
            cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetDexHandPos(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/SetDexHandPos',
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetDexHandAngle(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/SetDexHandAngle',
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetDexHandForce(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/SetDexHandForce',
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetDexHandSpeed(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/SetDexHandSpeed',
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetDexHandPresetAct(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/SetDexHandPresetAct',
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSensorData(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/cmvr.api.DexHandService/GetSensorData',
            cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSensorDataStream(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/cmvr.api.DexHandService/GetSensorDataStream',
            cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.SerializeToString,
            cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
