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

from . import vector_pb2 as swarndb_dot_v1_dot_vector__pb2

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in swarndb/v1/vector_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Insert = channel.unary_unary(
                '/swarndb.v1.VectorService/Insert',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.InsertRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.InsertResponse.FromString,
                _registered_method=True)
        self.Get = channel.unary_unary(
                '/swarndb.v1.VectorService/Get',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.GetVectorRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.GetVectorResponse.FromString,
                _registered_method=True)
        self.Update = channel.unary_unary(
                '/swarndb.v1.VectorService/Update',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.UpdateRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.UpdateResponse.FromString,
                _registered_method=True)
        self.Delete = channel.unary_unary(
                '/swarndb.v1.VectorService/Delete',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.DeleteVectorRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.DeleteVectorResponse.FromString,
                _registered_method=True)
        self.BulkInsert = channel.stream_unary(
                '/swarndb.v1.VectorService/BulkInsert',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.InsertRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.FromString,
                _registered_method=True)
        self.BulkInsertWithOptions = channel.stream_unary(
                '/swarndb.v1.VectorService/BulkInsertWithOptions',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertStreamMessage.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.FromString,
                _registered_method=True)
        self.Optimize = channel.unary_unary(
                '/swarndb.v1.VectorService/Optimize',
                request_serializer=swarndb_dot_v1_dot_vector__pb2.OptimizeRequest.SerializeToString,
                response_deserializer=swarndb_dot_v1_dot_vector__pb2.OptimizeResponse.FromString,
                _registered_method=True)


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

    def Insert(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 Update(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 Delete(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 BulkInsert(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 BulkInsertWithOptions(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 Optimize(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_VectorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Insert': grpc.unary_unary_rpc_method_handler(
                    servicer.Insert,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.InsertRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.InsertResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.GetVectorRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.GetVectorResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.UpdateRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.UpdateResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.DeleteVectorRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.DeleteVectorResponse.SerializeToString,
            ),
            'BulkInsert': grpc.stream_unary_rpc_method_handler(
                    servicer.BulkInsert,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.InsertRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.SerializeToString,
            ),
            'BulkInsertWithOptions': grpc.stream_unary_rpc_method_handler(
                    servicer.BulkInsertWithOptions,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertStreamMessage.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.SerializeToString,
            ),
            'Optimize': grpc.unary_unary_rpc_method_handler(
                    servicer.Optimize,
                    request_deserializer=swarndb_dot_v1_dot_vector__pb2.OptimizeRequest.FromString,
                    response_serializer=swarndb_dot_v1_dot_vector__pb2.OptimizeResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'swarndb.v1.VectorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('swarndb.v1.VectorService', rpc_method_handlers)


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

    @staticmethod
    def Insert(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,
            '/swarndb.v1.VectorService/Insert',
            swarndb_dot_v1_dot_vector__pb2.InsertRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.InsertResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @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,
            '/swarndb.v1.VectorService/Get',
            swarndb_dot_v1_dot_vector__pb2.GetVectorRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.GetVectorResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Update(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,
            '/swarndb.v1.VectorService/Update',
            swarndb_dot_v1_dot_vector__pb2.UpdateRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.UpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Delete(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,
            '/swarndb.v1.VectorService/Delete',
            swarndb_dot_v1_dot_vector__pb2.DeleteVectorRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.DeleteVectorResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BulkInsert(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,
            '/swarndb.v1.VectorService/BulkInsert',
            swarndb_dot_v1_dot_vector__pb2.InsertRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BulkInsertWithOptions(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,
            '/swarndb.v1.VectorService/BulkInsertWithOptions',
            swarndb_dot_v1_dot_vector__pb2.BulkInsertStreamMessage.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.BulkInsertResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Optimize(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,
            '/swarndb.v1.VectorService/Optimize',
            swarndb_dot_v1_dot_vector__pb2.OptimizeRequest.SerializeToString,
            swarndb_dot_v1_dot_vector__pb2.OptimizeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
