# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from speechly.sal.v1 import evaluator_api_pb2 as speechly_dot_sal_dot_v1_dot_evaluator__api__pb2


class EvaluatorAPIStub(object):
  """Service that implements Speechly SAL Evaluation service.

  The service requires a Speechly API token, which is obtained from Speechly Dashboard (https://speechly.com/dashboard).

  The token acts as a proxy for the user who has generated it,
  i.e. all operations are performed with that user as a subject.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Texts = channel.unary_unary(
        '/speechly.sal.v1.EvaluatorAPI/Texts',
        request_serializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.TextsRequest.SerializeToString,
        response_deserializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.TextsResponse.FromString,
        )
    self.EvalTexts = channel.unary_unary(
        '/speechly.sal.v1.EvaluatorAPI/EvalTexts',
        request_serializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.EvalTextsRequest.SerializeToString,
        response_deserializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.EvalTextsResponse.FromString,
        )


class EvaluatorAPIServicer(object):
  """Service that implements Speechly SAL Evaluation service.

  The service requires a Speechly API token, which is obtained from Speechly Dashboard (https://speechly.com/dashboard).

  The token acts as a proxy for the user who has generated it,
  i.e. all operations are performed with that user as a subject.
  """

  def Texts(self, request, context):
    """Performs recognition of a batch of texts with specified language.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def EvalTexts(self, request, context):
    """Performs recognition of a batch of texts with specified language
    and evaluates it against given ground truth texts.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_EvaluatorAPIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Texts': grpc.unary_unary_rpc_method_handler(
          servicer.Texts,
          request_deserializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.TextsRequest.FromString,
          response_serializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.TextsResponse.SerializeToString,
      ),
      'EvalTexts': grpc.unary_unary_rpc_method_handler(
          servicer.EvalTexts,
          request_deserializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.EvalTextsRequest.FromString,
          response_serializer=speechly_dot_sal_dot_v1_dot_evaluator__api__pb2.EvalTextsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'speechly.sal.v1.EvaluatorAPI', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
