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

import backend_null_pb2 as backend__null__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class NullVolumeServiceStub(object):
    """Back End (network-facing) APIs. This is debug interface for null block devices.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateNullVolume = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/CreateNullVolume',
                request_serializer=backend__null__pb2.CreateNullVolumeRequest.SerializeToString,
                response_deserializer=backend__null__pb2.NullVolume.FromString,
                )
        self.DeleteNullVolume = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/DeleteNullVolume',
                request_serializer=backend__null__pb2.DeleteNullVolumeRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateNullVolume = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/UpdateNullVolume',
                request_serializer=backend__null__pb2.UpdateNullVolumeRequest.SerializeToString,
                response_deserializer=backend__null__pb2.NullVolume.FromString,
                )
        self.ListNullVolumes = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/ListNullVolumes',
                request_serializer=backend__null__pb2.ListNullVolumesRequest.SerializeToString,
                response_deserializer=backend__null__pb2.ListNullVolumesResponse.FromString,
                )
        self.GetNullVolume = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/GetNullVolume',
                request_serializer=backend__null__pb2.GetNullVolumeRequest.SerializeToString,
                response_deserializer=backend__null__pb2.NullVolume.FromString,
                )
        self.StatsNullVolume = channel.unary_unary(
                '/opi_api.storage.v1.NullVolumeService/StatsNullVolume',
                request_serializer=backend__null__pb2.StatsNullVolumeRequest.SerializeToString,
                response_deserializer=backend__null__pb2.StatsNullVolumeResponse.FromString,
                )


class NullVolumeServiceServicer(object):
    """Back End (network-facing) APIs. This is debug interface for null block devices.
    """

    def CreateNullVolume(self, request, context):
        """Create an Null Volume
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def UpdateNullVolume(self, request, context):
        """Update an Null Volume
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListNullVolumes(self, request, context):
        """List Null Volumes
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetNullVolume(self, request, context):
        """Get an Null Volume
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StatsNullVolume(self, request, context):
        """Get an Null Volume statistics
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NullVolumeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateNullVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateNullVolume,
                    request_deserializer=backend__null__pb2.CreateNullVolumeRequest.FromString,
                    response_serializer=backend__null__pb2.NullVolume.SerializeToString,
            ),
            'DeleteNullVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteNullVolume,
                    request_deserializer=backend__null__pb2.DeleteNullVolumeRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateNullVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateNullVolume,
                    request_deserializer=backend__null__pb2.UpdateNullVolumeRequest.FromString,
                    response_serializer=backend__null__pb2.NullVolume.SerializeToString,
            ),
            'ListNullVolumes': grpc.unary_unary_rpc_method_handler(
                    servicer.ListNullVolumes,
                    request_deserializer=backend__null__pb2.ListNullVolumesRequest.FromString,
                    response_serializer=backend__null__pb2.ListNullVolumesResponse.SerializeToString,
            ),
            'GetNullVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.GetNullVolume,
                    request_deserializer=backend__null__pb2.GetNullVolumeRequest.FromString,
                    response_serializer=backend__null__pb2.NullVolume.SerializeToString,
            ),
            'StatsNullVolume': grpc.unary_unary_rpc_method_handler(
                    servicer.StatsNullVolume,
                    request_deserializer=backend__null__pb2.StatsNullVolumeRequest.FromString,
                    response_serializer=backend__null__pb2.StatsNullVolumeResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'opi_api.storage.v1.NullVolumeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class NullVolumeService(object):
    """Back End (network-facing) APIs. This is debug interface for null block devices.
    """

    @staticmethod
    def CreateNullVolume(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.NullVolumeService/CreateNullVolume',
            backend__null__pb2.CreateNullVolumeRequest.SerializeToString,
            backend__null__pb2.NullVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteNullVolume(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.NullVolumeService/DeleteNullVolume',
            backend__null__pb2.DeleteNullVolumeRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateNullVolume(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.NullVolumeService/UpdateNullVolume',
            backend__null__pb2.UpdateNullVolumeRequest.SerializeToString,
            backend__null__pb2.NullVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListNullVolumes(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.NullVolumeService/ListNullVolumes',
            backend__null__pb2.ListNullVolumesRequest.SerializeToString,
            backend__null__pb2.ListNullVolumesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetNullVolume(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.NullVolumeService/GetNullVolume',
            backend__null__pb2.GetNullVolumeRequest.SerializeToString,
            backend__null__pb2.NullVolume.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StatsNullVolume(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.NullVolumeService/StatsNullVolume',
            backend__null__pb2.StatsNullVolumeRequest.SerializeToString,
            backend__null__pb2.StatsNullVolumeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
