# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import monitor_pb2 as src_dot_ray_dot_protobuf_dot_monitor__pb2


class MonitorGcsServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetRayVersion = channel.unary_unary(
                '/ray.rpc.MonitorGcsService/GetRayVersion',
                request_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionReply.FromString,
                )
        self.DrainAndKillNode = channel.unary_unary(
                '/ray.rpc.MonitorGcsService/DrainAndKillNode',
                request_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeReply.FromString,
                )
        self.GetSchedulingStatus = channel.unary_unary(
                '/ray.rpc.MonitorGcsService/GetSchedulingStatus',
                request_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusReply.FromString,
                )


class MonitorGcsServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def GetRayVersion(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DrainAndKillNode(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSchedulingStatus(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MonitorGcsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetRayVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRayVersion,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionReply.SerializeToString,
            ),
            'DrainAndKillNode': grpc.unary_unary_rpc_method_handler(
                    servicer.DrainAndKillNode,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeReply.SerializeToString,
            ),
            'GetSchedulingStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSchedulingStatus,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ray.rpc.MonitorGcsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MonitorGcsService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetRayVersion(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/ray.rpc.MonitorGcsService/GetRayVersion',
            src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_monitor__pb2.GetRayVersionReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DrainAndKillNode(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/ray.rpc.MonitorGcsService/DrainAndKillNode',
            src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_monitor__pb2.DrainAndKillNodeReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSchedulingStatus(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/ray.rpc.MonitorGcsService/GetSchedulingStatus',
            src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_monitor__pb2.GetSchedulingStatusReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
