# 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 arm_command_pb2 as cmvr_dot_api_dot_arm__command__pb2
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__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/arm_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 ArmServiceStub:
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.torqueOff = channel.unary_unary(
                '/cmvr.api.ArmService/torqueOff',
                request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
                _registered_method=True)
        self.torqueOn = channel.unary_unary(
                '/cmvr.api.ArmService/torqueOn',
                request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
                _registered_method=True)
        self.moveJ = channel.unary_unary(
                '/cmvr.api.ArmService/moveJ',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.MoveJ.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.MoveJ.Response.FromString,
                _registered_method=True)
        self.moveL = channel.unary_unary(
                '/cmvr.api.ArmService/moveL',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.MoveL.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.MoveL.Response.FromString,
                _registered_method=True)
        self.speedJ = channel.unary_unary(
                '/cmvr.api.ArmService/speedJ',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Response.FromString,
                _registered_method=True)
        self.speedL = channel.unary_unary(
                '/cmvr.api.ArmService/speedL',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.SpeedL.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.SpeedL.Response.FromString,
                _registered_method=True)
        self.servoJ = channel.unary_unary(
                '/cmvr.api.ArmService/servoJ',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.ServoJ.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.ServoJ.Response.FromString,
                _registered_method=True)
        self.stopMotion = channel.unary_unary(
                '/cmvr.api.ArmService/stopMotion',
                request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
                _registered_method=True)
        self.getJointState = channel.unary_unary(
                '/cmvr.api.ArmService/getJointState',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.JointRequest.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.JointResponse.FromString,
                _registered_method=True)
        self.getPose = channel.unary_unary(
                '/cmvr.api.ArmService/getPose',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.GetPose.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.GetPose.Response.FromString,
                _registered_method=True)
        self.calibrateZeroQ = channel.unary_unary(
                '/cmvr.api.ArmService/calibrateZeroQ',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Response.FromString,
                _registered_method=True)
        self.getPoseMatrix = channel.unary_unary(
                '/cmvr.api.ArmService/getPoseMatrix',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Response.FromString,
                _registered_method=True)
        self.computeForwardKinematics = channel.unary_unary(
                '/cmvr.api.ArmService/computeForwardKinematics',
                request_serializer=cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Response.FromString,
                _registered_method=True)


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

    def torqueOff(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 torqueOn(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 moveJ(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 moveL(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 speedJ(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 speedL(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 servoJ(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 stopMotion(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 getJointState(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 getPose(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 calibrateZeroQ(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 getPoseMatrix(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 computeForwardKinematics(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 add_ArmServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'torqueOff': grpc.unary_unary_rpc_method_handler(
                    servicer.torqueOff,
                    request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
            ),
            'torqueOn': grpc.unary_unary_rpc_method_handler(
                    servicer.torqueOn,
                    request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
            ),
            'moveJ': grpc.unary_unary_rpc_method_handler(
                    servicer.moveJ,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.MoveJ.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.MoveJ.Response.SerializeToString,
            ),
            'moveL': grpc.unary_unary_rpc_method_handler(
                    servicer.moveL,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.MoveL.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.MoveL.Response.SerializeToString,
            ),
            'speedJ': grpc.unary_unary_rpc_method_handler(
                    servicer.speedJ,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Response.SerializeToString,
            ),
            'speedL': grpc.unary_unary_rpc_method_handler(
                    servicer.speedL,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.SpeedL.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.SpeedL.Response.SerializeToString,
            ),
            'servoJ': grpc.unary_unary_rpc_method_handler(
                    servicer.servoJ,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.ServoJ.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.ServoJ.Response.SerializeToString,
            ),
            'stopMotion': grpc.unary_unary_rpc_method_handler(
                    servicer.stopMotion,
                    request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
            ),
            'getJointState': grpc.unary_unary_rpc_method_handler(
                    servicer.getJointState,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.JointRequest.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.JointResponse.SerializeToString,
            ),
            'getPose': grpc.unary_unary_rpc_method_handler(
                    servicer.getPose,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.GetPose.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.GetPose.Response.SerializeToString,
            ),
            'calibrateZeroQ': grpc.unary_unary_rpc_method_handler(
                    servicer.calibrateZeroQ,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Response.SerializeToString,
            ),
            'getPoseMatrix': grpc.unary_unary_rpc_method_handler(
                    servicer.getPoseMatrix,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Response.SerializeToString,
            ),
            'computeForwardKinematics': grpc.unary_unary_rpc_method_handler(
                    servicer.computeForwardKinematics,
                    request_deserializer=cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cmvr.api.ArmService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cmvr.api.ArmService', rpc_method_handlers)


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

    @staticmethod
    def torqueOff(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.ArmService/torqueOff',
            cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
            cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def torqueOn(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.ArmService/torqueOn',
            cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
            cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def moveJ(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.ArmService/moveJ',
            cmvr_dot_api_dot_arm__command__pb2.MoveJ.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.MoveJ.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def moveL(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.ArmService/moveL',
            cmvr_dot_api_dot_arm__command__pb2.MoveL.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.MoveL.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def speedJ(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.ArmService/speedJ',
            cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.SpeedJ.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def speedL(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.ArmService/speedL',
            cmvr_dot_api_dot_arm__command__pb2.SpeedL.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.SpeedL.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def servoJ(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.ArmService/servoJ',
            cmvr_dot_api_dot_arm__command__pb2.ServoJ.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.ServoJ.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def stopMotion(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.ArmService/stopMotion',
            cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
            cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getJointState(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.ArmService/getJointState',
            cmvr_dot_api_dot_arm__command__pb2.JointRequest.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.JointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getPose(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.ArmService/getPose',
            cmvr_dot_api_dot_arm__command__pb2.GetPose.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.GetPose.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def calibrateZeroQ(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.ArmService/calibrateZeroQ',
            cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.CalibrateZeroQ.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getPoseMatrix(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.ArmService/getPoseMatrix',
            cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.GetPoseMatrix.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def computeForwardKinematics(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.ArmService/computeForwardKinematics',
            cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Request.SerializeToString,
            cmvr_dot_api_dot_arm__command__pb2.ComputeForwardKinematics.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
