# 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 ...types.workflow_type import WorkflowType
from .get_agent_id_workflow_response_data_data import GetAgentIdWorkflowResponseDataData


class GetAgentIdWorkflowResponseData(UncheckedBaseModel):
    """
    The workflow configuration with type and data structure
    """

    type: typing.Optional[WorkflowType] = pydantic.Field(default=None)
    """
    The type of workflow (workflow_graph or single_prompt)
    """

    data: typing.Optional[GetAgentIdWorkflowResponseDataData] = pydantic.Field(default=None)
    """
    The workflow configuration data. Structure depends on the workflow type - WorkflowGraphData for workflow_graph type, SinglePromptData for single_prompt type.
    """

    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
