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

from ..common import common_pb2 as common_dot_common__pb2
from ..deploy import serve_pb2 as deploy_dot_serve__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/deploy.ServingService/Create',
                request_serializer=deploy_dot_serve__pb2.ServingRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Serving.FromString,
                )
        self.GetServing = channel.unary_unary(
                '/deploy.ServingService/GetServing',
                request_serializer=deploy_dot_serve__pb2.ServingRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Serving.FromString,
                )
        self.ListServings = channel.unary_unary(
                '/deploy.ServingService/ListServings',
                request_serializer=deploy_dot_serve__pb2.ServingListRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.ServingListResponse.FromString,
                )
        self.DeleteServing = channel.unary_unary(
                '/deploy.ServingService/DeleteServing',
                request_serializer=deploy_dot_serve__pb2.ServingRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateServing = channel.unary_unary(
                '/deploy.ServingService/UpdateServing',
                request_serializer=deploy_dot_serve__pb2.UpdateServingRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Serving.FromString,
                )


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

    def Create(self, request, context):
        """Creates a new Serving Group.
        If `.models` are specified, the Serving Group will be created with new
        `len(.models)` models.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetServing(self, request, context):
        """Get all available info for a Serving Group. All `.models` are populated.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListServings(self, request, context):
        """Get list of Serving Grpup(s) of a user/workspace.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteServing(self, request, context):
        """Delete a Serving Group and all its models.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateServing(self, request, context):
        """Update a Serving Group. Only the fields specified in the `update_mask` are
        updated.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ServingServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=deploy_dot_serve__pb2.ServingRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Serving.SerializeToString,
            ),
            'GetServing': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServing,
                    request_deserializer=deploy_dot_serve__pb2.ServingRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Serving.SerializeToString,
            ),
            'ListServings': grpc.unary_unary_rpc_method_handler(
                    servicer.ListServings,
                    request_deserializer=deploy_dot_serve__pb2.ServingListRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.ServingListResponse.SerializeToString,
            ),
            'DeleteServing': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteServing,
                    request_deserializer=deploy_dot_serve__pb2.ServingRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateServing': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateServing,
                    request_deserializer=deploy_dot_serve__pb2.UpdateServingRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Serving.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'deploy.ServingService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Create(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, '/deploy.ServingService/Create',
            deploy_dot_serve__pb2.ServingRequest.SerializeToString,
            deploy_dot_serve__pb2.Serving.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetServing(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, '/deploy.ServingService/GetServing',
            deploy_dot_serve__pb2.ServingRequest.SerializeToString,
            deploy_dot_serve__pb2.Serving.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListServings(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, '/deploy.ServingService/ListServings',
            deploy_dot_serve__pb2.ServingListRequest.SerializeToString,
            deploy_dot_serve__pb2.ServingListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteServing(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, '/deploy.ServingService/DeleteServing',
            deploy_dot_serve__pb2.ServingRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateServing(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, '/deploy.ServingService/UpdateServing',
            deploy_dot_serve__pb2.UpdateServingRequest.SerializeToString,
            deploy_dot_serve__pb2.Serving.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetModel = channel.unary_unary(
                '/deploy.ModelService/GetModel',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Model.FromString,
                )
        self.Watch = channel.unary_stream(
                '/deploy.ModelService/Watch',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.ServingStatus.FromString,
                )
        self.UploadModel = channel.unary_unary(
                '/deploy.ModelService/UploadModel',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Model.FromString,
                )
        self.Deploy = channel.unary_unary(
                '/deploy.ModelService/Deploy',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Model.FromString,
                )
        self.ModelLogs = channel.unary_stream(
                '/deploy.ModelService/ModelLogs',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=common_dot_common__pb2.Log.FromString,
                )
        self.ListModels = channel.unary_unary(
                '/deploy.ModelService/ListModels',
                request_serializer=deploy_dot_serve__pb2.ModelListRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.ModelListResponse.FromString,
                )
        self.DeleteModel = channel.unary_unary(
                '/deploy.ModelService/DeleteModel',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SetModelPin = channel.unary_unary(
                '/deploy.ModelService/SetModelPin',
                request_serializer=deploy_dot_serve__pb2.ModelRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateModel = channel.unary_unary(
                '/deploy.ModelService/UpdateModel',
                request_serializer=deploy_dot_serve__pb2.UpdateModelRequest.SerializeToString,
                response_deserializer=deploy_dot_serve__pb2.Model.FromString,
                )


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

    def GetModel(self, request, context):
        """Get all available info for a model.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Watch(self, request, context):
        """Watch for status update of a model in Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UploadModel(self, request, context):
        """Get S3 Upload URL for new/existing Model in Serving Group.
        If id is none then creates new Model with id `id` in the Serving Group.
        If model's serving_group_id is none/doesn't exist, then throws error.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Deploy(self, request, context):
        """Deploy new model in Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ModelLogs(self, request, context):
        """Get logs of a model.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListModels(self, request, context):
        """Get list of models in a Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteModel(self, request, context):
        """Delete a model in a Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetModelPin(self, request, context):
        """Pinned a model of a Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateModel(self, request, context):
        """Update a model of a Serving Group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ModelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetModel': grpc.unary_unary_rpc_method_handler(
                    servicer.GetModel,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Model.SerializeToString,
            ),
            'Watch': grpc.unary_stream_rpc_method_handler(
                    servicer.Watch,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.ServingStatus.SerializeToString,
            ),
            'UploadModel': grpc.unary_unary_rpc_method_handler(
                    servicer.UploadModel,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Model.SerializeToString,
            ),
            'Deploy': grpc.unary_unary_rpc_method_handler(
                    servicer.Deploy,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Model.SerializeToString,
            ),
            'ModelLogs': grpc.unary_stream_rpc_method_handler(
                    servicer.ModelLogs,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=common_dot_common__pb2.Log.SerializeToString,
            ),
            'ListModels': grpc.unary_unary_rpc_method_handler(
                    servicer.ListModels,
                    request_deserializer=deploy_dot_serve__pb2.ModelListRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.ModelListResponse.SerializeToString,
            ),
            'DeleteModel': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteModel,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetModelPin': grpc.unary_unary_rpc_method_handler(
                    servicer.SetModelPin,
                    request_deserializer=deploy_dot_serve__pb2.ModelRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateModel': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateModel,
                    request_deserializer=deploy_dot_serve__pb2.UpdateModelRequest.FromString,
                    response_serializer=deploy_dot_serve__pb2.Model.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'deploy.ModelService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetModel(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, '/deploy.ModelService/GetModel',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            deploy_dot_serve__pb2.Model.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Watch(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_stream(request, target, '/deploy.ModelService/Watch',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            deploy_dot_serve__pb2.ServingStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UploadModel(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, '/deploy.ModelService/UploadModel',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            deploy_dot_serve__pb2.Model.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Deploy(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, '/deploy.ModelService/Deploy',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            deploy_dot_serve__pb2.Model.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ModelLogs(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_stream(request, target, '/deploy.ModelService/ModelLogs',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            common_dot_common__pb2.Log.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListModels(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, '/deploy.ModelService/ListModels',
            deploy_dot_serve__pb2.ModelListRequest.SerializeToString,
            deploy_dot_serve__pb2.ModelListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteModel(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, '/deploy.ModelService/DeleteModel',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetModelPin(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, '/deploy.ModelService/SetModelPin',
            deploy_dot_serve__pb2.ModelRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateModel(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, '/deploy.ModelService/UpdateModel',
            deploy_dot_serve__pb2.UpdateModelRequest.SerializeToString,
            deploy_dot_serve__pb2.Model.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
