"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import abc
import google.protobuf.empty_pb2
import grpc
import serve_pb2
import typing

class ServingServiceStub:
    def __init__(self, channel: grpc.Channel) -> None: ...
    Create: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ServingRequest,
        serve_pb2.Serving]
    """Creates a new Serving Group.
    If `.models` are specified, the Serving Group will be created with new
    `len(.models)` models.
    """

    GetServing: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ServingRequest,
        serve_pb2.Serving]
    """Get all available info for a Serving Group. All `.models` are populated."""

    ListServings: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ServingListRequest,
        serve_pb2.ServingListResponse]
    """Get list of Serving Grpup(s) of a user/workspace."""

    DeleteServing: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ServingRequest,
        google.protobuf.empty_pb2.Empty]
    """Delete a Serving Group and all its models."""

    UpdateServing: grpc.UnaryUnaryMultiCallable[
        serve_pb2.UpdateServingRequest,
        serve_pb2.Serving]
    """Update a Serving Group. Only the fields specified in the `update_mask` are
    updated.
    """


class ServingServiceServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def Create(self,
        request: serve_pb2.ServingRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.Serving:
        """Creates a new Serving Group.
        If `.models` are specified, the Serving Group will be created with new
        `len(.models)` models.
        """
        pass

    @abc.abstractmethod
    def GetServing(self,
        request: serve_pb2.ServingRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.Serving:
        """Get all available info for a Serving Group. All `.models` are populated."""
        pass

    @abc.abstractmethod
    def ListServings(self,
        request: serve_pb2.ServingListRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.ServingListResponse:
        """Get list of Serving Grpup(s) of a user/workspace."""
        pass

    @abc.abstractmethod
    def DeleteServing(self,
        request: serve_pb2.ServingRequest,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """Delete a Serving Group and all its models."""
        pass

    @abc.abstractmethod
    def UpdateServing(self,
        request: serve_pb2.UpdateServingRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.Serving:
        """Update a Serving Group. Only the fields specified in the `update_mask` are
        updated.
        """
        pass


def add_ServingServiceServicer_to_server(servicer: ServingServiceServicer, server: grpc.Server) -> None: ...

class ModelServiceStub:
    def __init__(self, channel: grpc.Channel) -> None: ...
    Watch: grpc.UnaryStreamMultiCallable[
        serve_pb2.ModelRequest,
        serve_pb2.ServingStatus]
    """Watch for status update of a model in Serving Group."""

    UploadModel: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ModelRequest,
        serve_pb2.Model]
    """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.
    """

    Deploy: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ModelRequest,
        serve_pb2.Model]
    """Deploy new model in Serving Group."""

    ModelLogs: grpc.UnaryStreamMultiCallable[
        serve_pb2.ModelRequest,
        serve_pb2.ModelLog]
    """Get logs of a model."""

    ListModels: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ModelListRequest,
        serve_pb2.ModelListResponse]
    """Get list of models in a Serving Group."""

    DeleteModel: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ModelRequest,
        google.protobuf.empty_pb2.Empty]
    """Delete a model in a Serving Group."""

    SetModelPin: grpc.UnaryUnaryMultiCallable[
        serve_pb2.ModelRequest,
        google.protobuf.empty_pb2.Empty]
    """Pinned a model of a Serving Group."""


class ModelServiceServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def Watch(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> typing.Iterator[serve_pb2.ServingStatus]:
        """Watch for status update of a model in Serving Group."""
        pass

    @abc.abstractmethod
    def UploadModel(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.Model:
        """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.
        """
        pass

    @abc.abstractmethod
    def Deploy(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.Model:
        """Deploy new model in Serving Group."""
        pass

    @abc.abstractmethod
    def ModelLogs(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> typing.Iterator[serve_pb2.ModelLog]:
        """Get logs of a model."""
        pass

    @abc.abstractmethod
    def ListModels(self,
        request: serve_pb2.ModelListRequest,
        context: grpc.ServicerContext,
    ) -> serve_pb2.ModelListResponse:
        """Get list of models in a Serving Group."""
        pass

    @abc.abstractmethod
    def DeleteModel(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """Delete a model in a Serving Group."""
        pass

    @abc.abstractmethod
    def SetModelPin(self,
        request: serve_pb2.ModelRequest,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """Pinned a model of a Serving Group."""
        pass


def add_ModelServiceServicer_to_server(servicer: ModelServiceServicer, server: grpc.Server) -> None: ...
