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

import documents_pb2 as documents__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetNoVectorDocuments = channel.unary_unary(
                '/utils.DocumentSearchService/GetNoVectorDocuments',
                request_serializer=documents__pb2.GetNoVectorDocumentsRequest.SerializeToString,
                response_deserializer=documents__pb2.GetNoVectorDocumentsResponse.FromString,
                )
        self.UpdateDocument = channel.unary_unary(
                '/utils.DocumentSearchService/UpdateDocument',
                request_serializer=documents__pb2.UpdateDocumentRequest.SerializeToString,
                response_deserializer=documents__pb2.UpdateDocumentResponse.FromString,
                )
        self.GetDocumentById = channel.unary_unary(
                '/utils.DocumentSearchService/GetDocumentById',
                request_serializer=documents__pb2.GetDocumentByIdRequest.SerializeToString,
                response_deserializer=documents__pb2.Document.FromString,
                )


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

    def GetNoVectorDocuments(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 UpdateDocument(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 GetDocumentById(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_DocumentSearchServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetNoVectorDocuments': grpc.unary_unary_rpc_method_handler(
                    servicer.GetNoVectorDocuments,
                    request_deserializer=documents__pb2.GetNoVectorDocumentsRequest.FromString,
                    response_serializer=documents__pb2.GetNoVectorDocumentsResponse.SerializeToString,
            ),
            'UpdateDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateDocument,
                    request_deserializer=documents__pb2.UpdateDocumentRequest.FromString,
                    response_serializer=documents__pb2.UpdateDocumentResponse.SerializeToString,
            ),
            'GetDocumentById': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDocumentById,
                    request_deserializer=documents__pb2.GetDocumentByIdRequest.FromString,
                    response_serializer=documents__pb2.Document.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'utils.DocumentSearchService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetNoVectorDocuments(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, '/utils.DocumentSearchService/GetNoVectorDocuments',
            documents__pb2.GetNoVectorDocumentsRequest.SerializeToString,
            documents__pb2.GetNoVectorDocumentsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateDocument(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, '/utils.DocumentSearchService/UpdateDocument',
            documents__pb2.UpdateDocumentRequest.SerializeToString,
            documents__pb2.UpdateDocumentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDocumentById(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, '/utils.DocumentSearchService/GetDocumentById',
            documents__pb2.GetDocumentByIdRequest.SerializeToString,
            documents__pb2.Document.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
