Class FieldValue
java.lang.Object
co.elastic.clients.elasticsearch._types.FieldValue
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<FieldValue.Kind,java.lang.Object>
@JsonpDeserializable public class FieldValue extends java.lang.Object implements TaggedUnion<FieldValue.Kind,java.lang.Object>, JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldValue.Builderstatic classFieldValue.Kind -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<FieldValue>_DESERIALIZERstatic FieldValueFALSEstatic FieldValueNULLstatic FieldValueTRUE -
Method Summary
Modifier and Type Method Description java.lang.Object_get()FieldValue.Kind_kind()Get the of the kind of variant held by this object.java.lang.String_toJsonString()booleanbooleanValue()Get thebooleanvariant value.doubledoubleValue()Get thedoublevariant value.booleanisBoolean()Is this variant instance of kindboolean?booleanisDouble()Is this variant instance of kinddouble?booleanisLong()Is this variant instance of kindlong?booleanisNull()Is this variant instance of kindnull?booleanisString()Is this variant instance of kindstring?longlongValue()Get thelongvariant value.static FieldValueof(boolean value)static FieldValueof(double value)static FieldValueof(long value)static FieldValueof(java.lang.String value)static FieldValueof(java.util.function.Consumer<FieldValue.Builder> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)java.lang.StringstringValue()Get thestringvariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
NULL
-
TRUE
-
FALSE
-
_DESERIALIZER
-
-
Method Details
-
of
-
of
-
of
-
of
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<FieldValue.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<FieldValue.Kind,java.lang.Object>
-
_toJsonString
public java.lang.String _toJsonString() -
of
-
isDouble
public boolean isDouble()Is this variant instance of kinddouble? -
doubleValue
public double doubleValue()Get thedoublevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedoublekind.
-
isLong
public boolean isLong()Is this variant instance of kindlong? -
longValue
public long longValue()Get thelongvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thelongkind.
-
isBoolean
public boolean isBoolean()Is this variant instance of kindboolean? -
booleanValue
public boolean booleanValue()Get thebooleanvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thebooleankind.
-
isString
public boolean isString()Is this variant instance of kindstring? -
stringValue
public java.lang.String stringValue()Get thestringvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thestringkind.
-
isNull
public boolean isNull()Is this variant instance of kindnull? -
serialize
- Specified by:
serializein interfaceJsonpSerializable
-