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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class TrueFoundryApplyResponseAction(enum.StrEnum):
    """
    The action performed: CREATE or UPDATE
    """

    CREATE = "CREATE"
    UPDATE = "UPDATE"

    def visit(self, create: typing.Callable[[], T_Result], update: typing.Callable[[], T_Result]) -> T_Result:
        if self is TrueFoundryApplyResponseAction.CREATE:
            return create()
        if self is TrueFoundryApplyResponseAction.UPDATE:
            return update()
