# 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
from pcas.keyvalue import _condition_pb2 as pcas_dot_keyvalue_dot___condition__pb2
from pcas.keyvalue import _kvdb_pb2 as pcas_dot_keyvalue_dot___kvdb__pb2


class KvdbStub(object):
    """Kvdb describes the tasks available to a client.

    Every call must include the following metadata:
    - db_name               The DB name
    Every call to CountWhere, Insert, UpdateWhere, SelectWhereLimit, and
    DeleteWhere must also include the following metadata:
    - table_name            The table name (may be the empty string)
    The following optional metadata may also be included:
    - app_name              The name of this application

    On return, the trailer metadata may be used to encode any error. The trailer
    metadata should be inspected for the presence of:
    - error                 A string description of the error
    - error_code            The corresponding integer error code (optional)
    Additional information may also be included in the trailer metadata to
    describe the cause of the error. If present, this is of the form:
    - error_cause_N         A string description of the error
    - error_cause_N_code    The corresponding integer error code (optional)
    where the N are successive positive integers starting at 1.

    The possible error codes are documented at:
    https://godoc.org/bitbucket.org/pcas/keyvalue/errors
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListTables = channel.unary_unary(
                '/kvdb.Kvdb/ListTables',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.TableNames.FromString,
                )
        self.CreateTable = channel.unary_unary(
                '/kvdb.Kvdb/CreateTable',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.NameAndTemplate.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DescribeTable = channel.unary_unary(
                '/kvdb.Kvdb/DescribeTable',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
                )
        self.DeleteTable = channel.unary_unary(
                '/kvdb.Kvdb/DeleteTable',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Name.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.RenameTable = channel.unary_unary(
                '/kvdb.Kvdb/RenameTable',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.SrcAndDstNames.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.CountWhere = channel.unary_unary(
                '/kvdb.Kvdb/CountWhere',
                request_serializer=pcas_dot_keyvalue_dot___condition__pb2.Condition.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
                )
        self.Insert = channel.stream_unary(
                '/kvdb.Kvdb/Insert',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateWhere = channel.unary_unary(
                '/kvdb.Kvdb/UpdateWhere',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.ConditionAndReplacement.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
                )
        self.SelectWhereLimit = channel.unary_stream(
                '/kvdb.Kvdb/SelectWhereLimit',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.ConditionTemplateOrderAndLimit.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
                )
        self.DeleteWhere = channel.unary_unary(
                '/kvdb.Kvdb/DeleteWhere',
                request_serializer=pcas_dot_keyvalue_dot___condition__pb2.Condition.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
                )
        self.AddIndex = channel.unary_unary(
                '/kvdb.Kvdb/AddIndex',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.AddUniqueIndex = channel.unary_unary(
                '/kvdb.Kvdb/AddUniqueIndex',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteIndex = channel.unary_unary(
                '/kvdb.Kvdb/DeleteIndex',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListIndices = channel.unary_unary(
                '/kvdb.Kvdb/ListIndices',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.IndexList.FromString,
                )
        self.AddKeys = channel.unary_unary(
                '/kvdb.Kvdb/AddKeys',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteKeys = channel.unary_unary(
                '/kvdb.Kvdb/DeleteKeys',
                request_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.KeyList.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class KvdbServicer(object):
    """Kvdb describes the tasks available to a client.

    Every call must include the following metadata:
    - db_name               The DB name
    Every call to CountWhere, Insert, UpdateWhere, SelectWhereLimit, and
    DeleteWhere must also include the following metadata:
    - table_name            The table name (may be the empty string)
    The following optional metadata may also be included:
    - app_name              The name of this application

    On return, the trailer metadata may be used to encode any error. The trailer
    metadata should be inspected for the presence of:
    - error                 A string description of the error
    - error_code            The corresponding integer error code (optional)
    Additional information may also be included in the trailer metadata to
    describe the cause of the error. If present, this is of the form:
    - error_cause_N         A string description of the error
    - error_cause_N_code    The corresponding integer error code (optional)
    where the N are successive positive integers starting at 1.

    The possible error codes are documented at:
    https://godoc.org/bitbucket.org/pcas/keyvalue/errors
    """

    def ListTables(self, request, context):
        """ListTables returns the tables in the database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateTable(self, request, context):
        """CreateTable creates a table with the given name and template.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DescribeTable(self, request, context):
        """DescribeTable returns a best-guess template for the data in the table.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteTable(self, request, context):
        """DeleteTable deletes the table with the given name.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RenameTable(self, request, context):
        """RenameTable changes the name of a table in the database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CountWhere(self, request, context):
        """CountWhere returns the number of records in the table that match the
        given condition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Insert(self, request_iterator, context):
        """Insert inserts the records from stream into the table.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateWhere(self, request, context):
        """UpdateWhere updates all records in the table that match the given
        condition by setting all keys present in the given record to the
        corresponding values. Returns the number of records updated.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SelectWhereLimit(self, request, context):
        """SelectWhereLimit returns a stream of records matching the given
        condition. The returned records will be in the form specified by the
        given template. If the given limit is non-negative then at most that
        many records will be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteWhere(self, request, context):
        """DeleteWhere deletes those records in the table that match the given
        condition. Returns the number of records deleted.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddIndex(self, request, context):
        """AddIndex adds an index on the given key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddUniqueIndex(self, request, context):
        """AddUniqueIndex adds an index on the given key and the constraint that,
        for each value of this key, there is at most one record with that value. 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteIndex(self, request, context):
        """DeleteIndex deletes the index on the given key. 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListIndices(self, request, context):
        """ListIndices lists the keys for which indices are present.  
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddKeys(self, request, context):
        """AddKeys updates each record r in the table, adding any keys in the given
        record that are not already present along with the corresponding values. Any
        keys that are already present in r will be left unmodified.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteKeys(self, request, context):
        """DeleteKeys updates all records in the table, deleting the specified keys if
        present.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_KvdbServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListTables': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTables,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.TableNames.SerializeToString,
            ),
            'CreateTable': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTable,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.NameAndTemplate.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DescribeTable': grpc.unary_unary_rpc_method_handler(
                    servicer.DescribeTable,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
            ),
            'DeleteTable': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTable,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Name.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RenameTable': grpc.unary_unary_rpc_method_handler(
                    servicer.RenameTable,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.SrcAndDstNames.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CountWhere': grpc.unary_unary_rpc_method_handler(
                    servicer.CountWhere,
                    request_deserializer=pcas_dot_keyvalue_dot___condition__pb2.Condition.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.SerializeToString,
            ),
            'Insert': grpc.stream_unary_rpc_method_handler(
                    servicer.Insert,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateWhere': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateWhere,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.ConditionAndReplacement.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.SerializeToString,
            ),
            'SelectWhereLimit': grpc.unary_stream_rpc_method_handler(
                    servicer.SelectWhereLimit,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.ConditionTemplateOrderAndLimit.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
            ),
            'DeleteWhere': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteWhere,
                    request_deserializer=pcas_dot_keyvalue_dot___condition__pb2.Condition.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.SerializeToString,
            ),
            'AddIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.AddIndex,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'AddUniqueIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.AddUniqueIndex,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteIndex,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Index.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListIndices': grpc.unary_unary_rpc_method_handler(
                    servicer.ListIndices,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pcas_dot_keyvalue_dot___kvdb__pb2.IndexList.SerializeToString,
            ),
            'AddKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.AddKeys,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteKeys,
                    request_deserializer=pcas_dot_keyvalue_dot___kvdb__pb2.KeyList.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kvdb.Kvdb', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Kvdb(object):
    """Kvdb describes the tasks available to a client.

    Every call must include the following metadata:
    - db_name               The DB name
    Every call to CountWhere, Insert, UpdateWhere, SelectWhereLimit, and
    DeleteWhere must also include the following metadata:
    - table_name            The table name (may be the empty string)
    The following optional metadata may also be included:
    - app_name              The name of this application

    On return, the trailer metadata may be used to encode any error. The trailer
    metadata should be inspected for the presence of:
    - error                 A string description of the error
    - error_code            The corresponding integer error code (optional)
    Additional information may also be included in the trailer metadata to
    describe the cause of the error. If present, this is of the form:
    - error_cause_N         A string description of the error
    - error_cause_N_code    The corresponding integer error code (optional)
    where the N are successive positive integers starting at 1.

    The possible error codes are documented at:
    https://godoc.org/bitbucket.org/pcas/keyvalue/errors
    """

    @staticmethod
    def ListTables(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, '/kvdb.Kvdb/ListTables',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.TableNames.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateTable(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, '/kvdb.Kvdb/CreateTable',
            pcas_dot_keyvalue_dot___kvdb__pb2.NameAndTemplate.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DescribeTable(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, '/kvdb.Kvdb/DescribeTable',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteTable(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, '/kvdb.Kvdb/DeleteTable',
            pcas_dot_keyvalue_dot___kvdb__pb2.Name.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RenameTable(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, '/kvdb.Kvdb/RenameTable',
            pcas_dot_keyvalue_dot___kvdb__pb2.SrcAndDstNames.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CountWhere(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, '/kvdb.Kvdb/CountWhere',
            pcas_dot_keyvalue_dot___condition__pb2.Condition.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Insert(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, '/kvdb.Kvdb/Insert',
            pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateWhere(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, '/kvdb.Kvdb/UpdateWhere',
            pcas_dot_keyvalue_dot___kvdb__pb2.ConditionAndReplacement.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SelectWhereLimit(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, '/kvdb.Kvdb/SelectWhereLimit',
            pcas_dot_keyvalue_dot___kvdb__pb2.ConditionTemplateOrderAndLimit.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.Record.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteWhere(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, '/kvdb.Kvdb/DeleteWhere',
            pcas_dot_keyvalue_dot___condition__pb2.Condition.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.NumberOfRecords.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddIndex(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, '/kvdb.Kvdb/AddIndex',
            pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddUniqueIndex(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, '/kvdb.Kvdb/AddUniqueIndex',
            pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteIndex(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, '/kvdb.Kvdb/DeleteIndex',
            pcas_dot_keyvalue_dot___kvdb__pb2.Index.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListIndices(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, '/kvdb.Kvdb/ListIndices',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pcas_dot_keyvalue_dot___kvdb__pb2.IndexList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddKeys(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, '/kvdb.Kvdb/AddKeys',
            pcas_dot_keyvalue_dot___kvdb__pb2.Record.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteKeys(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, '/kvdb.Kvdb/DeleteKeys',
            pcas_dot_keyvalue_dot___kvdb__pb2.KeyList.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
