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

from aruna.api.storage.services.v1 import collection_service_pb2 as aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2


class CollectionServiceStub(object):
    """CollectionService

    Contains all methods that get/create or update Collection and associated resources
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateNewCollection = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/CreateNewCollection',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionResponse.FromString,
                )
        self.GetCollectionByID = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/GetCollectionByID',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDResponse.FromString,
                )
        self.GetCollections = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/GetCollections',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsResponse.FromString,
                )
        self.UpdateCollection = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/UpdateCollection',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionResponse.FromString,
                )
        self.PinCollectionVersion = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/PinCollectionVersion',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionResponse.FromString,
                )
        self.DeleteCollection = channel.unary_unary(
                '/aruna.api.storage.services.v1.CollectionService/DeleteCollection',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionResponse.FromString,
                )


class CollectionServiceServicer(object):
    """CollectionService

    Contains all methods that get/create or update Collection and associated resources
    """

    def CreateNewCollection(self, request, context):
        """CreateNewCollection

        Status: STABLE

        creates a new Collection
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCollectionByID(self, request, context):
        """GetCollectionByID

        Status: STABLE

        Queries a specific Collection by ID
        The result can be one_of:
        CollectionOverview -> default
        CollectionWithID
        Collection (full)
        This can be modified with the optional OutputFormat parameter
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCollections(self, request, context):
        """GetCollections

        Status: STABLE

        queries multiple collections by ID or by LabelFilter
        This returns by default a paginated result with 20 entries.
        Must specify a project_id as context
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateCollection(self, request, context):
        """UpdateCollection

        Status: STABLE

        Updates the current collection
        This will update the collection in place if it is unversioned / latest
        A versioned (pinned) collection requires a new semantic version after the
        update This can be used to pin a collection to a specific version similar
        to the PinCollectionVersion request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PinCollectionVersion(self, request, context):
        """PinCollectionVersion

        Status: STABLE

        This pins the current status of the version to a
        specific version. Effectively creating a copy of the collection with a
        stable version All objects will be pinned to an explicit revision number
        Pinned collections can not be updated in place
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteCollection(self, request, context):
        """DeleteCollection

        Status: STABLE

        This request deletes the collection.
        If with_version is true, it deletes the collection and all its versions.
        If cascade is true, all objects that are owned by the collection will also
        deleted. This should be avoided
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CollectionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateNewCollection': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateNewCollection,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionResponse.SerializeToString,
            ),
            'GetCollectionByID': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCollectionByID,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDResponse.SerializeToString,
            ),
            'GetCollections': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCollections,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsResponse.SerializeToString,
            ),
            'UpdateCollection': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateCollection,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionResponse.SerializeToString,
            ),
            'PinCollectionVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.PinCollectionVersion,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionResponse.SerializeToString,
            ),
            'DeleteCollection': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCollection,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aruna.api.storage.services.v1.CollectionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CollectionService(object):
    """CollectionService

    Contains all methods that get/create or update Collection and associated resources
    """

    @staticmethod
    def CreateNewCollection(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, '/aruna.api.storage.services.v1.CollectionService/CreateNewCollection',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.CreateNewCollectionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCollectionByID(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, '/aruna.api.storage.services.v1.CollectionService/GetCollectionByID',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionByIDResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCollections(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, '/aruna.api.storage.services.v1.CollectionService/GetCollections',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.GetCollectionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateCollection(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, '/aruna.api.storage.services.v1.CollectionService/UpdateCollection',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.UpdateCollectionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PinCollectionVersion(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, '/aruna.api.storage.services.v1.CollectionService/PinCollectionVersion',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.PinCollectionVersionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteCollection(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, '/aruna.api.storage.services.v1.CollectionService/DeleteCollection',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2.DeleteCollectionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
