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

from __future__ import annotations

import typing

import typing_extensions

from .workflow_result_event_output_data_chat_history import WorkflowResultEventOutputDataChatHistory
from .workflow_result_event_output_data_error import WorkflowResultEventOutputDataError
from .workflow_result_event_output_data_json import WorkflowResultEventOutputDataJson
from .workflow_result_event_output_data_number import WorkflowResultEventOutputDataNumber
from .workflow_result_event_output_data_search_results import WorkflowResultEventOutputDataSearchResults
from .workflow_result_event_output_data_string import WorkflowResultEventOutputDataString


class WorkflowResultEventOutputData_String(WorkflowResultEventOutputDataString):
    type: typing_extensions.Literal["STRING"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class WorkflowResultEventOutputData_Number(WorkflowResultEventOutputDataNumber):
    type: typing_extensions.Literal["NUMBER"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class WorkflowResultEventOutputData_Json(WorkflowResultEventOutputDataJson):
    type: typing_extensions.Literal["JSON"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class WorkflowResultEventOutputData_ChatHistory(WorkflowResultEventOutputDataChatHistory):
    type: typing_extensions.Literal["CHAT_HISTORY"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class WorkflowResultEventOutputData_SearchResults(WorkflowResultEventOutputDataSearchResults):
    type: typing_extensions.Literal["SEARCH_RESULTS"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class WorkflowResultEventOutputData_Error(WorkflowResultEventOutputDataError):
    type: typing_extensions.Literal["ERROR"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


WorkflowResultEventOutputData = typing.Union[
    WorkflowResultEventOutputData_String,
    WorkflowResultEventOutputData_Number,
    WorkflowResultEventOutputData_Json,
    WorkflowResultEventOutputData_ChatHistory,
    WorkflowResultEventOutputData_SearchResults,
    WorkflowResultEventOutputData_Error,
]
