# 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 prompt_pb2 as chalk_dot_server_dot_v1_dot_prompt__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListNamedPrompts = channel.unary_unary(
            "/chalk.server.v1.PromptService/ListNamedPrompts",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsResponse.FromString,
        )
        self.GetNamedPrompt = channel.unary_unary(
            "/chalk.server.v1.PromptService/GetNamedPrompt",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptResponse.FromString,
        )
        self.CreateNamedPrompt = channel.unary_unary(
            "/chalk.server.v1.PromptService/CreateNamedPrompt",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptResponse.FromString,
        )
        self.UpdateNamedPrompt = channel.unary_unary(
            "/chalk.server.v1.PromptService/UpdateNamedPrompt",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptResponse.FromString,
        )
        self.ListPromptVariants = channel.unary_unary(
            "/chalk.server.v1.PromptService/ListPromptVariants",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsResponse.FromString,
        )
        self.ListPromptEvaluationRuns = channel.unary_unary(
            "/chalk.server.v1.PromptService/ListPromptEvaluationRuns",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsResponse.FromString,
        )
        self.GetPromptEvaluationRun = channel.unary_unary(
            "/chalk.server.v1.PromptService/GetPromptEvaluationRun",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunResponse.FromString,
        )
        self.CreatePromptEvaluationRun = channel.unary_unary(
            "/chalk.server.v1.PromptService/CreatePromptEvaluationRun",
            request_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunResponse.FromString,
        )


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

    def ListNamedPrompts(self, request, context):
        """Return a list of named prompts"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetNamedPrompt(self, request, context):
        """Return a single named prompt with the latest prompt variant"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreateNamedPrompt(self, request, context):
        """Create a new named prompt and its corresponding prompt variant"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateNamedPrompt(self, request, context):
        """Modify a named prompt; may create a new prompt variant if variant settings changed"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListPromptVariants(self, request, context):
        """Return a list of prompt variants"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListPromptEvaluationRuns(self, request, context):
        """Return a list of prompt evaluation runs"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetPromptEvaluationRun(self, request, context):
        """Return a prompt evaluation run and its prompt variants"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreatePromptEvaluationRun(self, request, context):
        """Start a new prompt evaluation run"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_PromptServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ListNamedPrompts": grpc.unary_unary_rpc_method_handler(
            servicer.ListNamedPrompts,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsResponse.SerializeToString,
        ),
        "GetNamedPrompt": grpc.unary_unary_rpc_method_handler(
            servicer.GetNamedPrompt,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptResponse.SerializeToString,
        ),
        "CreateNamedPrompt": grpc.unary_unary_rpc_method_handler(
            servicer.CreateNamedPrompt,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptResponse.SerializeToString,
        ),
        "UpdateNamedPrompt": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateNamedPrompt,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptResponse.SerializeToString,
        ),
        "ListPromptVariants": grpc.unary_unary_rpc_method_handler(
            servicer.ListPromptVariants,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsResponse.SerializeToString,
        ),
        "ListPromptEvaluationRuns": grpc.unary_unary_rpc_method_handler(
            servicer.ListPromptEvaluationRuns,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsResponse.SerializeToString,
        ),
        "GetPromptEvaluationRun": grpc.unary_unary_rpc_method_handler(
            servicer.GetPromptEvaluationRun,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunResponse.SerializeToString,
        ),
        "CreatePromptEvaluationRun": grpc.unary_unary_rpc_method_handler(
            servicer.CreatePromptEvaluationRun,
            request_deserializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.PromptService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListNamedPrompts(
        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.PromptService/ListNamedPrompts",
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListNamedPromptsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetNamedPrompt(
        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.PromptService/GetNamedPrompt",
            chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.GetNamedPromptResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreateNamedPrompt(
        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.PromptService/CreateNamedPrompt",
            chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.CreateNamedPromptResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateNamedPrompt(
        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.PromptService/UpdateNamedPrompt",
            chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.UpdateNamedPromptResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListPromptVariants(
        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.PromptService/ListPromptVariants",
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptVariantsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListPromptEvaluationRuns(
        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.PromptService/ListPromptEvaluationRuns",
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.ListPromptEvaluationRunsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetPromptEvaluationRun(
        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.PromptService/GetPromptEvaluationRun",
            chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.GetPromptEvaluationRunResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreatePromptEvaluationRun(
        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.PromptService/CreatePromptEvaluationRun",
            chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_prompt__pb2.CreatePromptEvaluationRunResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
