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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class BankStatus(str, enum.Enum):
    NEW = "NEW"
    VERIFIED = "VERIFIED"
    VERIFICATION_FAILED = "VERIFICATION_FAILED"
    PENDING = "PENDING"
    ERRORED = "ERRORED"

    def visit(
        self,
        new: typing.Callable[[], T_Result],
        verified: typing.Callable[[], T_Result],
        verification_failed: typing.Callable[[], T_Result],
        pending: typing.Callable[[], T_Result],
        errored: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is BankStatus.NEW:
            return new()
        if self is BankStatus.VERIFIED:
            return verified()
        if self is BankStatus.VERIFICATION_FAILED:
            return verification_failed()
        if self is BankStatus.PENDING:
            return pending()
        if self is BankStatus.ERRORED:
            return errored()
