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

import typing

from ....core import enum

T_Result = typing.TypeVar("T_Result")


class Clearinghouse(enum.StrEnum):
    CHANGE_HEALTHCARE = "CHANGE_HEALTHCARE"
    OLIVE = "OLIVE"
    UCSF_CIRIUS = "UCSF_CIRIUS"
    AVAILITY = "AVAILITY"
    JOPARI = "JOPARI"
    PAYER_PORTAL = "PAYER_PORTAL"
    STEDI = "STEDI"
    WAYSTAR = "WAYSTAR"
    UNKNOWN = "UNKNOWN"
    _UNKNOWN = "__CLEARINGHOUSE_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) -> "Clearinghouse":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        change_healthcare: typing.Callable[[], T_Result],
        olive: typing.Callable[[], T_Result],
        ucsf_cirius: typing.Callable[[], T_Result],
        availity: typing.Callable[[], T_Result],
        jopari: typing.Callable[[], T_Result],
        payer_portal: typing.Callable[[], T_Result],
        stedi: typing.Callable[[], T_Result],
        waystar: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is Clearinghouse.CHANGE_HEALTHCARE:
            return change_healthcare()
        if self is Clearinghouse.OLIVE:
            return olive()
        if self is Clearinghouse.UCSF_CIRIUS:
            return ucsf_cirius()
        if self is Clearinghouse.AVAILITY:
            return availity()
        if self is Clearinghouse.JOPARI:
            return jopari()
        if self is Clearinghouse.PAYER_PORTAL:
            return payer_portal()
        if self is Clearinghouse.STEDI:
            return stedi()
        if self is Clearinghouse.WAYSTAR:
            return waystar()
        if self is Clearinghouse.UNKNOWN:
            return unknown()
        return _unknown_member(self._value_)
