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

from annoyclients import index_pb2 as index__pb2


class IndexStub(object):
  """The greeting service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.index = channel.unary_unary(
        '/indexing.Index/index',
        request_serializer=index__pb2.IndexRequest.SerializeToString,
        response_deserializer=index__pb2.IndexReply.FromString,
        )
    self.build = channel.unary_unary(
        '/indexing.Index/build',
        request_serializer=index__pb2.BuildRequest.SerializeToString,
        response_deserializer=index__pb2.BuildReply.FromString,
        )
    self.query = channel.unary_unary(
        '/indexing.Index/query',
        request_serializer=index__pb2.QueryRequest.SerializeToString,
        response_deserializer=index__pb2.QueryReply.FromString,
        )


class IndexServicer(object):
  """The greeting service definition.
  """

  def index(self, request, context):
    """Sends a index request
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def build(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 query(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_IndexServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'index': grpc.unary_unary_rpc_method_handler(
          servicer.index,
          request_deserializer=index__pb2.IndexRequest.FromString,
          response_serializer=index__pb2.IndexReply.SerializeToString,
      ),
      'build': grpc.unary_unary_rpc_method_handler(
          servicer.build,
          request_deserializer=index__pb2.BuildRequest.FromString,
          response_serializer=index__pb2.BuildReply.SerializeToString,
      ),
      'query': grpc.unary_unary_rpc_method_handler(
          servicer.query,
          request_deserializer=index__pb2.QueryRequest.FromString,
          response_serializer=index__pb2.QueryReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'indexing.Index', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
