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

import cognica.protobuf.fts_analysis_pipeline_pb2 as fts__analysis__pipeline__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.execute = channel.unary_unary(
                '/cognica.rpc.db.fts.FTSAnalysisPipelineService/execute',
                request_serializer=fts__analysis__pipeline__pb2.PipelineExecutionRequest.SerializeToString,
                response_deserializer=fts__analysis__pipeline__pb2.PipelineExecutionResponse.FromString,
                )
        self.execute_adhoc = channel.unary_unary(
                '/cognica.rpc.db.fts.FTSAnalysisPipelineService/execute_adhoc',
                request_serializer=fts__analysis__pipeline__pb2.AdhocPipelineExecutionRequest.SerializeToString,
                response_deserializer=fts__analysis__pipeline__pb2.AdhocPipelineExecutionResponse.FromString,
                )


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

    def execute(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 execute_adhoc(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_FTSAnalysisPipelineServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'execute': grpc.unary_unary_rpc_method_handler(
                    servicer.execute,
                    request_deserializer=fts__analysis__pipeline__pb2.PipelineExecutionRequest.FromString,
                    response_serializer=fts__analysis__pipeline__pb2.PipelineExecutionResponse.SerializeToString,
            ),
            'execute_adhoc': grpc.unary_unary_rpc_method_handler(
                    servicer.execute_adhoc,
                    request_deserializer=fts__analysis__pipeline__pb2.AdhocPipelineExecutionRequest.FromString,
                    response_serializer=fts__analysis__pipeline__pb2.AdhocPipelineExecutionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cognica.rpc.db.fts.FTSAnalysisPipelineService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def execute(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, '/cognica.rpc.db.fts.FTSAnalysisPipelineService/execute',
            fts__analysis__pipeline__pb2.PipelineExecutionRequest.SerializeToString,
            fts__analysis__pipeline__pb2.PipelineExecutionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def execute_adhoc(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, '/cognica.rpc.db.fts.FTSAnalysisPipelineService/execute_adhoc',
            fts__analysis__pipeline__pb2.AdhocPipelineExecutionRequest.SerializeToString,
            fts__analysis__pipeline__pb2.AdhocPipelineExecutionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
