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

from task_service import task_service_pb2 as task__service_dot_task__service__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.RequestTask = channel.unary_unary(
        '/task_service.TaskService/RequestTask',
        request_serializer=task__service_dot_task__service__pb2.TaskRequest.SerializeToString,
        response_deserializer=task__service_dot_task__service__pb2.Task.FromString,
        )


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

  def RequestTask(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_TaskServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'RequestTask': grpc.unary_unary_rpc_method_handler(
          servicer.RequestTask,
          request_deserializer=task__service_dot_task__service__pb2.TaskRequest.FromString,
          response_serializer=task__service_dot_task__service__pb2.Task.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'task_service.TaskService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
