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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class PatientPaymentStatus(enum.StrEnum):
    PENDING = "PENDING"
    PAID = "paid"
    CANCELED = "CANCELED"
    VOIDED = "voided"
    FAILED = "FAILED"
    COMPLETED = "COMPLETED"
    STRIPE_SUCCEEDED = "succeeded"
    STRIPE_PENDING = "pending"
    STRIPE_FAILED = "failed"
    STRIPE_REQUIRES_ACTION = "requires_action"
    STRIPE_CANCELED = "canceled"
    _UNKNOWN = "__PATIENTPAYMENTSTATUS_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "PatientPaymentStatus":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        pending: typing.Callable[[], T_Result],
        paid: typing.Callable[[], T_Result],
        canceled: typing.Callable[[], T_Result],
        voided: typing.Callable[[], T_Result],
        failed: typing.Callable[[], T_Result],
        completed: typing.Callable[[], T_Result],
        stripe_succeeded: typing.Callable[[], T_Result],
        stripe_pending: typing.Callable[[], T_Result],
        stripe_failed: typing.Callable[[], T_Result],
        stripe_requires_action: typing.Callable[[], T_Result],
        stripe_canceled: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is PatientPaymentStatus.PENDING:
            return pending()
        if self is PatientPaymentStatus.PAID:
            return paid()
        if self is PatientPaymentStatus.CANCELED:
            return canceled()
        if self is PatientPaymentStatus.VOIDED:
            return voided()
        if self is PatientPaymentStatus.FAILED:
            return failed()
        if self is PatientPaymentStatus.COMPLETED:
            return completed()
        if self is PatientPaymentStatus.STRIPE_SUCCEEDED:
            return stripe_succeeded()
        if self is PatientPaymentStatus.STRIPE_PENDING:
            return stripe_pending()
        if self is PatientPaymentStatus.STRIPE_FAILED:
            return stripe_failed()
        if self is PatientPaymentStatus.STRIPE_REQUIRES_ACTION:
            return stripe_requires_action()
        if self is PatientPaymentStatus.STRIPE_CANCELED:
            return stripe_canceled()
        return _unknown_member(self._value_)
