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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class ConditionalStepDefinitionConfigConditionsItemOperation(enum.StrEnum):
    """
    The comparison operation for this branch.

    See the [Conditional step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#conditional-step).
    """

    EQUALS = "EQUALS"
    GTE = "GTE"
    LTE = "LTE"
    IS_NULL = "IS_NULL"
    CONTAINS = "CONTAINS"
    NO_OP = "NO_OP"
    _UNKNOWN = "__CONDITIONALSTEPDEFINITIONCONFIGCONDITIONSITEMOPERATION_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "ConditionalStepDefinitionConfigConditionsItemOperation":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        equals: typing.Callable[[], T_Result],
        gte: typing.Callable[[], T_Result],
        lte: typing.Callable[[], T_Result],
        is_null: typing.Callable[[], T_Result],
        contains: typing.Callable[[], T_Result],
        no_op: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.EQUALS:
            return equals()
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.GTE:
            return gte()
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.LTE:
            return lte()
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.IS_NULL:
            return is_null()
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.CONTAINS:
            return contains()
        if self is ConditionalStepDefinitionConfigConditionsItemOperation.NO_OP:
            return no_op()
        return _unknown_member(self._value_)
