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

from union.internal.objectstore import payload_pb2 as objectstore_dot_payload__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Metadata = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Metadata',
                request_serializer=objectstore_dot_payload__pb2.MetadataRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.MetadataResponse.FromString,
                )
        self.Head = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Head',
                request_serializer=objectstore_dot_payload__pb2.HeadRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.HeadResponse.FromString,
                )
        self.Put = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Put',
                request_serializer=objectstore_dot_payload__pb2.PutRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.PutResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Get',
                request_serializer=objectstore_dot_payload__pb2.GetRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.GetResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Delete',
                request_serializer=objectstore_dot_payload__pb2.DeleteRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.DeleteResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/List',
                request_serializer=objectstore_dot_payload__pb2.ListRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.ListResponse.FromString,
                )
        self.Copy = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Copy',
                request_serializer=objectstore_dot_payload__pb2.CopyRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.CopyResponse.FromString,
                )
        self.StartMultipartUpload = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/StartMultipartUpload',
                request_serializer=objectstore_dot_payload__pb2.StartMultipartUploadRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.StartMultipartUploadResponse.FromString,
                )
        self.UploadPart = channel.stream_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/UploadPart',
                request_serializer=objectstore_dot_payload__pb2.UploadPartRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.UploadPartResponse.FromString,
                )
        self.ListInProgressMultipartUploads = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/ListInProgressMultipartUploads',
                request_serializer=objectstore_dot_payload__pb2.ListInProgressMultipartUploadsRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.ListInProgressMultipartUploadsResponse.FromString,
                )
        self.TerminateMultipartUpload = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/TerminateMultipartUpload',
                request_serializer=objectstore_dot_payload__pb2.TerminateMultipartUploadRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.TerminateMultipartUploadResponse.FromString,
                )
        self.DownloadPart = channel.unary_stream(
                '/cloudidl.objectstore.v1.ObjectStoreService/DownloadPart',
                request_serializer=objectstore_dot_payload__pb2.DownloadPartRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.DownloadPartResponse.FromString,
                )
        self.Presign = channel.unary_unary(
                '/cloudidl.objectstore.v1.ObjectStoreService/Presign',
                request_serializer=objectstore_dot_payload__pb2.PresignRequest.SerializeToString,
                response_deserializer=objectstore_dot_payload__pb2.PresignResponse.FromString,
                )


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

    def Metadata(self, request, context):
        """Metadata returns the metadata for the object store
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Head(self, request, context):
        """Head returns the metadata for an object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Put(self, request, context):
        """Put creates or updates an object. The maximum size of an object is 1GB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get returns the contents of an object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete deletes an object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """List lists the objects
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Copy(self, request, context):
        """Copy copies an object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartMultipartUpload(self, request, context):
        """StartMultipartUpload starts a large object upload. A large object is any object whose size is greater than
        metadata.max_single_part_object_size_bytes.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UploadPart(self, request_iterator, context):
        """UploadPart uploads a part of a large object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListInProgressMultipartUploads(self, request, context):
        """ListInProgressMultipartUploads completes a large object upload
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TerminateMultipartUpload(self, request, context):
        """TerminateMultipartUpload terminates a large object upload
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DownloadPart(self, request, context):
        """DownloadPart downloads a part of a large object.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Presign(self, request, context):
        """Missing associated documentation comment in .proto file."""
        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 = {
            'Metadata': grpc.unary_unary_rpc_method_handler(
                    servicer.Metadata,
                    request_deserializer=objectstore_dot_payload__pb2.MetadataRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.MetadataResponse.SerializeToString,
            ),
            'Head': grpc.unary_unary_rpc_method_handler(
                    servicer.Head,
                    request_deserializer=objectstore_dot_payload__pb2.HeadRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.HeadResponse.SerializeToString,
            ),
            'Put': grpc.unary_unary_rpc_method_handler(
                    servicer.Put,
                    request_deserializer=objectstore_dot_payload__pb2.PutRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.PutResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=objectstore_dot_payload__pb2.GetRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.GetResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=objectstore_dot_payload__pb2.DeleteRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.DeleteResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=objectstore_dot_payload__pb2.ListRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.ListResponse.SerializeToString,
            ),
            'Copy': grpc.unary_unary_rpc_method_handler(
                    servicer.Copy,
                    request_deserializer=objectstore_dot_payload__pb2.CopyRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.CopyResponse.SerializeToString,
            ),
            'StartMultipartUpload': grpc.unary_unary_rpc_method_handler(
                    servicer.StartMultipartUpload,
                    request_deserializer=objectstore_dot_payload__pb2.StartMultipartUploadRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.StartMultipartUploadResponse.SerializeToString,
            ),
            'UploadPart': grpc.stream_unary_rpc_method_handler(
                    servicer.UploadPart,
                    request_deserializer=objectstore_dot_payload__pb2.UploadPartRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.UploadPartResponse.SerializeToString,
            ),
            'ListInProgressMultipartUploads': grpc.unary_unary_rpc_method_handler(
                    servicer.ListInProgressMultipartUploads,
                    request_deserializer=objectstore_dot_payload__pb2.ListInProgressMultipartUploadsRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.ListInProgressMultipartUploadsResponse.SerializeToString,
            ),
            'TerminateMultipartUpload': grpc.unary_unary_rpc_method_handler(
                    servicer.TerminateMultipartUpload,
                    request_deserializer=objectstore_dot_payload__pb2.TerminateMultipartUploadRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.TerminateMultipartUploadResponse.SerializeToString,
            ),
            'DownloadPart': grpc.unary_stream_rpc_method_handler(
                    servicer.DownloadPart,
                    request_deserializer=objectstore_dot_payload__pb2.DownloadPartRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.DownloadPartResponse.SerializeToString,
            ),
            'Presign': grpc.unary_unary_rpc_method_handler(
                    servicer.Presign,
                    request_deserializer=objectstore_dot_payload__pb2.PresignRequest.FromString,
                    response_serializer=objectstore_dot_payload__pb2.PresignResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.objectstore.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 Metadata(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, '/cloudidl.objectstore.v1.ObjectStoreService/Metadata',
            objectstore_dot_payload__pb2.MetadataRequest.SerializeToString,
            objectstore_dot_payload__pb2.MetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Head(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, '/cloudidl.objectstore.v1.ObjectStoreService/Head',
            objectstore_dot_payload__pb2.HeadRequest.SerializeToString,
            objectstore_dot_payload__pb2.HeadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Put(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, '/cloudidl.objectstore.v1.ObjectStoreService/Put',
            objectstore_dot_payload__pb2.PutRequest.SerializeToString,
            objectstore_dot_payload__pb2.PutResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(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, '/cloudidl.objectstore.v1.ObjectStoreService/Get',
            objectstore_dot_payload__pb2.GetRequest.SerializeToString,
            objectstore_dot_payload__pb2.GetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/cloudidl.objectstore.v1.ObjectStoreService/Delete',
            objectstore_dot_payload__pb2.DeleteRequest.SerializeToString,
            objectstore_dot_payload__pb2.DeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/cloudidl.objectstore.v1.ObjectStoreService/List',
            objectstore_dot_payload__pb2.ListRequest.SerializeToString,
            objectstore_dot_payload__pb2.ListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Copy(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, '/cloudidl.objectstore.v1.ObjectStoreService/Copy',
            objectstore_dot_payload__pb2.CopyRequest.SerializeToString,
            objectstore_dot_payload__pb2.CopyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartMultipartUpload(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, '/cloudidl.objectstore.v1.ObjectStoreService/StartMultipartUpload',
            objectstore_dot_payload__pb2.StartMultipartUploadRequest.SerializeToString,
            objectstore_dot_payload__pb2.StartMultipartUploadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UploadPart(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/cloudidl.objectstore.v1.ObjectStoreService/UploadPart',
            objectstore_dot_payload__pb2.UploadPartRequest.SerializeToString,
            objectstore_dot_payload__pb2.UploadPartResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListInProgressMultipartUploads(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, '/cloudidl.objectstore.v1.ObjectStoreService/ListInProgressMultipartUploads',
            objectstore_dot_payload__pb2.ListInProgressMultipartUploadsRequest.SerializeToString,
            objectstore_dot_payload__pb2.ListInProgressMultipartUploadsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TerminateMultipartUpload(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, '/cloudidl.objectstore.v1.ObjectStoreService/TerminateMultipartUpload',
            objectstore_dot_payload__pb2.TerminateMultipartUploadRequest.SerializeToString,
            objectstore_dot_payload__pb2.TerminateMultipartUploadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DownloadPart(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, '/cloudidl.objectstore.v1.ObjectStoreService/DownloadPart',
            objectstore_dot_payload__pb2.DownloadPartRequest.SerializeToString,
            objectstore_dot_payload__pb2.DownloadPartResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Presign(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, '/cloudidl.objectstore.v1.ObjectStoreService/Presign',
            objectstore_dot_payload__pb2.PresignRequest.SerializeToString,
            objectstore_dot_payload__pb2.PresignResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
