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

import cognica.protobuf.key_value_db_pb2 as key__value__db__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.put = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/put',
                request_serializer=key__value__db__pb2.PutRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.PutResponse.FromString,
                )
        self.remove = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/remove',
                request_serializer=key__value__db__pb2.RemoveRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.RemoveResponse.FromString,
                )
        self.get = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/get',
                request_serializer=key__value__db__pb2.GetRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.GetResponse.FromString,
                )
        self.mget = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/mget',
                request_serializer=key__value__db__pb2.MultiGetRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.MultiGetResponse.FromString,
                )
        self.put_batch = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/put_batch',
                request_serializer=key__value__db__pb2.BatchedPutRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.BatchedPutResponse.FromString,
                )
        self.remove_batch = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/remove_batch',
                request_serializer=key__value__db__pb2.BatchedRemoveRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.BatchedRemoveResponse.FromString,
                )
        self.get_batch = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyValueDBService/get_batch',
                request_serializer=key__value__db__pb2.BatchedGetRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.BatchedGetResponse.FromString,
                )


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

    def put(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 remove(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 get(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 mget(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 put_batch(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 remove_batch(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 get_batch(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_KeyValueDBServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'put': grpc.unary_unary_rpc_method_handler(
                    servicer.put,
                    request_deserializer=key__value__db__pb2.PutRequest.FromString,
                    response_serializer=key__value__db__pb2.PutResponse.SerializeToString,
            ),
            'remove': grpc.unary_unary_rpc_method_handler(
                    servicer.remove,
                    request_deserializer=key__value__db__pb2.RemoveRequest.FromString,
                    response_serializer=key__value__db__pb2.RemoveResponse.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=key__value__db__pb2.GetRequest.FromString,
                    response_serializer=key__value__db__pb2.GetResponse.SerializeToString,
            ),
            'mget': grpc.unary_unary_rpc_method_handler(
                    servicer.mget,
                    request_deserializer=key__value__db__pb2.MultiGetRequest.FromString,
                    response_serializer=key__value__db__pb2.MultiGetResponse.SerializeToString,
            ),
            'put_batch': grpc.unary_unary_rpc_method_handler(
                    servicer.put_batch,
                    request_deserializer=key__value__db__pb2.BatchedPutRequest.FromString,
                    response_serializer=key__value__db__pb2.BatchedPutResponse.SerializeToString,
            ),
            'remove_batch': grpc.unary_unary_rpc_method_handler(
                    servicer.remove_batch,
                    request_deserializer=key__value__db__pb2.BatchedRemoveRequest.FromString,
                    response_serializer=key__value__db__pb2.BatchedRemoveResponse.SerializeToString,
            ),
            'get_batch': grpc.unary_unary_rpc_method_handler(
                    servicer.get_batch,
                    request_deserializer=key__value__db__pb2.BatchedGetRequest.FromString,
                    response_serializer=key__value__db__pb2.BatchedGetResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cognica.rpc.db.kv.KeyValueDBService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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, '/cognica.rpc.db.kv.KeyValueDBService/put',
            key__value__db__pb2.PutRequest.SerializeToString,
            key__value__db__pb2.PutResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def remove(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, '/cognica.rpc.db.kv.KeyValueDBService/remove',
            key__value__db__pb2.RemoveRequest.SerializeToString,
            key__value__db__pb2.RemoveResponse.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, '/cognica.rpc.db.kv.KeyValueDBService/get',
            key__value__db__pb2.GetRequest.SerializeToString,
            key__value__db__pb2.GetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def mget(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, '/cognica.rpc.db.kv.KeyValueDBService/mget',
            key__value__db__pb2.MultiGetRequest.SerializeToString,
            key__value__db__pb2.MultiGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def put_batch(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, '/cognica.rpc.db.kv.KeyValueDBService/put_batch',
            key__value__db__pb2.BatchedPutRequest.SerializeToString,
            key__value__db__pb2.BatchedPutResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def remove_batch(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, '/cognica.rpc.db.kv.KeyValueDBService/remove_batch',
            key__value__db__pb2.BatchedRemoveRequest.SerializeToString,
            key__value__db__pb2.BatchedRemoveResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_batch(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, '/cognica.rpc.db.kv.KeyValueDBService/get_batch',
            key__value__db__pb2.BatchedGetRequest.SerializeToString,
            key__value__db__pb2.BatchedGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create_keyspace = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyspaceManagerService/create_keyspace',
                request_serializer=key__value__db__pb2.CreateKeyspaceRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.CreateKeyspaceResponse.FromString,
                )
        self.drop_keyspace = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyspaceManagerService/drop_keyspace',
                request_serializer=key__value__db__pb2.DropKeyspaceRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.DropKeyspaceResponse.FromString,
                )
        self.truncate_keyspace = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyspaceManagerService/truncate_keyspace',
                request_serializer=key__value__db__pb2.TruncateKeyspaceRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.TruncateKeyspaceResponse.FromString,
                )
        self.list_keyspaces = channel.unary_unary(
                '/cognica.rpc.db.kv.KeyspaceManagerService/list_keyspaces',
                request_serializer=key__value__db__pb2.ListKeyspacesRequest.SerializeToString,
                response_deserializer=key__value__db__pb2.ListKeyspacesResponse.FromString,
                )


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

    def create_keyspace(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 drop_keyspace(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 truncate_keyspace(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 list_keyspaces(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_KeyspaceManagerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create_keyspace': grpc.unary_unary_rpc_method_handler(
                    servicer.create_keyspace,
                    request_deserializer=key__value__db__pb2.CreateKeyspaceRequest.FromString,
                    response_serializer=key__value__db__pb2.CreateKeyspaceResponse.SerializeToString,
            ),
            'drop_keyspace': grpc.unary_unary_rpc_method_handler(
                    servicer.drop_keyspace,
                    request_deserializer=key__value__db__pb2.DropKeyspaceRequest.FromString,
                    response_serializer=key__value__db__pb2.DropKeyspaceResponse.SerializeToString,
            ),
            'truncate_keyspace': grpc.unary_unary_rpc_method_handler(
                    servicer.truncate_keyspace,
                    request_deserializer=key__value__db__pb2.TruncateKeyspaceRequest.FromString,
                    response_serializer=key__value__db__pb2.TruncateKeyspaceResponse.SerializeToString,
            ),
            'list_keyspaces': grpc.unary_unary_rpc_method_handler(
                    servicer.list_keyspaces,
                    request_deserializer=key__value__db__pb2.ListKeyspacesRequest.FromString,
                    response_serializer=key__value__db__pb2.ListKeyspacesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cognica.rpc.db.kv.KeyspaceManagerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def create_keyspace(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, '/cognica.rpc.db.kv.KeyspaceManagerService/create_keyspace',
            key__value__db__pb2.CreateKeyspaceRequest.SerializeToString,
            key__value__db__pb2.CreateKeyspaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def drop_keyspace(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, '/cognica.rpc.db.kv.KeyspaceManagerService/drop_keyspace',
            key__value__db__pb2.DropKeyspaceRequest.SerializeToString,
            key__value__db__pb2.DropKeyspaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def truncate_keyspace(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, '/cognica.rpc.db.kv.KeyspaceManagerService/truncate_keyspace',
            key__value__db__pb2.TruncateKeyspaceRequest.SerializeToString,
            key__value__db__pb2.TruncateKeyspaceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list_keyspaces(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, '/cognica.rpc.db.kv.KeyspaceManagerService/list_keyspaces',
            key__value__db__pb2.ListKeyspacesRequest.SerializeToString,
            key__value__db__pb2.ListKeyspacesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
