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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class PayerCategory(enum.StrEnum):
    BCBS = "BCBS"
    AETNA_AFFILIATED = "AETNA_AFFILIATED"
    CIGNA_AFFILIATED = "CIGNA_AFFILIATED"
    UNITED_AFFILIATED = "UNITED_AFFILIATED"
    MEDICARE = "MEDICARE"
    NON_TRADITIONAL_MEDICARE = "NON_TRADITIONAL_MEDICARE"
    MEDICAID = "MEDICAID"
    HOSPICE = "HOSPICE"
    SNF = "SNF"
    TRICARE = "TRICARE"
    WORKERS_COMP = "WORKERS_COMP"
    OTHER_GOVERNMENT = "OTHER_GOVERNMENT"
    AUTO_TPL = "AUTO_TPL"
    _UNKNOWN = "__PAYERCATEGORY_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) -> "PayerCategory":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        bcbs: typing.Callable[[], T_Result],
        aetna_affiliated: typing.Callable[[], T_Result],
        cigna_affiliated: typing.Callable[[], T_Result],
        united_affiliated: typing.Callable[[], T_Result],
        medicare: typing.Callable[[], T_Result],
        non_traditional_medicare: typing.Callable[[], T_Result],
        medicaid: typing.Callable[[], T_Result],
        hospice: typing.Callable[[], T_Result],
        snf: typing.Callable[[], T_Result],
        tricare: typing.Callable[[], T_Result],
        workers_comp: typing.Callable[[], T_Result],
        other_government: typing.Callable[[], T_Result],
        auto_tpl: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is PayerCategory.BCBS:
            return bcbs()
        if self is PayerCategory.AETNA_AFFILIATED:
            return aetna_affiliated()
        if self is PayerCategory.CIGNA_AFFILIATED:
            return cigna_affiliated()
        if self is PayerCategory.UNITED_AFFILIATED:
            return united_affiliated()
        if self is PayerCategory.MEDICARE:
            return medicare()
        if self is PayerCategory.NON_TRADITIONAL_MEDICARE:
            return non_traditional_medicare()
        if self is PayerCategory.MEDICAID:
            return medicaid()
        if self is PayerCategory.HOSPICE:
            return hospice()
        if self is PayerCategory.SNF:
            return snf()
        if self is PayerCategory.TRICARE:
            return tricare()
        if self is PayerCategory.WORKERS_COMP:
            return workers_comp()
        if self is PayerCategory.OTHER_GOVERNMENT:
            return other_government()
        if self is PayerCategory.AUTO_TPL:
            return auto_tpl()
        return _unknown_member(self._value_)
