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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


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

    UNKNOWN = "unknown"
    PHONE = "phone"
    WATCH = "watch"
    APP = "app"
    MULTIPLE_SOURCES = "multiple_sources"
    FINGERPRICK = "fingerprick"
    CUFF = "cuff"
    MANUAL_SCAN = "manual_scan"
    AUTOMATIC = "automatic"
    SCALE = "scale"
    CHEST_STRAP = "chest_strap"
    RING = "ring"
    LAB = "lab"
    EXERCISE_MACHINE = "exercise_machine"
    _UNKNOWN = "__CLIENTFACINGSLEEPCYCLESOURCETYPE_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) -> "ClientFacingSleepCycleSourceType":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        unknown: typing.Callable[[], T_Result],
        phone: typing.Callable[[], T_Result],
        watch: typing.Callable[[], T_Result],
        app: typing.Callable[[], T_Result],
        multiple_sources: typing.Callable[[], T_Result],
        fingerprick: typing.Callable[[], T_Result],
        cuff: typing.Callable[[], T_Result],
        manual_scan: typing.Callable[[], T_Result],
        automatic: typing.Callable[[], T_Result],
        scale: typing.Callable[[], T_Result],
        chest_strap: typing.Callable[[], T_Result],
        ring: typing.Callable[[], T_Result],
        lab: typing.Callable[[], T_Result],
        exercise_machine: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is ClientFacingSleepCycleSourceType.UNKNOWN:
            return unknown()
        if self is ClientFacingSleepCycleSourceType.PHONE:
            return phone()
        if self is ClientFacingSleepCycleSourceType.WATCH:
            return watch()
        if self is ClientFacingSleepCycleSourceType.APP:
            return app()
        if self is ClientFacingSleepCycleSourceType.MULTIPLE_SOURCES:
            return multiple_sources()
        if self is ClientFacingSleepCycleSourceType.FINGERPRICK:
            return fingerprick()
        if self is ClientFacingSleepCycleSourceType.CUFF:
            return cuff()
        if self is ClientFacingSleepCycleSourceType.MANUAL_SCAN:
            return manual_scan()
        if self is ClientFacingSleepCycleSourceType.AUTOMATIC:
            return automatic()
        if self is ClientFacingSleepCycleSourceType.SCALE:
            return scale()
        if self is ClientFacingSleepCycleSourceType.CHEST_STRAP:
            return chest_strap()
        if self is ClientFacingSleepCycleSourceType.RING:
            return ring()
        if self is ClientFacingSleepCycleSourceType.LAB:
            return lab()
        if self is ClientFacingSleepCycleSourceType.EXERCISE_MACHINE:
            return exercise_machine()
        return _unknown_member(self._value_)
