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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PatronusGuardrailConfigTarget(str, enum.Enum):
    """
    +label=Target
    +usage=The type of request to use for the Patronus Guardrail.
    +sort=100
    +uiType=Select
    """

    RESPONSE = "response"
    REQUEST = "request"

    def visit(self, response: typing.Callable[[], T_Result], request: typing.Callable[[], T_Result]) -> T_Result:
        if self is PatronusGuardrailConfigTarget.RESPONSE:
            return response()
        if self is PatronusGuardrailConfigTarget.REQUEST:
            return request()
