Interface JourneyConditionsField.Visitor
-
- All Implemented Interfaces:
public interface JourneyConditionsField.Visitor<T extends Object>An interface that defines how to map each variant of JourneyConditionsField to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitConditionAtom(List<String> conditionAtom)A single condition expressed as a positional tuple of strings. abstract TvisitConditionGroup(JourneyConditionGroup conditionGroup)A leaf condition group. abstract TvisitConditionNestedGroup(JourneyConditionNestedGroup conditionNestedGroup)A nested condition group. Tunknown(JsonValue json)Maps an unknown variant of JourneyConditionsField to a value of type T. -
-
Method Detail
-
visitConditionAtom
abstract T visitConditionAtom(List<String> conditionAtom)
A single condition expressed as a positional tuple of strings.
Binary form (3 elements):
[path, operator, value]whereoperatoris one ofis equal,is not equal,contains,does not contain,starts with,ends with,greater than,greater than or equal,less than,less than or equal.
Example:
["user.tier", "is equal", "gold"].Unary form (2 elements):
[path, operator]whereoperatoris one ofexists,does not exist.
Example:
["user.email", "exists"].The first element is a non-empty dot-path. The second element is the operator (must come from one of the two operator sets above). For the binary form, the third element is the comparison value (string). Runtime validation of the operator value and arity is performed by the backend; SDKs surface this as a string list.
-
visitConditionGroup
abstract T visitConditionGroup(JourneyConditionGroup conditionGroup)
A leaf condition group. Exactly one of
ANDorORmust be present at runtime; each is a list ofJourneyConditionAtomtuples.
-
visitConditionNestedGroup
abstract T visitConditionNestedGroup(JourneyConditionNestedGroup conditionNestedGroup)
A nested condition group. Exactly one of
ANDorORmust be present at runtime; each is a list ofJourneyConditionGroupitems.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of JourneyConditionsField to a value of type T.
An instance of JourneyConditionsField can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-