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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class InterventionCategory(str, enum.Enum):
    ALLOPATHIC = "allopathic"
    NATUROPATHIC = "naturopathic"
    TESTS = "tests"
    LIFESTYLE = "lifestyle"

    def visit(
        self,
        allopathic: typing.Callable[[], T_Result],
        naturopathic: typing.Callable[[], T_Result],
        tests: typing.Callable[[], T_Result],
        lifestyle: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is InterventionCategory.ALLOPATHIC:
            return allopathic()
        if self is InterventionCategory.NATUROPATHIC:
            return naturopathic()
        if self is InterventionCategory.TESTS:
            return tests()
        if self is InterventionCategory.LIFESTYLE:
            return lifestyle()
