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

import Definitions_pb2 as Definitions__pb2
import KeyValueStore_pb2 as KeyValueStore__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetValue = channel.stream_unary(
                '/rips.KeyValueStore/SetValue',
                request_serializer=KeyValueStore__pb2.KeyValueStoreInputChunk.SerializeToString,
                response_deserializer=Definitions__pb2.ClientToServerStreamReply.FromString,
                )
        self.GetValue = channel.unary_stream(
                '/rips.KeyValueStore/GetValue',
                request_serializer=KeyValueStore__pb2.KeyValueStoreOutputRequest.SerializeToString,
                response_deserializer=KeyValueStore__pb2.KeyValueStoreOutputChunk.FromString,
                )
        self.RemoveValue = channel.unary_unary(
                '/rips.KeyValueStore/RemoveValue',
                request_serializer=KeyValueStore__pb2.KeyValueStoreRemoveRequest.SerializeToString,
                response_deserializer=Definitions__pb2.Empty.FromString,
                )


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

    def SetValue(self, request_iterator, 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 GetValue(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 RemoveValue(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_KeyValueStoreServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetValue': grpc.stream_unary_rpc_method_handler(
                    servicer.SetValue,
                    request_deserializer=KeyValueStore__pb2.KeyValueStoreInputChunk.FromString,
                    response_serializer=Definitions__pb2.ClientToServerStreamReply.SerializeToString,
            ),
            'GetValue': grpc.unary_stream_rpc_method_handler(
                    servicer.GetValue,
                    request_deserializer=KeyValueStore__pb2.KeyValueStoreOutputRequest.FromString,
                    response_serializer=KeyValueStore__pb2.KeyValueStoreOutputChunk.SerializeToString,
            ),
            'RemoveValue': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveValue,
                    request_deserializer=KeyValueStore__pb2.KeyValueStoreRemoveRequest.FromString,
                    response_serializer=Definitions__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'rips.KeyValueStore', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SetValue(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, '/rips.KeyValueStore/SetValue',
            KeyValueStore__pb2.KeyValueStoreInputChunk.SerializeToString,
            Definitions__pb2.ClientToServerStreamReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetValue(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, '/rips.KeyValueStore/GetValue',
            KeyValueStore__pb2.KeyValueStoreOutputRequest.SerializeToString,
            KeyValueStore__pb2.KeyValueStoreOutputChunk.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveValue(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, '/rips.KeyValueStore/RemoveValue',
            KeyValueStore__pb2.KeyValueStoreRemoveRequest.SerializeToString,
            Definitions__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
