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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class AlertConfigResourceType(enum.StrEnum):
    """
    The type of resource this alert config belongs to. Can be either an application or a cluster.
    """

    APPLICATION = "application"
    CLUSTER = "cluster"

    def visit(self, application: typing.Callable[[], T_Result], cluster: typing.Callable[[], T_Result]) -> T_Result:
        if self is AlertConfigResourceType.APPLICATION:
            return application()
        if self is AlertConfigResourceType.CLUSTER:
            return cluster()
