# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import metric_pb2 as metric__pb2
from . import polarrpc_pb2 as polarrpc__pb2
from . import rpc_pb2 as rpc__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.NodeState = channel.unary_unary(
        '/types.PolarisRPCService/NodeState',
        request_serializer=rpc__pb2.NodeReq.SerializeToString,
        response_deserializer=rpc__pb2.SingleBytes.FromString,
        )
    self.Metric = channel.unary_unary(
        '/types.PolarisRPCService/Metric',
        request_serializer=metric__pb2.MetricsRequest.SerializeToString,
        response_deserializer=metric__pb2.Metrics.FromString,
        )
    self.CurrentList = channel.unary_unary(
        '/types.PolarisRPCService/CurrentList',
        request_serializer=polarrpc__pb2.Paginations.SerializeToString,
        response_deserializer=polarrpc__pb2.PolarisPeerList.FromString,
        )
    self.WhiteList = channel.unary_unary(
        '/types.PolarisRPCService/WhiteList',
        request_serializer=polarrpc__pb2.Paginations.SerializeToString,
        response_deserializer=polarrpc__pb2.PolarisPeerList.FromString,
        )
    self.BlackList = channel.unary_unary(
        '/types.PolarisRPCService/BlackList',
        request_serializer=polarrpc__pb2.Paginations.SerializeToString,
        response_deserializer=polarrpc__pb2.PolarisPeerList.FromString,
        )


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

  def NodeState(self, request, context):
    """Returns the current state of this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Metric(self, request, context):
    """Returns node metrics according to request
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CurrentList(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 WhiteList(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 BlackList(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_PolarisRPCServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'NodeState': grpc.unary_unary_rpc_method_handler(
          servicer.NodeState,
          request_deserializer=rpc__pb2.NodeReq.FromString,
          response_serializer=rpc__pb2.SingleBytes.SerializeToString,
      ),
      'Metric': grpc.unary_unary_rpc_method_handler(
          servicer.Metric,
          request_deserializer=metric__pb2.MetricsRequest.FromString,
          response_serializer=metric__pb2.Metrics.SerializeToString,
      ),
      'CurrentList': grpc.unary_unary_rpc_method_handler(
          servicer.CurrentList,
          request_deserializer=polarrpc__pb2.Paginations.FromString,
          response_serializer=polarrpc__pb2.PolarisPeerList.SerializeToString,
      ),
      'WhiteList': grpc.unary_unary_rpc_method_handler(
          servicer.WhiteList,
          request_deserializer=polarrpc__pb2.Paginations.FromString,
          response_serializer=polarrpc__pb2.PolarisPeerList.SerializeToString,
      ),
      'BlackList': grpc.unary_unary_rpc_method_handler(
          servicer.BlackList,
          request_deserializer=polarrpc__pb2.Paginations.FromString,
          response_serializer=polarrpc__pb2.PolarisPeerList.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'types.PolarisRPCService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
