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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


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

    NUMERIC = "numeric"
    RANGE = "range"
    COMMENT = "comment"
    BOOLEAN = "boolean"
    DURATION = "duration"
    PERCENTAGE = "percentage"
    RATIO = "ratio"
    _UNKNOWN = "__LABREPORTRESULTTYPE_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) -> "LabReportResultType":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        numeric: typing.Callable[[], T_Result],
        range: typing.Callable[[], T_Result],
        comment: typing.Callable[[], T_Result],
        boolean: typing.Callable[[], T_Result],
        duration: typing.Callable[[], T_Result],
        percentage: typing.Callable[[], T_Result],
        ratio: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is LabReportResultType.NUMERIC:
            return numeric()
        if self is LabReportResultType.RANGE:
            return range()
        if self is LabReportResultType.COMMENT:
            return comment()
        if self is LabReportResultType.BOOLEAN:
            return boolean()
        if self is LabReportResultType.DURATION:
            return duration()
        if self is LabReportResultType.PERCENTAGE:
            return percentage()
        if self is LabReportResultType.RATIO:
            return ratio()
        return _unknown_member(self._value_)
