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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .dynamic_variable_update_common_model import DynamicVariableUpdateCommonModel


class ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput(UncheckedBaseModel):
    request_id: str
    tool_name: str
    result_value: str
    is_error: bool
    tool_has_been_called: bool
    tool_latency_secs: typing.Optional[float] = None
    dynamic_variable_updates: typing.Optional[typing.List[DynamicVariableUpdateCommonModel]] = None
    type: typing.Literal["workflow"] = "workflow"
    result: typing.Optional["WorkflowToolResponseModelInput"] = 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


from .workflow_tool_nested_tools_step_model_input import WorkflowToolNestedToolsStepModelInput  # noqa: E402, F401, I001
from .workflow_tool_response_model_input import WorkflowToolResponseModelInput  # noqa: E402, F401, I001

update_forward_refs(ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput)
