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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class WorkflowExecutionEventType(str, enum.Enum):
    """
    - `NODE` - NODE
    - `WORKFLOW` - WORKFLOW
    """

    NODE = "NODE"
    WORKFLOW = "WORKFLOW"

    def visit(self, node: typing.Callable[[], T_Result], workflow: typing.Callable[[], T_Result]) -> T_Result:
        if self is WorkflowExecutionEventType.NODE:
            return node()
        if self is WorkflowExecutionEventType.WORKFLOW:
            return workflow()
