# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PydanticProgramMode(str, enum.Enum):
    """
    Pydantic program mode.
    """

    DEFAULT = "default"
    OPENAI = "openai"
    LLM = "llm"
    GUIDANCE = "guidance"
    LM_FORMAT_ENFORCER = "lm-format-enforcer"

    def visit(
        self,
        default: typing.Callable[[], T_Result],
        openai: typing.Callable[[], T_Result],
        llm: typing.Callable[[], T_Result],
        guidance: typing.Callable[[], T_Result],
        lm_format_enforcer: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PydanticProgramMode.DEFAULT:
            return default()
        if self is PydanticProgramMode.OPENAI:
            return openai()
        if self is PydanticProgramMode.LLM:
            return llm()
        if self is PydanticProgramMode.GUIDANCE:
            return guidance()
        if self is PydanticProgramMode.LM_FORMAT_ENFORCER:
            return lm_format_enforcer()
