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

from cogneed_protos.ai.cogneed.api.trainui import sentence_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_sentence__pb2
from cogneed_protos.ai.cogneed.api.trainui import tasks_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2


class TasksServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.get_progress = channel.unary_unary(
        '/ai.cogneed.api.trainui.tasks.TasksService/get_progress',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.TaskRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.Progress.FromString,
        )
    self.get_next = channel.unary_unary(
        '/ai.cogneed.api.trainui.tasks.TasksService/get_next',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.TaskRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_sentence__pb2.Sentence.FromString,
        )


class TasksServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def get_progress(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def get_next(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TasksServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'get_progress': grpc.unary_unary_rpc_method_handler(
          servicer.get_progress,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.TaskRequest.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.Progress.SerializeToString,
      ),
      'get_next': grpc.unary_unary_rpc_method_handler(
          servicer.get_next,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_tasks__pb2.TaskRequest.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_trainui_dot_sentence__pb2.Sentence.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.api.trainui.tasks.TasksService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
