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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class EpsdtReferralConditionIndicatorCode(str, enum.Enum):
    AV = "AV"
    NU = "NU"
    S_2 = "S2"
    ST = "ST"
    _UNKNOWN = "__EPSDTREFERRALCONDITIONINDICATORCODE_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) -> "EpsdtReferralConditionIndicatorCode":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        av: typing.Callable[[], T_Result],
        nu: typing.Callable[[], T_Result],
        s_2: typing.Callable[[], T_Result],
        st: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is EpsdtReferralConditionIndicatorCode.AV:
            return av()
        if self is EpsdtReferralConditionIndicatorCode.NU:
            return nu()
        if self is EpsdtReferralConditionIndicatorCode.S_2:
            return s_2()
        if self is EpsdtReferralConditionIndicatorCode.ST:
            return st()
        return _unknown_member(self._value_)
