# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: diagnostics.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

from . import empty_pb2
from . import node_pb2
from . import diagnostics_pb2


class DiagnosticsBase(abc.ABC):

    @abc.abstractmethod
    async def ListPeers(self, stream: 'grpclib.server.Stream[empty_pb2.Empty, diagnostics_pb2.Peers]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/io.casperlabs.node.api.diagnostics.Diagnostics/ListPeers': grpclib.const.Handler(
                self.ListPeers,
                grpclib.const.Cardinality.UNARY_UNARY,
                empty_pb2.Empty,
                diagnostics_pb2.Peers,
            ),
        }


class DiagnosticsStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.ListPeers = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.node.api.diagnostics.Diagnostics/ListPeers',
            empty_pb2.Empty,
            diagnostics_pb2.Peers,
        )
