# 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 .....types.constant_schema_override_constant_value import ConstantSchemaOverrideConstantValue


class McpToolConfigOverrideUpdateRequestModelInputOverridesValue_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 McpToolConfigOverrideUpdateRequestModelInputOverridesValue_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 McpToolConfigOverrideUpdateRequestModelInputOverridesValue_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 McpToolConfigOverrideUpdateRequestModelInputOverridesValue_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


McpToolConfigOverrideUpdateRequestModelInputOverridesValue = typing_extensions.Annotated[
    typing.Union[
        McpToolConfigOverrideUpdateRequestModelInputOverridesValue_Constant,
        McpToolConfigOverrideUpdateRequestModelInputOverridesValue_DynamicVariable,
        McpToolConfigOverrideUpdateRequestModelInputOverridesValue_Llm,
        McpToolConfigOverrideUpdateRequestModelInputOverridesValue_Omit,
    ],
    UnionMetadata(discriminant="source"),
]
