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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class AttemptStatus(str, enum.Enum):
    """
    ℹ️ This enum is non-exhaustive.
    """

    SUCCESS = "success"
    FAILURE = "failure"

    def visit(self, success: typing.Callable[[], T_Result], failure: typing.Callable[[], T_Result]) -> T_Result:
        if self is AttemptStatus.SUCCESS:
            return success()
        if self is AttemptStatus.FAILURE:
            return failure()
