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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class TaskDifficulty(str, enum.Enum):
    EASY = "easy"
    MEDIUM = "medium"
    HARD = "hard"

    def visit(
        self,
        easy: typing.Callable[[], T_Result],
        medium: typing.Callable[[], T_Result],
        hard: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is TaskDifficulty.EASY:
            return easy()
        if self is TaskDifficulty.MEDIUM:
            return medium()
        if self is TaskDifficulty.HARD:
            return hard()
