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

from kaskada.api.v1alpha import compute_pb2 as kaskada_dot_api_dot_v1alpha_dot_compute__pb2


class ComputeServiceStub(object):
    """Service for querying tables and views
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Analyze = channel.unary_unary(
                '/kaskada.api.v1alpha.ComputeService/Analyze',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeResponse.FromString,
                )
        self.Query = channel.unary_unary(
                '/kaskada.api.v1alpha.ComputeService/Query',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryResponse.FromString,
                )
        self.StreamQuery = channel.unary_stream(
                '/kaskada.api.v1alpha.ComputeService/StreamQuery',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryResponse.FromString,
                )


class ComputeServiceServicer(object):
    """Service for querying tables and views
    """

    def Analyze(self, request, context):
        """Analyzes if a Fenl statement can be executed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Query(self, request, context):
        """Computes the results of a Fenl statement
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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


def add_ComputeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Analyze': grpc.unary_unary_rpc_method_handler(
                    servicer.Analyze,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeResponse.SerializeToString,
            ),
            'Query': grpc.unary_unary_rpc_method_handler(
                    servicer.Query,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryResponse.SerializeToString,
            ),
            'StreamQuery': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamQuery,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.api.v1alpha.ComputeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ComputeService(object):
    """Service for querying tables and views
    """

    @staticmethod
    def Analyze(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, '/kaskada.api.v1alpha.ComputeService/Analyze',
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.AnalyzeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/kaskada.api.v1alpha.ComputeService/Query',
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.QueryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamQuery(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, '/kaskada.api.v1alpha.ComputeService/StreamQuery',
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_compute__pb2.StreamQueryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
