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

from sky.schemas.generated import servev1_pb2 as sky_dot_schemas_dot_generated_dot_servev1__pb2

GRPC_GENERATED_VERSION = '1.63.0'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in sky/schemas/generated/servev1_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetServiceStatus = channel.unary_unary(
                '/serve.v1.ServeService/GetServiceStatus',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusResponse.FromString,
                _registered_method=True)
        self.AddVersion = channel.unary_unary(
                '/serve.v1.ServeService/AddVersion',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionResponse.FromString,
                _registered_method=True)
        self.TerminateServices = channel.unary_unary(
                '/serve.v1.ServeService/TerminateServices',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesResponse.FromString,
                _registered_method=True)
        self.TerminateReplica = channel.unary_unary(
                '/serve.v1.ServeService/TerminateReplica',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaResponse.FromString,
                _registered_method=True)
        self.WaitServiceRegistration = channel.unary_unary(
                '/serve.v1.ServeService/WaitServiceRegistration',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationResponse.FromString,
                _registered_method=True)
        self.UpdateService = channel.unary_unary(
                '/serve.v1.ServeService/UpdateService',
                request_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceRequest.SerializeToString,
                response_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceResponse.FromString,
                _registered_method=True)


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

    def GetServiceStatus(self, request, context):
        """Get status of service.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddVersion(self, request, context):
        """Add version to service.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TerminateServices(self, request, context):
        """Terminate services.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TerminateReplica(self, request, context):
        """Terminate replica.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitServiceRegistration(self, request, context):
        """Wait for service registration.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateService(self, request, context):
        """Update service.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ServeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetServiceStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServiceStatus,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusResponse.SerializeToString,
            ),
            'AddVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.AddVersion,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionResponse.SerializeToString,
            ),
            'TerminateServices': grpc.unary_unary_rpc_method_handler(
                    servicer.TerminateServices,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesResponse.SerializeToString,
            ),
            'TerminateReplica': grpc.unary_unary_rpc_method_handler(
                    servicer.TerminateReplica,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaResponse.SerializeToString,
            ),
            'WaitServiceRegistration': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitServiceRegistration,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationResponse.SerializeToString,
            ),
            'UpdateService': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateService,
                    request_deserializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceRequest.FromString,
                    response_serializer=sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'serve.v1.ServeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetServiceStatus(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,
            '/serve.v1.ServeService/GetServiceStatus',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.GetServiceStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddVersion(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,
            '/serve.v1.ServeService/AddVersion',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.AddVersionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TerminateServices(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,
            '/serve.v1.ServeService/TerminateServices',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateServicesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TerminateReplica(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,
            '/serve.v1.ServeService/TerminateReplica',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.TerminateReplicaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WaitServiceRegistration(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,
            '/serve.v1.ServeService/WaitServiceRegistration',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.WaitServiceRegistrationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateService(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,
            '/serve.v1.ServeService/UpdateService',
            sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceRequest.SerializeToString,
            sky_dot_schemas_dot_generated_dot_servev1__pb2.UpdateServiceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
