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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ToolFormat(str, enum.Enum):
    OPENAI = "openai"
    ANTHROPIC = "anthropic"
    GEMINI = "gemini"
    MCP_NATIVE = "mcp_native"

    def visit(
        self,
        openai: typing.Callable[[], T_Result],
        anthropic: typing.Callable[[], T_Result],
        gemini: typing.Callable[[], T_Result],
        mcp_native: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ToolFormat.OPENAI:
            return openai()
        if self is ToolFormat.ANTHROPIC:
            return anthropic()
        if self is ToolFormat.GEMINI:
            return gemini()
        if self is ToolFormat.MCP_NATIVE:
            return mcp_native()
