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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .transfer_to_agent_tool_result_success_model_branch_info import TransferToAgentToolResultSuccessModelBranchInfo


class TransferToAgentToolResultSuccessModel(UncheckedBaseModel):
    status: typing.Optional[typing.Literal["success"]] = None
    from_agent: str
    to_agent: str
    to_node: typing.Optional[str] = None
    condition: str
    delay_ms: typing.Optional[int] = None
    transfer_message: typing.Optional[str] = None
    enable_transferred_agent_first_message: typing.Optional[bool] = None
    branch_info: typing.Optional[TransferToAgentToolResultSuccessModelBranchInfo] = None
    preserve_client_tts_overrides: typing.Optional[bool] = 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
