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

from kaskada.kaskada.v2alpha import query_service_pb2 as kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateQuery = channel.unary_unary(
                '/kaskada.kaskada.v2alpha.QueryService/CreateQuery',
                request_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryResponse.FromString,
                )
        self.DeleteQuery = channel.unary_unary(
                '/kaskada.kaskada.v2alpha.QueryService/DeleteQuery',
                request_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryResponse.FromString,
                )
        self.GetQuery = channel.unary_unary(
                '/kaskada.kaskada.v2alpha.QueryService/GetQuery',
                request_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryResponse.FromString,
                )
        self.ListQueries = channel.unary_unary(
                '/kaskada.kaskada.v2alpha.QueryService/ListQueries',
                request_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesResponse.FromString,
                )


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

    def CreateQuery(self, request, context):
        """Creates a Query for processing
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteQuery(self, request, context):
        """Deletes a query, stopping any processing on it.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def ListQueries(self, request, context):
        """Lists queries.

        The response includes all Queries defined for the Kaskada account.
        If a search string is provided, only Queries matching the search string
        are returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateQuery': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateQuery,
                    request_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryResponse.SerializeToString,
            ),
            'DeleteQuery': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteQuery,
                    request_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryResponse.SerializeToString,
            ),
            'GetQuery': grpc.unary_unary_rpc_method_handler(
                    servicer.GetQuery,
                    request_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryResponse.SerializeToString,
            ),
            'ListQueries': grpc.unary_unary_rpc_method_handler(
                    servicer.ListQueries,
                    request_deserializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v2alpha.QueryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateQuery(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.kaskada.v2alpha.QueryService/CreateQuery',
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.CreateQueryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteQuery(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.kaskada.v2alpha.QueryService/DeleteQuery',
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.DeleteQueryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetQuery(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.kaskada.v2alpha.QueryService/GetQuery',
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.GetQueryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListQueries(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.kaskada.v2alpha.QueryService/ListQueries',
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v2alpha_dot_query__service__pb2.ListQueriesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
