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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class AlertSeverity(enum.StrEnum):
    WARNING = "warning"
    CRITICAL = "critical"

    def visit(self, warning: typing.Callable[[], T_Result], critical: typing.Callable[[], T_Result]) -> T_Result:
        if self is AlertSeverity.WARNING:
            return warning()
        if self is AlertSeverity.CRITICAL:
            return critical()
