# 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 cline_core.proto.cline import common_pb2 as cline_dot_common__pb2
from cline_core.proto.cline import dictation_pb2 as cline_dot_dictation__pb2

GRPC_GENERATED_VERSION = '1.76.0'
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 cline/dictation_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 DictationServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.startRecording = channel.unary_unary(
                '/cline.DictationService/startRecording',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_dictation__pb2.RecordingResult.FromString,
                _registered_method=True)
        self.stopRecording = channel.unary_unary(
                '/cline.DictationService/stopRecording',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_dictation__pb2.RecordedAudio.FromString,
                _registered_method=True)
        self.cancelRecording = channel.unary_unary(
                '/cline.DictationService/cancelRecording',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_dictation__pb2.RecordingResult.FromString,
                _registered_method=True)
        self.getRecordingStatus = channel.unary_unary(
                '/cline.DictationService/getRecordingStatus',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_dictation__pb2.RecordingStatus.FromString,
                _registered_method=True)
        self.transcribeAudio = channel.unary_unary(
                '/cline.DictationService/transcribeAudio',
                request_serializer=cline_dot_dictation__pb2.TranscribeAudioRequest.SerializeToString,
                response_deserializer=cline_dot_dictation__pb2.Transcription.FromString,
                _registered_method=True)


class DictationServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def startRecording(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 stopRecording(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 cancelRecording(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 getRecordingStatus(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 transcribeAudio(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_DictationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'startRecording': grpc.unary_unary_rpc_method_handler(
                    servicer.startRecording,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_dictation__pb2.RecordingResult.SerializeToString,
            ),
            'stopRecording': grpc.unary_unary_rpc_method_handler(
                    servicer.stopRecording,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_dictation__pb2.RecordedAudio.SerializeToString,
            ),
            'cancelRecording': grpc.unary_unary_rpc_method_handler(
                    servicer.cancelRecording,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_dictation__pb2.RecordingResult.SerializeToString,
            ),
            'getRecordingStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.getRecordingStatus,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_dictation__pb2.RecordingStatus.SerializeToString,
            ),
            'transcribeAudio': grpc.unary_unary_rpc_method_handler(
                    servicer.transcribeAudio,
                    request_deserializer=cline_dot_dictation__pb2.TranscribeAudioRequest.FromString,
                    response_serializer=cline_dot_dictation__pb2.Transcription.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cline.DictationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cline.DictationService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class DictationService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def startRecording(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,
            '/cline.DictationService/startRecording',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_dictation__pb2.RecordingResult.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def stopRecording(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,
            '/cline.DictationService/stopRecording',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_dictation__pb2.RecordedAudio.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def cancelRecording(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,
            '/cline.DictationService/cancelRecording',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_dictation__pb2.RecordingResult.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getRecordingStatus(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,
            '/cline.DictationService/getRecordingStatus',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_dictation__pb2.RecordingStatus.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def transcribeAudio(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,
            '/cline.DictationService/transcribeAudio',
            cline_dot_dictation__pb2.TranscribeAudioRequest.SerializeToString,
            cline_dot_dictation__pb2.Transcription.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
