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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class OAuthProviders(str, enum.Enum):
    """
    ℹ️ This enum is non-exhaustive.
    """

    OURA = "oura"
    FITBIT = "fitbit"
    GARMIN = "garmin"
    STRAVA = "strava"
    WAHOO = "wahoo"
    IHEALTH = "ihealth"
    WITHINGS = "withings"
    GOOGLE_FIT = "google_fit"
    DEXCOM_V_3 = "dexcom_v3"
    POLAR = "polar"
    CRONOMETER = "cronometer"
    OMRON = "omron"
    WHOOP_V_2 = "whoop_v2"
    MY_FITNESS_PAL_V_2 = "my_fitness_pal_v2"
    ULTRAHUMAN = "ultrahuman"
    _UNKNOWN = "__OAUTHPROVIDERS_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) -> "OAuthProviders":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        oura: typing.Callable[[], T_Result],
        fitbit: typing.Callable[[], T_Result],
        garmin: typing.Callable[[], T_Result],
        strava: typing.Callable[[], T_Result],
        wahoo: typing.Callable[[], T_Result],
        ihealth: typing.Callable[[], T_Result],
        withings: typing.Callable[[], T_Result],
        google_fit: typing.Callable[[], T_Result],
        dexcom_v_3: typing.Callable[[], T_Result],
        polar: typing.Callable[[], T_Result],
        cronometer: typing.Callable[[], T_Result],
        omron: typing.Callable[[], T_Result],
        whoop_v_2: typing.Callable[[], T_Result],
        my_fitness_pal_v_2: typing.Callable[[], T_Result],
        ultrahuman: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is OAuthProviders.OURA:
            return oura()
        if self is OAuthProviders.FITBIT:
            return fitbit()
        if self is OAuthProviders.GARMIN:
            return garmin()
        if self is OAuthProviders.STRAVA:
            return strava()
        if self is OAuthProviders.WAHOO:
            return wahoo()
        if self is OAuthProviders.IHEALTH:
            return ihealth()
        if self is OAuthProviders.WITHINGS:
            return withings()
        if self is OAuthProviders.GOOGLE_FIT:
            return google_fit()
        if self is OAuthProviders.DEXCOM_V_3:
            return dexcom_v_3()
        if self is OAuthProviders.POLAR:
            return polar()
        if self is OAuthProviders.CRONOMETER:
            return cronometer()
        if self is OAuthProviders.OMRON:
            return omron()
        if self is OAuthProviders.WHOOP_V_2:
            return whoop_v_2()
        if self is OAuthProviders.MY_FITNESS_PAL_V_2:
            return my_fitness_pal_v_2()
        if self is OAuthProviders.ULTRAHUMAN:
            return ultrahuman()
        return _unknown_member(self._value_)
