# 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 intents_pb2 as intents__pb2
from . import nlp_server_pb2 as nlp__server__pb2
from . import projects_pb2 as projects__pb2

GRPC_GENERATED_VERSION = '1.68.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},'
        + f' but the generated code in nlp_server_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 NLPServerStub(object):
    """Interface exported by the server.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetFunctions = channel.unary_stream(
                '/aristech.nlp.NLPServer/GetFunctions',
                request_serializer=nlp__server__pb2.FunctionRequest.SerializeToString,
                response_deserializer=nlp__server__pb2.Function.FromString,
                _registered_method=True)
        self.RunFunctions = channel.unary_unary(
                '/aristech.nlp.NLPServer/RunFunctions',
                request_serializer=nlp__server__pb2.RunFunctionsRequest.SerializeToString,
                response_deserializer=nlp__server__pb2.RunFunctionsResponse.FromString,
                _registered_method=True)
        self.UpdateContent = channel.unary_unary(
                '/aristech.nlp.NLPServer/UpdateContent',
                request_serializer=intents__pb2.UpdateContentRequest.SerializeToString,
                response_deserializer=intents__pb2.UpdateContentResponse.FromString,
                _registered_method=True)
        self.RemoveContent = channel.unary_unary(
                '/aristech.nlp.NLPServer/RemoveContent',
                request_serializer=intents__pb2.RemoveContentRequest.SerializeToString,
                response_deserializer=intents__pb2.RemoveContentResponse.FromString,
                _registered_method=True)
        self.GetContent = channel.unary_stream(
                '/aristech.nlp.NLPServer/GetContent',
                request_serializer=intents__pb2.GetContentRequest.SerializeToString,
                response_deserializer=intents__pb2.GetContentResponse.FromString,
                _registered_method=True)
        self.AddProject = channel.unary_unary(
                '/aristech.nlp.NLPServer/AddProject',
                request_serializer=projects__pb2.AddProjectRequest.SerializeToString,
                response_deserializer=projects__pb2.AddProjectResponse.FromString,
                _registered_method=True)
        self.RemoveProject = channel.unary_unary(
                '/aristech.nlp.NLPServer/RemoveProject',
                request_serializer=projects__pb2.RemoveProjectRequest.SerializeToString,
                response_deserializer=projects__pb2.RemoveProjectResponse.FromString,
                _registered_method=True)
        self.UpdateProject = channel.unary_unary(
                '/aristech.nlp.NLPServer/UpdateProject',
                request_serializer=projects__pb2.UpdateProjectRequest.SerializeToString,
                response_deserializer=projects__pb2.UpdateProjectResponse.FromString,
                _registered_method=True)
        self.GetProjects = channel.unary_stream(
                '/aristech.nlp.NLPServer/GetProjects',
                request_serializer=projects__pb2.GetProjectsRequest.SerializeToString,
                response_deserializer=projects__pb2.Project.FromString,
                _registered_method=True)
        self.GetIntents = channel.unary_stream(
                '/aristech.nlp.NLPServer/GetIntents',
                request_serializer=intents__pb2.GetIntentsRequest.SerializeToString,
                response_deserializer=intents__pb2.GetIntentsResponse.FromString,
                _registered_method=True)
        self.GetScoreLimits = channel.unary_unary(
                '/aristech.nlp.NLPServer/GetScoreLimits',
                request_serializer=intents__pb2.GetScoreLimitsRequest.SerializeToString,
                response_deserializer=intents__pb2.GetScoreLimitsResponse.FromString,
                _registered_method=True)
        self.GetEmbeddingModels = channel.unary_stream(
                '/aristech.nlp.NLPServer/GetEmbeddingModels',
                request_serializer=projects__pb2.GetEmbeddingModelsRequest.SerializeToString,
                response_deserializer=projects__pb2.EmbeddingModel.FromString,
                _registered_method=True)


class NLPServerServicer(object):
    """Interface exported by the server.
    """

    def GetFunctions(self, request, context):
        """A simple RPC.
        returns all available processing Models.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RunFunctions(self, request, context):
        """A server-to-client streaming method
        Returns the processed text
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateContent(self, request, context):
        """Method to add content to a vector database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveContent(self, request, context):
        """Method to remove content from a vector database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetContent(self, request, context):
        """Method to get content from a vector database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddProject(self, request, context):
        """Method to initialize a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveProject(self, request, context):
        """Method to remove Project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateProject(self, request, context):
        """update the settings of a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetProjects(self, request, context):
        """Method to get projects from a vector database
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIntents(self, request, context):
        """Method to get intents from a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetScoreLimits(self, request, context):
        """Method to get score limits for a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEmbeddingModels(self, request, context):
        """get the available embedding models to be used for similarity search
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NLPServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetFunctions': grpc.unary_stream_rpc_method_handler(
                    servicer.GetFunctions,
                    request_deserializer=nlp__server__pb2.FunctionRequest.FromString,
                    response_serializer=nlp__server__pb2.Function.SerializeToString,
            ),
            'RunFunctions': grpc.unary_unary_rpc_method_handler(
                    servicer.RunFunctions,
                    request_deserializer=nlp__server__pb2.RunFunctionsRequest.FromString,
                    response_serializer=nlp__server__pb2.RunFunctionsResponse.SerializeToString,
            ),
            'UpdateContent': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateContent,
                    request_deserializer=intents__pb2.UpdateContentRequest.FromString,
                    response_serializer=intents__pb2.UpdateContentResponse.SerializeToString,
            ),
            'RemoveContent': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveContent,
                    request_deserializer=intents__pb2.RemoveContentRequest.FromString,
                    response_serializer=intents__pb2.RemoveContentResponse.SerializeToString,
            ),
            'GetContent': grpc.unary_stream_rpc_method_handler(
                    servicer.GetContent,
                    request_deserializer=intents__pb2.GetContentRequest.FromString,
                    response_serializer=intents__pb2.GetContentResponse.SerializeToString,
            ),
            'AddProject': grpc.unary_unary_rpc_method_handler(
                    servicer.AddProject,
                    request_deserializer=projects__pb2.AddProjectRequest.FromString,
                    response_serializer=projects__pb2.AddProjectResponse.SerializeToString,
            ),
            'RemoveProject': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveProject,
                    request_deserializer=projects__pb2.RemoveProjectRequest.FromString,
                    response_serializer=projects__pb2.RemoveProjectResponse.SerializeToString,
            ),
            'UpdateProject': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateProject,
                    request_deserializer=projects__pb2.UpdateProjectRequest.FromString,
                    response_serializer=projects__pb2.UpdateProjectResponse.SerializeToString,
            ),
            'GetProjects': grpc.unary_stream_rpc_method_handler(
                    servicer.GetProjects,
                    request_deserializer=projects__pb2.GetProjectsRequest.FromString,
                    response_serializer=projects__pb2.Project.SerializeToString,
            ),
            'GetIntents': grpc.unary_stream_rpc_method_handler(
                    servicer.GetIntents,
                    request_deserializer=intents__pb2.GetIntentsRequest.FromString,
                    response_serializer=intents__pb2.GetIntentsResponse.SerializeToString,
            ),
            'GetScoreLimits': grpc.unary_unary_rpc_method_handler(
                    servicer.GetScoreLimits,
                    request_deserializer=intents__pb2.GetScoreLimitsRequest.FromString,
                    response_serializer=intents__pb2.GetScoreLimitsResponse.SerializeToString,
            ),
            'GetEmbeddingModels': grpc.unary_stream_rpc_method_handler(
                    servicer.GetEmbeddingModels,
                    request_deserializer=projects__pb2.GetEmbeddingModelsRequest.FromString,
                    response_serializer=projects__pb2.EmbeddingModel.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aristech.nlp.NLPServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('aristech.nlp.NLPServer', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class NLPServer(object):
    """Interface exported by the server.
    """

    @staticmethod
    def GetFunctions(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,
            '/aristech.nlp.NLPServer/GetFunctions',
            nlp__server__pb2.FunctionRequest.SerializeToString,
            nlp__server__pb2.Function.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RunFunctions(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,
            '/aristech.nlp.NLPServer/RunFunctions',
            nlp__server__pb2.RunFunctionsRequest.SerializeToString,
            nlp__server__pb2.RunFunctionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateContent(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,
            '/aristech.nlp.NLPServer/UpdateContent',
            intents__pb2.UpdateContentRequest.SerializeToString,
            intents__pb2.UpdateContentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveContent(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,
            '/aristech.nlp.NLPServer/RemoveContent',
            intents__pb2.RemoveContentRequest.SerializeToString,
            intents__pb2.RemoveContentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetContent(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,
            '/aristech.nlp.NLPServer/GetContent',
            intents__pb2.GetContentRequest.SerializeToString,
            intents__pb2.GetContentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddProject(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,
            '/aristech.nlp.NLPServer/AddProject',
            projects__pb2.AddProjectRequest.SerializeToString,
            projects__pb2.AddProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveProject(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,
            '/aristech.nlp.NLPServer/RemoveProject',
            projects__pb2.RemoveProjectRequest.SerializeToString,
            projects__pb2.RemoveProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateProject(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,
            '/aristech.nlp.NLPServer/UpdateProject',
            projects__pb2.UpdateProjectRequest.SerializeToString,
            projects__pb2.UpdateProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetProjects(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,
            '/aristech.nlp.NLPServer/GetProjects',
            projects__pb2.GetProjectsRequest.SerializeToString,
            projects__pb2.Project.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetIntents(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,
            '/aristech.nlp.NLPServer/GetIntents',
            intents__pb2.GetIntentsRequest.SerializeToString,
            intents__pb2.GetIntentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetScoreLimits(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,
            '/aristech.nlp.NLPServer/GetScoreLimits',
            intents__pb2.GetScoreLimitsRequest.SerializeToString,
            intents__pb2.GetScoreLimitsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetEmbeddingModels(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,
            '/aristech.nlp.NLPServer/GetEmbeddingModels',
            projects__pb2.GetEmbeddingModelsRequest.SerializeToString,
            projects__pb2.EmbeddingModel.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
