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

import grpc

from chalk._gen.chalk.server.v1 import named_query_pb2 as chalk_dot_server_dot_v1_dot_named__query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAllNamedQueries = channel.unary_unary(
            "/chalk.server.v1.NamedQueryService/GetAllNamedQueries",
            request_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesResponse.FromString,
        )
        self.GetAllNamedQueriesActiveDeployment = channel.unary_unary(
            "/chalk.server.v1.NamedQueryService/GetAllNamedQueriesActiveDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentResponse.FromString,
        )
        self.GetNamedQueryByName = channel.unary_unary(
            "/chalk.server.v1.NamedQueryService/GetNamedQueryByName",
            request_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameResponse.FromString,
        )


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

    def GetAllNamedQueries(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 GetAllNamedQueriesActiveDeployment(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 GetNamedQueryByName(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_NamedQueryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetAllNamedQueries": grpc.unary_unary_rpc_method_handler(
            servicer.GetAllNamedQueries,
            request_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesResponse.SerializeToString,
        ),
        "GetAllNamedQueriesActiveDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.GetAllNamedQueriesActiveDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentResponse.SerializeToString,
        ),
        "GetNamedQueryByName": grpc.unary_unary_rpc_method_handler(
            servicer.GetNamedQueryByName,
            request_deserializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.NamedQueryService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetAllNamedQueries(
        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,
            "/chalk.server.v1.NamedQueryService/GetAllNamedQueries",
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetAllNamedQueriesActiveDeployment(
        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,
            "/chalk.server.v1.NamedQueryService/GetAllNamedQueriesActiveDeployment",
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetAllNamedQueriesActiveDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetNamedQueryByName(
        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,
            "/chalk.server.v1.NamedQueryService/GetNamedQueryByName",
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_named__query__pb2.GetNamedQueryByNameResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
