# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from net.rpc import rpc_pb2 as net_dot_rpc_dot_rpc__pb2


class RPCServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListenAddr = channel.unary_unary(
                '/net.rpc.RPCService/ListenAddr',
                request_serializer=net_dot_rpc_dot_rpc__pb2.ListenAddrRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.ListenAddrResponse.FromString,
                )
        self.Peers = channel.unary_unary(
                '/net.rpc.RPCService/Peers',
                request_serializer=net_dot_rpc_dot_rpc__pb2.PeersRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.PeersResponse.FromString,
                )
        self.FindPeer = channel.unary_unary(
                '/net.rpc.RPCService/FindPeer',
                request_serializer=net_dot_rpc_dot_rpc__pb2.FindPeerRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.FindPeerResponse.FromString,
                )
        self.ConnectPeer = channel.unary_unary(
                '/net.rpc.RPCService/ConnectPeer',
                request_serializer=net_dot_rpc_dot_rpc__pb2.ConnectPeerRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.ConnectPeerResponse.FromString,
                )
        self.DisconnectPeer = channel.unary_unary(
                '/net.rpc.RPCService/DisconnectPeer',
                request_serializer=net_dot_rpc_dot_rpc__pb2.DisconnectPeerRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.DisconnectPeerResponse.FromString,
                )
        self.Connectedness = channel.unary_unary(
                '/net.rpc.RPCService/Connectedness',
                request_serializer=net_dot_rpc_dot_rpc__pb2.ConnectednessRequest.SerializeToString,
                response_deserializer=net_dot_rpc_dot_rpc__pb2.ConnectednessResponse.FromString,
                )


class RPCServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def ListenAddr(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 Peers(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 FindPeer(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 ConnectPeer(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 DisconnectPeer(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 Connectedness(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_RPCServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListenAddr': grpc.unary_unary_rpc_method_handler(
                    servicer.ListenAddr,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.ListenAddrRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.ListenAddrResponse.SerializeToString,
            ),
            'Peers': grpc.unary_unary_rpc_method_handler(
                    servicer.Peers,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.PeersRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.PeersResponse.SerializeToString,
            ),
            'FindPeer': grpc.unary_unary_rpc_method_handler(
                    servicer.FindPeer,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.FindPeerRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.FindPeerResponse.SerializeToString,
            ),
            'ConnectPeer': grpc.unary_unary_rpc_method_handler(
                    servicer.ConnectPeer,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.ConnectPeerRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.ConnectPeerResponse.SerializeToString,
            ),
            'DisconnectPeer': grpc.unary_unary_rpc_method_handler(
                    servicer.DisconnectPeer,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.DisconnectPeerRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.DisconnectPeerResponse.SerializeToString,
            ),
            'Connectedness': grpc.unary_unary_rpc_method_handler(
                    servicer.Connectedness,
                    request_deserializer=net_dot_rpc_dot_rpc__pb2.ConnectednessRequest.FromString,
                    response_serializer=net_dot_rpc_dot_rpc__pb2.ConnectednessResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'net.rpc.RPCService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListenAddr(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, '/net.rpc.RPCService/ListenAddr',
            net_dot_rpc_dot_rpc__pb2.ListenAddrRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.ListenAddrResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Peers(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, '/net.rpc.RPCService/Peers',
            net_dot_rpc_dot_rpc__pb2.PeersRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.PeersResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FindPeer(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, '/net.rpc.RPCService/FindPeer',
            net_dot_rpc_dot_rpc__pb2.FindPeerRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.FindPeerResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ConnectPeer(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, '/net.rpc.RPCService/ConnectPeer',
            net_dot_rpc_dot_rpc__pb2.ConnectPeerRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.ConnectPeerResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DisconnectPeer(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, '/net.rpc.RPCService/DisconnectPeer',
            net_dot_rpc_dot_rpc__pb2.DisconnectPeerRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.DisconnectPeerResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Connectedness(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, '/net.rpc.RPCService/Connectedness',
            net_dot_rpc_dot_rpc__pb2.ConnectednessRequest.SerializeToString,
            net_dot_rpc_dot_rpc__pb2.ConnectednessResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
