# 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 speaker_command_pb2 as cmvr_dot_api_dot_speaker__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/speaker_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 SpeakerServiceStub:
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetStatus = channel.unary_unary(
                '/cmvr.api.SpeakerService/GetStatus',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.FromString,
                _registered_method=True)
        self.PlayAudio = channel.unary_unary(
                '/cmvr.api.SpeakerService/PlayAudio',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Feedback.FromString,
                _registered_method=True)
        self.StopPlayback = channel.unary_unary(
                '/cmvr.api.SpeakerService/StopPlayback',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Feedback.FromString,
                _registered_method=True)
        self.PausePlayback = channel.unary_unary(
                '/cmvr.api.SpeakerService/PausePlayback',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Feedback.FromString,
                _registered_method=True)
        self.ResumePlayback = channel.unary_unary(
                '/cmvr.api.SpeakerService/ResumePlayback',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Feedback.FromString,
                _registered_method=True)
        self.SetVolume = channel.unary_unary(
                '/cmvr.api.SpeakerService/SetVolume',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Feedback.FromString,
                _registered_method=True)
        self.GetVolume = channel.unary_unary(
                '/cmvr.api.SpeakerService/GetVolume',
                request_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Request.SerializeToString,
                response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Feedback.FromString,
                _registered_method=True)


class SpeakerServiceServicer:
    """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 PlayAudio(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 StopPlayback(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 PausePlayback(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 ResumePlayback(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 SetVolume(self, request, context):
        """音量控制
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetVolume(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_SpeakerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.SerializeToString,
            ),
            'PlayAudio': grpc.unary_unary_rpc_method_handler(
                    servicer.PlayAudio,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Feedback.SerializeToString,
            ),
            'StopPlayback': grpc.unary_unary_rpc_method_handler(
                    servicer.StopPlayback,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Feedback.SerializeToString,
            ),
            'PausePlayback': grpc.unary_unary_rpc_method_handler(
                    servicer.PausePlayback,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Feedback.SerializeToString,
            ),
            'ResumePlayback': grpc.unary_unary_rpc_method_handler(
                    servicer.ResumePlayback,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Feedback.SerializeToString,
            ),
            'SetVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.SetVolume,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Feedback.SerializeToString,
            ),
            'GetVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.GetVolume,
                    request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Request.FromString,
                    response_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Feedback.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cmvr.api.SpeakerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cmvr.api.SpeakerService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SpeakerService:
    """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.SpeakerService/GetStatus',
            cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.SerializeToString,
            cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

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

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

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

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

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

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