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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Priority(str, enum.Enum):
    URGENT = "URGENT"
    CRITICAL = "CRITICAL"
    HIGH = "HIGH"
    MEDIUM = "MEDIUM"
    MODERATE = "MODERATE"
    LOW = "LOW"
    PLANNING = "PLANNING"
    _UNKNOWN = "__PRIORITY_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) -> "Priority":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        urgent: typing.Callable[[], T_Result],
        critical: typing.Callable[[], T_Result],
        high: typing.Callable[[], T_Result],
        medium: typing.Callable[[], T_Result],
        moderate: typing.Callable[[], T_Result],
        low: typing.Callable[[], T_Result],
        planning: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is Priority.URGENT:
            return urgent()
        if self is Priority.CRITICAL:
            return critical()
        if self is Priority.HIGH:
            return high()
        if self is Priority.MEDIUM:
            return medium()
        if self is Priority.MODERATE:
            return moderate()
        if self is Priority.LOW:
            return low()
        if self is Priority.PLANNING:
            return planning()
        return _unknown_member(self._value_)
