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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ConnectionStatusState(str, enum.Enum):
    SUCCESS = "success"
    ERROR = "error"
    PENDING_PROVIDER_MFA = "pending_provider_mfa"

    def visit(
        self,
        success: typing.Callable[[], T_Result],
        error: typing.Callable[[], T_Result],
        pending_provider_mfa: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ConnectionStatusState.SUCCESS:
            return success()
        if self is ConnectionStatusState.ERROR:
            return error()
        if self is ConnectionStatusState.PENDING_PROVIDER_MFA:
            return pending_provider_mfa()
