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

from github.com.metaprov.modelaapi.services.objectstored.v1 import objectstored_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ingest = channel.unary_unary(
                '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Ingest',
                request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
                response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
                )
        self.Archive = channel.unary_unary(
                '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Archive',
                request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
                response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
                )
        self.Recover = channel.unary_unary(
                '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Recover',
                request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
                response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
                )
        self.ExistInVirtualBucket = channel.unary_unary(
                '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/ExistInVirtualBucket',
                request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
                response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ExistInVirtualBucketResponse.FromString,
                )


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

    def Ingest(self, request, context):
        """Ingest a new dataset to the store, the store creates a new layouts and set of keys
        for the new dataset
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Archive(self, request, context):
        """Delete a dataset from the store. Datasets are not deleted but moved to archive mode
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Recover(self, request, context):
        """Recover an item from the archive into the depot
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExistInVirtualBucket(self, request, context):
        """Check if a dataset exist in bucket
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ObjectstoreServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ingest': grpc.unary_unary_rpc_method_handler(
                    servicer.Ingest,
                    request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.FromString,
                    response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.SerializeToString,
            ),
            'Archive': grpc.unary_unary_rpc_method_handler(
                    servicer.Archive,
                    request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.FromString,
                    response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.SerializeToString,
            ),
            'Recover': grpc.unary_unary_rpc_method_handler(
                    servicer.Recover,
                    request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.FromString,
                    response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.SerializeToString,
            ),
            'ExistInVirtualBucket': grpc.unary_unary_rpc_method_handler(
                    servicer.ExistInVirtualBucket,
                    request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.FromString,
                    response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ExistInVirtualBucketResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Ingest(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, '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Ingest',
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Archive(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, '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Archive',
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Recover(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, '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/Recover',
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ExistInVirtualBucket(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, '/github.com.metaprov.modelaapi.services.objectstored.v1.ObjectstoreService/ExistInVirtualBucket',
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ObjectRequest.SerializeToString,
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_objectstored_dot_v1_dot_objectstored__pb2.ExistInVirtualBucketResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
