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

from cs3.storage.provider.v1beta1 import spaces_api_pb2 as cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2


class SpacesAPIStub(object):
    """Spaces API

    The Spaces API is meant to manipulate spaces in the service.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateStorageSpace = channel.unary_unary(
                '/cs3.storage.provider.v1beta1.SpacesAPI/CreateStorageSpace',
                request_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceRequest.SerializeToString,
                response_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceResponse.FromString,
                )
        self.ListStorageSpaces = channel.unary_unary(
                '/cs3.storage.provider.v1beta1.SpacesAPI/ListStorageSpaces',
                request_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesRequest.SerializeToString,
                response_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesResponse.FromString,
                )
        self.UpdateStorageSpace = channel.unary_unary(
                '/cs3.storage.provider.v1beta1.SpacesAPI/UpdateStorageSpace',
                request_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceRequest.SerializeToString,
                response_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceResponse.FromString,
                )
        self.DeleteStorageSpace = channel.unary_unary(
                '/cs3.storage.provider.v1beta1.SpacesAPI/DeleteStorageSpace',
                request_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceRequest.SerializeToString,
                response_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceResponse.FromString,
                )


class SpacesAPIServicer(object):
    """Spaces API

    The Spaces API is meant to manipulate spaces in the service.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

    def CreateStorageSpace(self, request, context):
        """Creates a storage space.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListStorageSpaces(self, request, context):
        """Lists storage spaces.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateStorageSpace(self, request, context):
        """Updates a storage space.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteStorageSpace(self, request, context):
        """Deletes a storage space.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SpacesAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateStorageSpace': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateStorageSpace,
                    request_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceRequest.FromString,
                    response_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceResponse.SerializeToString,
            ),
            'ListStorageSpaces': grpc.unary_unary_rpc_method_handler(
                    servicer.ListStorageSpaces,
                    request_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesRequest.FromString,
                    response_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesResponse.SerializeToString,
            ),
            'UpdateStorageSpace': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateStorageSpace,
                    request_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceRequest.FromString,
                    response_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceResponse.SerializeToString,
            ),
            'DeleteStorageSpace': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteStorageSpace,
                    request_deserializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceRequest.FromString,
                    response_serializer=cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cs3.storage.provider.v1beta1.SpacesAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    The Spaces API is meant to manipulate spaces in the service.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

    @staticmethod
    def CreateStorageSpace(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, '/cs3.storage.provider.v1beta1.SpacesAPI/CreateStorageSpace',
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceRequest.SerializeToString,
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.CreateStorageSpaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListStorageSpaces(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, '/cs3.storage.provider.v1beta1.SpacesAPI/ListStorageSpaces',
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesRequest.SerializeToString,
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.ListStorageSpacesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateStorageSpace(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, '/cs3.storage.provider.v1beta1.SpacesAPI/UpdateStorageSpace',
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceRequest.SerializeToString,
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.UpdateStorageSpaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteStorageSpace(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, '/cs3.storage.provider.v1beta1.SpacesAPI/DeleteStorageSpace',
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceRequest.SerializeToString,
            cs3_dot_storage_dot_provider_dot_v1beta1_dot_spaces__api__pb2.DeleteStorageSpaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
