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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import middleend_pb2 as middleend__pb2


class MiddleendServiceStub(object):
    """Middle End (Storage Services) APIs. For example, encryption, compression, raid, QoS, multipath, ...
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateEncryptedVolume = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/CreateEncryptedVolume',
                request_serializer=middleend__pb2.CreateEncryptedVolumeRequest.SerializeToString,
                response_deserializer=middleend__pb2.EncryptedVolume.FromString,
                )
        self.DeleteEncryptedVolume = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/DeleteEncryptedVolume',
                request_serializer=middleend__pb2.DeleteEncryptedVolumeRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateEncryptedVolume = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/UpdateEncryptedVolume',
                request_serializer=middleend__pb2.UpdateEncryptedVolumeRequest.SerializeToString,
                response_deserializer=middleend__pb2.EncryptedVolume.FromString,
                )
        self.ListEncryptedVolumes = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/ListEncryptedVolumes',
                request_serializer=middleend__pb2.ListEncryptedVolumesRequest.SerializeToString,
                response_deserializer=middleend__pb2.ListEncryptedVolumesResponse.FromString,
                )
        self.GetEncryptedVolume = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/GetEncryptedVolume',
                request_serializer=middleend__pb2.GetEncryptedVolumeRequest.SerializeToString,
                response_deserializer=middleend__pb2.EncryptedVolume.FromString,
                )
        self.EncryptedVolumeStats = channel.unary_unary(
                '/opi_api.storage.v1.MiddleendService/EncryptedVolumeStats',
                request_serializer=middleend__pb2.EncryptedVolumeStatsRequest.SerializeToString,
                response_deserializer=middleend__pb2.EncryptedVolumeStatsResponse.FromString,
                )


class MiddleendServiceServicer(object):
    """Middle End (Storage Services) APIs. For example, encryption, compression, raid, QoS, multipath, ...
    """

    def CreateEncryptedVolume(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 DeleteEncryptedVolume(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 UpdateEncryptedVolume(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 ListEncryptedVolumes(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 GetEncryptedVolume(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 EncryptedVolumeStats(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_MiddleendServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateEncryptedVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateEncryptedVolume,
                    request_deserializer=middleend__pb2.CreateEncryptedVolumeRequest.FromString,
                    response_serializer=middleend__pb2.EncryptedVolume.SerializeToString,
            ),
            'DeleteEncryptedVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEncryptedVolume,
                    request_deserializer=middleend__pb2.DeleteEncryptedVolumeRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateEncryptedVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateEncryptedVolume,
                    request_deserializer=middleend__pb2.UpdateEncryptedVolumeRequest.FromString,
                    response_serializer=middleend__pb2.EncryptedVolume.SerializeToString,
            ),
            'ListEncryptedVolumes': grpc.unary_unary_rpc_method_handler(
                    servicer.ListEncryptedVolumes,
                    request_deserializer=middleend__pb2.ListEncryptedVolumesRequest.FromString,
                    response_serializer=middleend__pb2.ListEncryptedVolumesResponse.SerializeToString,
            ),
            'GetEncryptedVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEncryptedVolume,
                    request_deserializer=middleend__pb2.GetEncryptedVolumeRequest.FromString,
                    response_serializer=middleend__pb2.EncryptedVolume.SerializeToString,
            ),
            'EncryptedVolumeStats': grpc.unary_unary_rpc_method_handler(
                    servicer.EncryptedVolumeStats,
                    request_deserializer=middleend__pb2.EncryptedVolumeStatsRequest.FromString,
                    response_serializer=middleend__pb2.EncryptedVolumeStatsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'opi_api.storage.v1.MiddleendService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MiddleendService(object):
    """Middle End (Storage Services) APIs. For example, encryption, compression, raid, QoS, multipath, ...
    """

    @staticmethod
    def CreateEncryptedVolume(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, '/opi_api.storage.v1.MiddleendService/CreateEncryptedVolume',
            middleend__pb2.CreateEncryptedVolumeRequest.SerializeToString,
            middleend__pb2.EncryptedVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEncryptedVolume(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, '/opi_api.storage.v1.MiddleendService/DeleteEncryptedVolume',
            middleend__pb2.DeleteEncryptedVolumeRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateEncryptedVolume(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, '/opi_api.storage.v1.MiddleendService/UpdateEncryptedVolume',
            middleend__pb2.UpdateEncryptedVolumeRequest.SerializeToString,
            middleend__pb2.EncryptedVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListEncryptedVolumes(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, '/opi_api.storage.v1.MiddleendService/ListEncryptedVolumes',
            middleend__pb2.ListEncryptedVolumesRequest.SerializeToString,
            middleend__pb2.ListEncryptedVolumesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEncryptedVolume(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, '/opi_api.storage.v1.MiddleendService/GetEncryptedVolume',
            middleend__pb2.GetEncryptedVolumeRequest.SerializeToString,
            middleend__pb2.EncryptedVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EncryptedVolumeStats(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, '/opi_api.storage.v1.MiddleendService/EncryptedVolumeStats',
            middleend__pb2.EncryptedVolumeStatsRequest.SerializeToString,
            middleend__pb2.EncryptedVolumeStatsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
