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

from anndb import cluster_pb2 as anndb_dot_cluster__pb2
from anndb import core_pb2 as anndb_dot_core__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListNodes = channel.unary_stream(
        '/anndb_pb.NodesManager/ListNodes',
        request_serializer=anndb_dot_core__pb2.EmptyMessage.SerializeToString,
        response_deserializer=anndb_dot_cluster__pb2.Node.FromString,
        )
    self.AddNode = channel.unary_stream(
        '/anndb_pb.NodesManager/AddNode',
        request_serializer=anndb_dot_cluster__pb2.Node.SerializeToString,
        response_deserializer=anndb_dot_cluster__pb2.Node.FromString,
        )
    self.RemoveNode = channel.unary_unary(
        '/anndb_pb.NodesManager/RemoveNode',
        request_serializer=anndb_dot_cluster__pb2.Node.SerializeToString,
        response_deserializer=anndb_dot_core__pb2.EmptyMessage.FromString,
        )


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

  def ListNodes(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 AddNode(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 RemoveNode(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_NodesManagerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListNodes': grpc.unary_stream_rpc_method_handler(
          servicer.ListNodes,
          request_deserializer=anndb_dot_core__pb2.EmptyMessage.FromString,
          response_serializer=anndb_dot_cluster__pb2.Node.SerializeToString,
      ),
      'AddNode': grpc.unary_stream_rpc_method_handler(
          servicer.AddNode,
          request_deserializer=anndb_dot_cluster__pb2.Node.FromString,
          response_serializer=anndb_dot_cluster__pb2.Node.SerializeToString,
      ),
      'RemoveNode': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveNode,
          request_deserializer=anndb_dot_cluster__pb2.Node.FromString,
          response_serializer=anndb_dot_core__pb2.EmptyMessage.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'anndb_pb.NodesManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
