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

from spounge.vector_db.v2 import vector_db_pb2 as vector__db_dot_v2_dot_vector__db__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Upsert = channel.unary_unary(
                '/vector_db.v2.VectorDBService/Upsert',
                request_serializer=vector__db_dot_v2_dot_vector__db__pb2.UpsertRequest.SerializeToString,
                response_deserializer=vector__db_dot_v2_dot_vector__db__pb2.UpsertResponse.FromString,
                _registered_method=True)
        self.Query = channel.unary_unary(
                '/vector_db.v2.VectorDBService/Query',
                request_serializer=vector__db_dot_v2_dot_vector__db__pb2.QueryRequest.SerializeToString,
                response_deserializer=vector__db_dot_v2_dot_vector__db__pb2.QueryResponse.FromString,
                _registered_method=True)


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

    def Upsert(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 Query(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_VectorDBServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Upsert': grpc.unary_unary_rpc_method_handler(
                    servicer.Upsert,
                    request_deserializer=vector__db_dot_v2_dot_vector__db__pb2.UpsertRequest.FromString,
                    response_serializer=vector__db_dot_v2_dot_vector__db__pb2.UpsertResponse.SerializeToString,
            ),
            'Query': grpc.unary_unary_rpc_method_handler(
                    servicer.Query,
                    request_deserializer=vector__db_dot_v2_dot_vector__db__pb2.QueryRequest.FromString,
                    response_serializer=vector__db_dot_v2_dot_vector__db__pb2.QueryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'vector_db.v2.VectorDBService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('vector_db.v2.VectorDBService', rpc_method_handlers)


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

    @staticmethod
    def Upsert(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,
            '/vector_db.v2.VectorDBService/Upsert',
            vector__db_dot_v2_dot_vector__db__pb2.UpsertRequest.SerializeToString,
            vector__db_dot_v2_dot_vector__db__pb2.UpsertResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Query(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,
            '/vector_db.v2.VectorDBService/Query',
            vector__db_dot_v2_dot_vector__db__pb2.QueryRequest.SerializeToString,
            vector__db_dot_v2_dot_vector__db__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
