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

from . import node_manager_pb2 as src_dot_ray_dot_protobuf_dot_node__manager__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.RequestWorkerLease = channel.unary_unary(
        '/ray.rpc.NodeManagerService/RequestWorkerLease',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.WorkerLeaseRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.WorkerLeaseReply.FromString,
        )
    self.ReturnWorker = channel.unary_unary(
        '/ray.rpc.NodeManagerService/ReturnWorker',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerReply.FromString,
        )
    self.ForwardTask = channel.unary_unary(
        '/ray.rpc.NodeManagerService/ForwardTask',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ForwardTaskRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ForwardTaskReply.FromString,
        )
    self.GetNodeStats = channel.unary_unary(
        '/ray.rpc.NodeManagerService/GetNodeStats',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NodeStatsRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NodeStatsReply.FromString,
        )


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

  def RequestWorkerLease(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 ReturnWorker(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 ForwardTask(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 GetNodeStats(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_NodeManagerServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'RequestWorkerLease': grpc.unary_unary_rpc_method_handler(
          servicer.RequestWorkerLease,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.WorkerLeaseRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.WorkerLeaseReply.SerializeToString,
      ),
      'ReturnWorker': grpc.unary_unary_rpc_method_handler(
          servicer.ReturnWorker,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerReply.SerializeToString,
      ),
      'ForwardTask': grpc.unary_unary_rpc_method_handler(
          servicer.ForwardTask,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ForwardTaskRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ForwardTaskReply.SerializeToString,
      ),
      'GetNodeStats': grpc.unary_unary_rpc_method_handler(
          servicer.GetNodeStats,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NodeStatsRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NodeStatsReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ray.rpc.NodeManagerService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
