# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
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
  pass

  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,
        )
    self.ListDiscoveredPeers = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/ListDiscoveredPeers',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.Peers.FromString,
        )
    self.GetProcessCpu = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetProcessCpu',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.ProcessCpu.FromString,
        )
    self.GetMemoryUsage = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetMemoryUsage',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.MemoryUsage.FromString,
        )
    self.GetGarbageCollectors = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetGarbageCollectors',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.GarbageCollectors.FromString,
        )
    self.GetMemoryPools = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetMemoryPools',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.MemoryPools.FromString,
        )
    self.GetThreads = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetThreads',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.Threads.FromString,
        )
    self.GetNodeCoreMetrics = channel.unary_unary(
        '/io.casperlabs.node.api.diagnostics.Diagnostics/GetNodeCoreMetrics',
        request_serializer=empty__pb2.Empty.SerializeToString,
        response_deserializer=diagnostics__pb2.NodeCoreMetrics.FromString,
        )


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

  def ListPeers(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 ListDiscoveredPeers(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 GetProcessCpu(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 GetMemoryUsage(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 GetGarbageCollectors(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 GetMemoryPools(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 GetThreads(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 GetNodeCoreMetrics(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_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,
      ),
      'ListDiscoveredPeers': grpc.unary_unary_rpc_method_handler(
          servicer.ListDiscoveredPeers,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.Peers.SerializeToString,
      ),
      'GetProcessCpu': grpc.unary_unary_rpc_method_handler(
          servicer.GetProcessCpu,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.ProcessCpu.SerializeToString,
      ),
      'GetMemoryUsage': grpc.unary_unary_rpc_method_handler(
          servicer.GetMemoryUsage,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.MemoryUsage.SerializeToString,
      ),
      'GetGarbageCollectors': grpc.unary_unary_rpc_method_handler(
          servicer.GetGarbageCollectors,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.GarbageCollectors.SerializeToString,
      ),
      'GetMemoryPools': grpc.unary_unary_rpc_method_handler(
          servicer.GetMemoryPools,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.MemoryPools.SerializeToString,
      ),
      'GetThreads': grpc.unary_unary_rpc_method_handler(
          servicer.GetThreads,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.Threads.SerializeToString,
      ),
      'GetNodeCoreMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.GetNodeCoreMetrics,
          request_deserializer=empty__pb2.Empty.FromString,
          response_serializer=diagnostics__pb2.NodeCoreMetrics.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'io.casperlabs.node.api.diagnostics.Diagnostics', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
