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

from . import diagnostics_pb2 as diagnostics__pb2
from . import empty_pb2 as empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListPeers = channel.unary_unary(
                '/io.casperlabs.node.api.diagnostics.Diagnostics/ListPeers',
                request_serializer=empty__pb2.Empty.SerializeToString,
                response_deserializer=diagnostics__pb2.Peers.FromString,
                )


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

    def ListPeers(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_DiagnosticsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListPeers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPeers,
                    request_deserializer=empty__pb2.Empty.FromString,
                    response_serializer=diagnostics__pb2.Peers.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'io.casperlabs.node.api.diagnostics.Diagnostics', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListPeers(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.node.api.diagnostics.Diagnostics/ListPeers',
            empty__pb2.Empty.SerializeToString,
            diagnostics__pb2.Peers.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
