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

import todo_pb2 as todo__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetAllTodos = channel.unary_unary(
        '/TodoService/GetAllTodos',
        request_serializer=todo__pb2.EmptyRequest.SerializeToString,
        response_deserializer=todo__pb2.TodoList.FromString,
        )
    self.AddTodo = channel.unary_unary(
        '/TodoService/AddTodo',
        request_serializer=todo__pb2.Todo.SerializeToString,
        response_deserializer=todo__pb2.OperationResponse.FromString,
        )
    self.UpdateTodo = channel.unary_unary(
        '/TodoService/UpdateTodo',
        request_serializer=todo__pb2.Todo.SerializeToString,
        response_deserializer=todo__pb2.OperationResponse.FromString,
        )
    self.DeleteTodo = channel.unary_unary(
        '/TodoService/DeleteTodo',
        request_serializer=todo__pb2.Todo.SerializeToString,
        response_deserializer=todo__pb2.OperationResponse.FromString,
        )


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

  def GetAllTodos(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 AddTodo(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 UpdateTodo(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 DeleteTodo(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_TodoServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetAllTodos': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllTodos,
          request_deserializer=todo__pb2.EmptyRequest.FromString,
          response_serializer=todo__pb2.TodoList.SerializeToString,
      ),
      'AddTodo': grpc.unary_unary_rpc_method_handler(
          servicer.AddTodo,
          request_deserializer=todo__pb2.Todo.FromString,
          response_serializer=todo__pb2.OperationResponse.SerializeToString,
      ),
      'UpdateTodo': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateTodo,
          request_deserializer=todo__pb2.Todo.FromString,
          response_serializer=todo__pb2.OperationResponse.SerializeToString,
      ),
      'DeleteTodo': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteTodo,
          request_deserializer=todo__pb2.Todo.FromString,
          response_serializer=todo__pb2.OperationResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'TodoService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
