# 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 biohead_command_pb2 as cmvr_dot_api_dot_biohead__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/biohead_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 BioHeadServiceStub:
    """生物头部机器人服务接口
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetExpression = channel.unary_unary(
                '/cmvr.api.BioHeadService/SetExpression',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Feedback.FromString,
                _registered_method=True)
        self.StreamExpression = channel.stream_stream(
                '/cmvr.api.BioHeadService/StreamExpression',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Feedback.FromString,
                _registered_method=True)
        self.GetSystemStatus = channel.unary_unary(
                '/cmvr.api.BioHeadService/GetSystemStatus',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Feedback.FromString,
                _registered_method=True)
        self.EmergencyStop = channel.unary_unary(
                '/cmvr.api.BioHeadService/EmergencyStop',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Feedback.FromString,
                _registered_method=True)
        self.SpeakStart = channel.unary_unary(
                '/cmvr.api.BioHeadService/SpeakStart',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStart.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStart.Feedback.FromString,
                _registered_method=True)
        self.SpeakStop = channel.unary_unary(
                '/cmvr.api.BioHeadService/SpeakStop',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStop.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStop.Feedback.FromString,
                _registered_method=True)
        self.Happy = channel.unary_unary(
                '/cmvr.api.BioHeadService/Happy',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.Happy.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.Happy.Feedback.FromString,
                _registered_method=True)
        self.Surprise = channel.unary_unary(
                '/cmvr.api.BioHeadService/Surprise',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.Surprise.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.Surprise.Feedback.FromString,
                _registered_method=True)
        self.ExpressionTired = channel.unary_unary(
                '/cmvr.api.BioHeadService/ExpressionTired',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionTired.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionTired.Feedback.FromString,
                _registered_method=True)
        self.ExpressionAngry = channel.unary_unary(
                '/cmvr.api.BioHeadService/ExpressionAngry',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionAngry.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionAngry.Feedback.FromString,
                _registered_method=True)
        self.ExpressionSadness = channel.unary_unary(
                '/cmvr.api.BioHeadService/ExpressionSadness',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionSadness.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionSadness.Feedback.FromString,
                _registered_method=True)
        self.ExpressionYawn = channel.unary_unary(
                '/cmvr.api.BioHeadService/ExpressionYawn',
                request_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionYawn.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionYawn.Feedback.FromString,
                _registered_method=True)


class BioHeadServiceServicer:
    """生物头部机器人服务接口
    """

    def SetExpression(self, request, context):
        """设置面部表情
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamExpression(self, request_iterator, context):
        """流式表情控制
        rpc StreamExpression(StreamFacialExpression.Request) returns (StreamFacialExpression.Feedback){};

        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSystemStatus(self, request, context):
        """获取状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EmergencyStop(self, request, context):
        """紧急停止
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpeakStart(self, request, context):
        """开始说话
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpeakStop(self, request, context):
        """停止说话
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Happy(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 Surprise(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 ExpressionTired(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 ExpressionAngry(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 ExpressionSadness(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 ExpressionYawn(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_BioHeadServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetExpression': grpc.unary_unary_rpc_method_handler(
                    servicer.SetExpression,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Feedback.SerializeToString,
            ),
            'StreamExpression': grpc.stream_stream_rpc_method_handler(
                    servicer.StreamExpression,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Feedback.SerializeToString,
            ),
            'GetSystemStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSystemStatus,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Feedback.SerializeToString,
            ),
            'EmergencyStop': grpc.unary_unary_rpc_method_handler(
                    servicer.EmergencyStop,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Feedback.SerializeToString,
            ),
            'SpeakStart': grpc.unary_unary_rpc_method_handler(
                    servicer.SpeakStart,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStart.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStart.Feedback.SerializeToString,
            ),
            'SpeakStop': grpc.unary_unary_rpc_method_handler(
                    servicer.SpeakStop,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStop.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.SpeakStop.Feedback.SerializeToString,
            ),
            'Happy': grpc.unary_unary_rpc_method_handler(
                    servicer.Happy,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.Happy.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.Happy.Feedback.SerializeToString,
            ),
            'Surprise': grpc.unary_unary_rpc_method_handler(
                    servicer.Surprise,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.Surprise.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.Surprise.Feedback.SerializeToString,
            ),
            'ExpressionTired': grpc.unary_unary_rpc_method_handler(
                    servicer.ExpressionTired,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionTired.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionTired.Feedback.SerializeToString,
            ),
            'ExpressionAngry': grpc.unary_unary_rpc_method_handler(
                    servicer.ExpressionAngry,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionAngry.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionAngry.Feedback.SerializeToString,
            ),
            'ExpressionSadness': grpc.unary_unary_rpc_method_handler(
                    servicer.ExpressionSadness,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionSadness.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionSadness.Feedback.SerializeToString,
            ),
            'ExpressionYawn': grpc.unary_unary_rpc_method_handler(
                    servicer.ExpressionYawn,
                    request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionYawn.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_biohead__command__pb2.ExpressionYawn.Feedback.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cmvr.api.BioHeadService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cmvr.api.BioHeadService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class BioHeadService:
    """生物头部机器人服务接口
    """

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

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

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

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

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

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

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

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

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

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

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

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