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

from . import kademlia_pb2 as kademlia__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Ping = channel.unary_unary(
        '/io.casperlabs.comm.discovery.KademliaService/Ping',
        request_serializer=kademlia__pb2.PingRequest.SerializeToString,
        response_deserializer=kademlia__pb2.PingResponse.FromString,
        )
    self.Lookup = channel.unary_unary(
        '/io.casperlabs.comm.discovery.KademliaService/Lookup',
        request_serializer=kademlia__pb2.LookupRequest.SerializeToString,
        response_deserializer=kademlia__pb2.LookupResponse.FromString,
        )


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

  def Ping(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 Lookup(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_KademliaServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=kademlia__pb2.PingRequest.FromString,
          response_serializer=kademlia__pb2.PingResponse.SerializeToString,
      ),
      'Lookup': grpc.unary_unary_rpc_method_handler(
          servicer.Lookup,
          request_deserializer=kademlia__pb2.LookupRequest.FromString,
          response_serializer=kademlia__pb2.LookupResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'io.casperlabs.comm.discovery.KademliaService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
