# 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"""

    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"""

    def Ping(self, request, context):
        """Missing associated documentation comment in .proto file"""
        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"""
        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,))


 # This class is part of an EXPERIMENTAL API.
class KademliaService(object):
    """Missing associated documentation comment in .proto file"""

    @staticmethod
    def Ping(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.comm.discovery.KademliaService/Ping',
            kademlia__pb2.PingRequest.SerializeToString,
            kademlia__pb2.PingResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Lookup(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.comm.discovery.KademliaService/Lookup',
            kademlia__pb2.LookupRequest.SerializeToString,
            kademlia__pb2.LookupResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
