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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class PangeaGuardrailConfigOperation(enum.StrEnum):
    """
    The operation type to use for the Guardrail. Validate guardrails are used to validate requests and mutate can validate as well as mutate requests.
    """

    VALIDATE = "validate"
    MUTATE = "mutate"

    def visit(self, validate: typing.Callable[[], T_Result], mutate: typing.Callable[[], T_Result]) -> T_Result:
        if self is PangeaGuardrailConfigOperation.VALIDATE:
            return validate()
        if self is PangeaGuardrailConfigOperation.MUTATE:
            return mutate()
