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

from model.model.v1alpha import model_pb2 as model_dot_model_dot_v1alpha_dot_model__pb2


class ModelPrivateServiceStub(object):
    """Model service responds to internal access
    ========== Private API ==========
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListModelsAdmin = channel.unary_unary(
                '/model.model.v1alpha.ModelPrivateService/ListModelsAdmin',
                request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminRequest.SerializeToString,
                response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminResponse.FromString,
                )
        self.LookUpModelAdmin = channel.unary_unary(
                '/model.model.v1alpha.ModelPrivateService/LookUpModelAdmin',
                request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminRequest.SerializeToString,
                response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminResponse.FromString,
                )
        self.CheckModelAdmin = channel.unary_unary(
                '/model.model.v1alpha.ModelPrivateService/CheckModelAdmin',
                request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminRequest.SerializeToString,
                response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminResponse.FromString,
                )
        self.DeployModelAdmin = channel.unary_unary(
                '/model.model.v1alpha.ModelPrivateService/DeployModelAdmin',
                request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminRequest.SerializeToString,
                response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminResponse.FromString,
                )
        self.UndeployModelAdmin = channel.unary_unary(
                '/model.model.v1alpha.ModelPrivateService/UndeployModelAdmin',
                request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminRequest.SerializeToString,
                response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminResponse.FromString,
                )


class ModelPrivateServiceServicer(object):
    """Model service responds to internal access
    ========== Private API ==========
    """

    def ListModelsAdmin(self, request, context):
        """ListModelsAdmin method receives a ListModelsAdminRequest message and
        returns a ListModelsAdminResponse
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LookUpModelAdmin(self, request, context):
        """LookUpModelAdmin method receives a LookUpModelAdminRequest message and
        returns a LookUpModelAdminResponse
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CheckModelAdmin(self, request, context):
        """CheckModelAdmin method receives a CheckModelAdminRequest message and returns a
        CheckModelAdminResponse
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeployModelAdmin(self, request, context):
        """DeployModelAdmin deploy a model to online state
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UndeployModelAdmin(self, request, context):
        """UndeployModelAdmin undeploy a model to offline state
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ModelPrivateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListModelsAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.ListModelsAdmin,
                    request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminRequest.FromString,
                    response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminResponse.SerializeToString,
            ),
            'LookUpModelAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.LookUpModelAdmin,
                    request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminRequest.FromString,
                    response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminResponse.SerializeToString,
            ),
            'CheckModelAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.CheckModelAdmin,
                    request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminRequest.FromString,
                    response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminResponse.SerializeToString,
            ),
            'DeployModelAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.DeployModelAdmin,
                    request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminRequest.FromString,
                    response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminResponse.SerializeToString,
            ),
            'UndeployModelAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.UndeployModelAdmin,
                    request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminRequest.FromString,
                    response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'model.model.v1alpha.ModelPrivateService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ModelPrivateService(object):
    """Model service responds to internal access
    ========== Private API ==========
    """

    @staticmethod
    def ListModelsAdmin(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, '/model.model.v1alpha.ModelPrivateService/ListModelsAdmin',
            model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminRequest.SerializeToString,
            model_dot_model_dot_v1alpha_dot_model__pb2.ListModelsAdminResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LookUpModelAdmin(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, '/model.model.v1alpha.ModelPrivateService/LookUpModelAdmin',
            model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminRequest.SerializeToString,
            model_dot_model_dot_v1alpha_dot_model__pb2.LookUpModelAdminResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CheckModelAdmin(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, '/model.model.v1alpha.ModelPrivateService/CheckModelAdmin',
            model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminRequest.SerializeToString,
            model_dot_model_dot_v1alpha_dot_model__pb2.CheckModelAdminResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeployModelAdmin(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, '/model.model.v1alpha.ModelPrivateService/DeployModelAdmin',
            model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminRequest.SerializeToString,
            model_dot_model_dot_v1alpha_dot_model__pb2.DeployModelAdminResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UndeployModelAdmin(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, '/model.model.v1alpha.ModelPrivateService/UndeployModelAdmin',
            model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminRequest.SerializeToString,
            model_dot_model_dot_v1alpha_dot_model__pb2.UndeployModelAdminResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
