Class Condition
java.lang.Object
co.elastic.clients.elasticsearch.watcher.Condition
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<Condition.Kind,java.lang.Object>
@JsonpDeserializable public class Condition extends java.lang.Object implements TaggedUnion<Condition.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Condition.Builder
static class
Condition.Kind
Condition
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Condition>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description Condition(ConditionVariant value)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
Condition.Kind
_kind()
Get the of the kind of variant held by this object.AlwaysCondition
always()
Get thealways
variant value.ArrayCompareCondition
arrayCompare()
Get thearray_compare
variant value.CompareCondition
compare()
Get thecompare
variant value.boolean
isAlways()
Is this variant instance of kindalways
?boolean
isArrayCompare()
Is this variant instance of kindarray_compare
?boolean
isCompare()
Is this variant instance of kindcompare
?boolean
isNever()
Is this variant instance of kindnever
?boolean
isScript()
Is this variant instance of kindscript
?NeverCondition
never()
Get thenever
variant value.static Condition
of(java.util.function.Function<Condition.Builder,ObjectBuilder<Condition>> fn)
ScriptCondition
script()
Get thescript
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupConditionDeserializer(ObjectDeserializer<Condition.Builder> op)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Condition
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<Condition.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<Condition.Kind,java.lang.Object>
-
of
public static Condition of(java.util.function.Function<Condition.Builder,ObjectBuilder<Condition>> fn) -
isAlways
public boolean isAlways()Is this variant instance of kindalways
? -
always
Get thealways
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thealways
kind.
-
isArrayCompare
public boolean isArrayCompare()Is this variant instance of kindarray_compare
? -
arrayCompare
Get thearray_compare
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thearray_compare
kind.
-
isCompare
public boolean isCompare()Is this variant instance of kindcompare
? -
compare
Get thecompare
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecompare
kind.
-
isNever
public boolean isNever()Is this variant instance of kindnever
? -
never
Get thenever
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thenever
kind.
-
isScript
public boolean isScript()Is this variant instance of kindscript
? -
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
-