# 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.UpdateResourceUsage = channel.unary_unary(
        '/ray.rpc.NodeManagerService/UpdateResourceUsage',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.UpdateResourceUsageRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.UpdateResourceUsageReply.FromString,
        )
    self.RequestResourceReport = channel.unary_unary(
        '/ray.rpc.NodeManagerService/RequestResourceReport',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestResourceReportRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestResourceReportReply.FromString,
        )
    self.RequestWorkerLease = channel.unary_unary(
        '/ray.rpc.NodeManagerService/RequestWorkerLease',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseReply.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.ReleaseUnusedWorkers = channel.unary_unary(
        '/ray.rpc.NodeManagerService/ReleaseUnusedWorkers',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedWorkersRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedWorkersReply.FromString,
        )
    self.PrepareBundleResources = channel.unary_unary(
        '/ray.rpc.NodeManagerService/PrepareBundleResources',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesReply.FromString,
        )
    self.CommitBundleResources = channel.unary_unary(
        '/ray.rpc.NodeManagerService/CommitBundleResources',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesReply.FromString,
        )
    self.CancelResourceReserve = channel.unary_unary(
        '/ray.rpc.NodeManagerService/CancelResourceReserve',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveReply.FromString,
        )
    self.CancelWorkerLease = channel.unary_unary(
        '/ray.rpc.NodeManagerService/CancelWorkerLease',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseReply.FromString,
        )
    self.PinObjectIDs = channel.unary_unary(
        '/ray.rpc.NodeManagerService/PinObjectIDs',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsReply.FromString,
        )
    self.GetNodeStats = channel.unary_unary(
        '/ray.rpc.NodeManagerService/GetNodeStats',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsReply.FromString,
        )
    self.GlobalGC = channel.unary_unary(
        '/ray.rpc.NodeManagerService/GlobalGC',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCReply.FromString,
        )
    self.FormatGlobalMemoryInfo = channel.unary_unary(
        '/ray.rpc.NodeManagerService/FormatGlobalMemoryInfo',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoReply.FromString,
        )
    self.RequestObjectSpillage = channel.unary_unary(
        '/ray.rpc.NodeManagerService/RequestObjectSpillage',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestObjectSpillageRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestObjectSpillageReply.FromString,
        )
    self.ReleaseUnusedBundles = channel.unary_unary(
        '/ray.rpc.NodeManagerService/ReleaseUnusedBundles',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesReply.FromString,
        )
    self.GetSystemConfig = channel.unary_unary(
        '/ray.rpc.NodeManagerService/GetSystemConfig',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigReply.FromString,
        )
    self.GetGcsServerAddress = channel.unary_unary(
        '/ray.rpc.NodeManagerService/GetGcsServerAddress',
        request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetGcsServerAddressRequest.SerializeToString,
        response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetGcsServerAddressReply.FromString,
        )


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

  def UpdateResourceUsage(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 RequestResourceReport(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 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 ReleaseUnusedWorkers(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 PrepareBundleResources(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 CommitBundleResources(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 CancelResourceReserve(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 CancelWorkerLease(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 PinObjectIDs(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 GlobalGC(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 FormatGlobalMemoryInfo(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 RequestObjectSpillage(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 ReleaseUnusedBundles(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 GetSystemConfig(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 GetGcsServerAddress(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 = {
      'UpdateResourceUsage': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateResourceUsage,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.UpdateResourceUsageRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.UpdateResourceUsageReply.SerializeToString,
      ),
      'RequestResourceReport': grpc.unary_unary_rpc_method_handler(
          servicer.RequestResourceReport,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestResourceReportRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestResourceReportReply.SerializeToString,
      ),
      'RequestWorkerLease': grpc.unary_unary_rpc_method_handler(
          servicer.RequestWorkerLease,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseReply.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,
      ),
      'ReleaseUnusedWorkers': grpc.unary_unary_rpc_method_handler(
          servicer.ReleaseUnusedWorkers,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedWorkersRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedWorkersReply.SerializeToString,
      ),
      'PrepareBundleResources': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareBundleResources,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesReply.SerializeToString,
      ),
      'CommitBundleResources': grpc.unary_unary_rpc_method_handler(
          servicer.CommitBundleResources,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesReply.SerializeToString,
      ),
      'CancelResourceReserve': grpc.unary_unary_rpc_method_handler(
          servicer.CancelResourceReserve,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveReply.SerializeToString,
      ),
      'CancelWorkerLease': grpc.unary_unary_rpc_method_handler(
          servicer.CancelWorkerLease,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseReply.SerializeToString,
      ),
      'PinObjectIDs': grpc.unary_unary_rpc_method_handler(
          servicer.PinObjectIDs,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsReply.SerializeToString,
      ),
      'GetNodeStats': grpc.unary_unary_rpc_method_handler(
          servicer.GetNodeStats,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsReply.SerializeToString,
      ),
      'GlobalGC': grpc.unary_unary_rpc_method_handler(
          servicer.GlobalGC,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCReply.SerializeToString,
      ),
      'FormatGlobalMemoryInfo': grpc.unary_unary_rpc_method_handler(
          servicer.FormatGlobalMemoryInfo,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoReply.SerializeToString,
      ),
      'RequestObjectSpillage': grpc.unary_unary_rpc_method_handler(
          servicer.RequestObjectSpillage,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestObjectSpillageRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestObjectSpillageReply.SerializeToString,
      ),
      'ReleaseUnusedBundles': grpc.unary_unary_rpc_method_handler(
          servicer.ReleaseUnusedBundles,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesReply.SerializeToString,
      ),
      'GetSystemConfig': grpc.unary_unary_rpc_method_handler(
          servicer.GetSystemConfig,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigReply.SerializeToString,
      ),
      'GetGcsServerAddress': grpc.unary_unary_rpc_method_handler(
          servicer.GetGcsServerAddress,
          request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetGcsServerAddressRequest.FromString,
          response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetGcsServerAddressReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ray.rpc.NodeManagerService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
