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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class AppointmentReason(str, enum.Enum):
    CHECKUP = "CHECKUP"
    EMERGENCY = "EMERGENCY"
    FOLLOWUP = "FOLLOWUP"
    ROUTINE = "ROUTINE"
    WALKIN = "WALKIN"

    def visit(
        self,
        checkup: typing.Callable[[], T_Result],
        emergency: typing.Callable[[], T_Result],
        followup: typing.Callable[[], T_Result],
        routine: typing.Callable[[], T_Result],
        walkin: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is AppointmentReason.CHECKUP:
            return checkup()
        if self is AppointmentReason.EMERGENCY:
            return emergency()
        if self is AppointmentReason.FOLLOWUP:
            return followup()
        if self is AppointmentReason.ROUTINE:
            return routine()
        if self is AppointmentReason.WALKIN:
            return walkin()
