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

from . import autoscaler_pb2 as src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetClusterResourceState = channel.unary_unary(
                '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterResourceState',
                request_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateReply.FromString,
                )
        self.ReportAutoscalingState = channel.unary_unary(
                '/ray.rpc.autoscaler.AutoscalerStateService/ReportAutoscalingState',
                request_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateReply.FromString,
                )
        self.RequestClusterResourceConstraint = channel.unary_unary(
                '/ray.rpc.autoscaler.AutoscalerStateService/RequestClusterResourceConstraint',
                request_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.FromString,
                )
        self.GetClusterStatus = channel.unary_unary(
                '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterStatus',
                request_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusRequest.SerializeToString,
                response_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusReply.FromString,
                )


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

    def GetClusterResourceState(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 ReportAutoscalingState(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 RequestClusterResourceConstraint(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 GetClusterStatus(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_AutoscalerStateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetClusterResourceState': grpc.unary_unary_rpc_method_handler(
                    servicer.GetClusterResourceState,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateReply.SerializeToString,
            ),
            'ReportAutoscalingState': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportAutoscalingState,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateReply.SerializeToString,
            ),
            'RequestClusterResourceConstraint': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestClusterResourceConstraint,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.SerializeToString,
            ),
            'GetClusterStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetClusterStatus,
                    request_deserializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusRequest.FromString,
                    response_serializer=src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ray.rpc.autoscaler.AutoscalerStateService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetClusterResourceState(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.autoscaler.AutoscalerStateService/GetClusterResourceState',
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterResourceStateReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportAutoscalingState(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.autoscaler.AutoscalerStateService/ReportAutoscalingState',
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.ReportAutoscalingStateReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestClusterResourceConstraint(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.autoscaler.AutoscalerStateService/RequestClusterResourceConstraint',
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetClusterStatus(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.autoscaler.AutoscalerStateService/GetClusterStatus',
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusRequest.SerializeToString,
            src_dot_ray_dot_protobuf_dot_experimental_dot_autoscaler__pb2.GetClusterStatusReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
