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

from __future__ import annotations

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata
from .constant_schema_override_constant_value import ConstantSchemaOverrideConstantValue


class McpToolConfigOverrideOutputInputOverridesValue_Constant(UncheckedBaseModel):
    source: typing.Literal["constant"] = "constant"
    constant_value: ConstantSchemaOverrideConstantValue

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class McpToolConfigOverrideOutputInputOverridesValue_DynamicVariable(UncheckedBaseModel):
    source: typing.Literal["dynamic_variable"] = "dynamic_variable"
    dynamic_variable: str

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class McpToolConfigOverrideOutputInputOverridesValue_Llm(UncheckedBaseModel):
    source: typing.Literal["llm"] = "llm"
    prompt: typing.Optional[str] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class McpToolConfigOverrideOutputInputOverridesValue_Omit(UncheckedBaseModel):
    source: typing.Literal["omit"] = "omit"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


McpToolConfigOverrideOutputInputOverridesValue = typing_extensions.Annotated[
    typing.Union[
        McpToolConfigOverrideOutputInputOverridesValue_Constant,
        McpToolConfigOverrideOutputInputOverridesValue_DynamicVariable,
        McpToolConfigOverrideOutputInputOverridesValue_Llm,
        McpToolConfigOverrideOutputInputOverridesValue_Omit,
    ],
    UnionMetadata(discriminant="source"),
]
