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

from __future__ import annotations

import typing

import typing_extensions

from .node_output_compiled_chat_history_value import NodeOutputCompiledChatHistoryValue
from .node_output_compiled_error_value import NodeOutputCompiledErrorValue
from .node_output_compiled_json_value import NodeOutputCompiledJsonValue
from .node_output_compiled_number_value import NodeOutputCompiledNumberValue
from .node_output_compiled_search_results_value import NodeOutputCompiledSearchResultsValue
from .node_output_compiled_string_value import NodeOutputCompiledStringValue


class NodeOutputCompiledValue_String(NodeOutputCompiledStringValue):
    type: typing_extensions.Literal["STRING"]

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


class NodeOutputCompiledValue_Number(NodeOutputCompiledNumberValue):
    type: typing_extensions.Literal["NUMBER"]

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


class NodeOutputCompiledValue_Json(NodeOutputCompiledJsonValue):
    type: typing_extensions.Literal["JSON"]

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


class NodeOutputCompiledValue_ChatHistory(NodeOutputCompiledChatHistoryValue):
    type: typing_extensions.Literal["CHAT_HISTORY"]

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


class NodeOutputCompiledValue_SearchResults(NodeOutputCompiledSearchResultsValue):
    type: typing_extensions.Literal["SEARCH_RESULTS"]

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


class NodeOutputCompiledValue_Error(NodeOutputCompiledErrorValue):
    type: typing_extensions.Literal["ERROR"]

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


NodeOutputCompiledValue = typing.Union[
    NodeOutputCompiledValue_String,
    NodeOutputCompiledValue_Number,
    NodeOutputCompiledValue_Json,
    NodeOutputCompiledValue_ChatHistory,
    NodeOutputCompiledValue_SearchResults,
    NodeOutputCompiledValue_Error,
]
