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

from __future__ import annotations

import typing

from .fulfilled_workflow_node_result_event import FulfilledWorkflowNodeResultEvent
from .initiated_workflow_node_result_event import InitiatedWorkflowNodeResultEvent
from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
from .streaming_workflow_node_result_event import StreamingWorkflowNodeResultEvent


class WorkflowNodeResultEvent_Initiated(InitiatedWorkflowNodeResultEvent):
    state: typing.Literal["INITIATED"] = "INITIATED"

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


class WorkflowNodeResultEvent_Streaming(StreamingWorkflowNodeResultEvent):
    state: typing.Literal["STREAMING"] = "STREAMING"

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


class WorkflowNodeResultEvent_Fulfilled(FulfilledWorkflowNodeResultEvent):
    state: typing.Literal["FULFILLED"] = "FULFILLED"

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


class WorkflowNodeResultEvent_Rejected(RejectedWorkflowNodeResultEvent):
    state: typing.Literal["REJECTED"] = "REJECTED"

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


WorkflowNodeResultEvent = typing.Union[
    WorkflowNodeResultEvent_Initiated,
    WorkflowNodeResultEvent_Streaming,
    WorkflowNodeResultEvent_Fulfilled,
    WorkflowNodeResultEvent_Rejected,
]
