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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class BankType(str, enum.Enum):
    CHECKING = "CHECKING"
    SAVINGS = "SAVINGS"
    UNKNOWN = "UNKNOWN"

    def visit(
        self,
        checking: typing.Callable[[], T_Result],
        savings: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is BankType.CHECKING:
            return checking()
        if self is BankType.SAVINGS:
            return savings()
        if self is BankType.UNKNOWN:
            return unknown()
