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 classCondition.Builderstatic classCondition.KindConditionvariant 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.AlwaysConditionalways()Get thealwaysvariant value.ArrayCompareConditionarrayCompare()Get thearray_comparevariant value.CompareConditioncompare()Get thecomparevariant value.booleanisAlways()Is this variant instance of kindalways?booleanisArrayCompare()Is this variant instance of kindarray_compare?booleanisCompare()Is this variant instance of kindcompare?booleanisNever()Is this variant instance of kindnever?booleanisScript()Is this variant instance of kindscript?NeverConditionnever()Get thenevervariant value.static Conditionof(java.util.function.Function<Condition.Builder,ObjectBuilder<Condition>> fn)ScriptConditionscript()Get thescriptvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupConditionDeserializer(ObjectDeserializer<Condition.Builder> op)java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Condition
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Condition.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin 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 thealwaysvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thealwayskind.
-
isArrayCompare
public boolean isArrayCompare()Is this variant instance of kindarray_compare? -
arrayCompare
Get thearray_comparevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thearray_comparekind.
-
isCompare
public boolean isCompare()Is this variant instance of kindcompare? -
compare
Get thecomparevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecomparekind.
-
isNever
public boolean isNever()Is this variant instance of kindnever? -
never
Get thenevervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theneverkind.
-
isScript
public boolean isScript()Is this variant instance of kindscript? -
script
Get thescriptvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thescriptkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupConditionDeserializer
-