Class Condition
java.lang.Object
co.elastic.clients.elasticsearch.watcher.Condition
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<java.lang.Object>
@JsonpDeserializable public class Condition extends java.lang.Object implements TaggedUnion<java.lang.Object>, JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Condition.Builder
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Condition>
_DESERIALIZER
static java.lang.String
ALWAYS
static java.lang.String
ARRAY_COMPARE
static java.lang.String
COMPARE
static java.lang.String
NEVER
static java.lang.String
SCRIPT
-
Constructor Summary
Constructors Constructor Description Condition(ConditionVariant value)
Condition(ObjectBuilder<T> builder)
Condition(java.util.function.Function<Condition.Builder,Condition.Builder> fn)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
java.lang.String
_type()
Get the of the type of the variant held by this union object.AlwaysCondition
always()
Get thealways
variant value.ArrayCompareCondition
arrayCompare()
Get thearray_compare
variant value.CompareCondition
compare()
Get thecompare
variant value.NeverCondition
never()
Get thenever
variant value.ScriptCondition
script()
Get thescript
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupConditionDeserializer(DelegatingDeserializer<Condition.Builder> op)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.elastic.clients.util.TaggedUnion
_is
-
Field Details
-
ALWAYS
public static final java.lang.String ALWAYS- See Also:
- Constant Field Values
-
ARRAY_COMPARE
public static final java.lang.String ARRAY_COMPARE- See Also:
- Constant Field Values
-
COMPARE
public static final java.lang.String COMPARE- See Also:
- Constant Field Values
-
NEVER
public static final java.lang.String NEVER- See Also:
- Constant Field Values
-
SCRIPT
public static final java.lang.String SCRIPT- See Also:
- Constant Field Values
-
_DESERIALIZER
-
-
Constructor Details
-
Condition
-
Condition
-
Condition
-
-
Method Details
-
_type
public java.lang.String _type()Description copied from interface:TaggedUnion
Get the of the type of the variant held by this union object.- Specified by:
_type
in interfaceTaggedUnion<java.lang.Object>
- Returns:
- the variant type
-
_get
public java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<java.lang.Object>
-
always
Get thealways
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thealways
kind.
-
arrayCompare
Get thearray_compare
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thearray_compare
kind.
-
compare
Get thecompare
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecompare
kind.
-
never
Get thenever
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thenever
kind.
-
script
Get thescript
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thescript
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupConditionDeserializer
-