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

from grakn_protocol.protobuf.cluster import cluster_pb2 as protobuf_dot_cluster_dot_cluster__pb2
from grakn_protocol.protobuf.cluster import database_pb2 as protobuf_dot_cluster_dot_database__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.cluster_servers = channel.unary_unary(
        '/grakn.protocol.cluster.GraknCluster/cluster_servers',
        request_serializer=protobuf_dot_cluster_dot_cluster__pb2.Cluster.Servers.Req.SerializeToString,
        response_deserializer=protobuf_dot_cluster_dot_cluster__pb2.Cluster.Servers.Res.FromString,
        )
    self.database_get = channel.unary_unary(
        '/grakn.protocol.cluster.GraknCluster/database_get',
        request_serializer=protobuf_dot_cluster_dot_database__pb2.Database.Get.Req.SerializeToString,
        response_deserializer=protobuf_dot_cluster_dot_database__pb2.Database.Get.Res.FromString,
        )
    self.database_all = channel.unary_unary(
        '/grakn.protocol.cluster.GraknCluster/database_all',
        request_serializer=protobuf_dot_cluster_dot_database__pb2.Database.All.Req.SerializeToString,
        response_deserializer=protobuf_dot_cluster_dot_database__pb2.Database.All.Res.FromString,
        )


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

  def cluster_servers(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 database_get(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 database_all(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_GraknClusterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'cluster_servers': grpc.unary_unary_rpc_method_handler(
          servicer.cluster_servers,
          request_deserializer=protobuf_dot_cluster_dot_cluster__pb2.Cluster.Servers.Req.FromString,
          response_serializer=protobuf_dot_cluster_dot_cluster__pb2.Cluster.Servers.Res.SerializeToString,
      ),
      'database_get': grpc.unary_unary_rpc_method_handler(
          servicer.database_get,
          request_deserializer=protobuf_dot_cluster_dot_database__pb2.Database.Get.Req.FromString,
          response_serializer=protobuf_dot_cluster_dot_database__pb2.Database.Get.Res.SerializeToString,
      ),
      'database_all': grpc.unary_unary_rpc_method_handler(
          servicer.database_all,
          request_deserializer=protobuf_dot_cluster_dot_database__pb2.Database.All.Req.FromString,
          response_serializer=protobuf_dot_cluster_dot_database__pb2.Database.All.Res.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grakn.protocol.cluster.GraknCluster', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
