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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class EventChartCategory(enum.StrEnum):
    CONTAINER_TERMINATED = "ContainerTerminated"
    CONTAINER_OOM = "ContainerOOM"
    POD_TERMINATED = "PodTerminated"
    POD_EVICTED = "PodEvicted"
    GENERAL = "General"

    def visit(
        self,
        container_terminated: typing.Callable[[], T_Result],
        container_oom: typing.Callable[[], T_Result],
        pod_terminated: typing.Callable[[], T_Result],
        pod_evicted: typing.Callable[[], T_Result],
        general: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is EventChartCategory.CONTAINER_TERMINATED:
            return container_terminated()
        if self is EventChartCategory.CONTAINER_OOM:
            return container_oom()
        if self is EventChartCategory.POD_TERMINATED:
            return pod_terminated()
        if self is EventChartCategory.POD_EVICTED:
            return pod_evicted()
        if self is EventChartCategory.GENERAL:
            return general()
