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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class PaloAltoPrismaAirsGuardrailConfigMode(enum.StrEnum):
    """
    Execution mode for the guardrail. Sync waits for the guardrail check to complete before proceeding. Async triggers the check without waiting. Defaults to sync.
    """

    SYNC = "sync"
    ASYNC = "async"

    def visit(self, sync: typing.Callable[[], T_Result], async_: typing.Callable[[], T_Result]) -> T_Result:
        if self is PaloAltoPrismaAirsGuardrailConfigMode.SYNC:
            return sync()
        if self is PaloAltoPrismaAirsGuardrailConfigMode.ASYNC:
            return async_()
