Class FieldValue
java.lang.Object
co.elastic.clients.elasticsearch._types.FieldValue
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<FieldValue.Kind,Object>
@JsonpDeserializable
public class FieldValue
extends Object
implements TaggedUnion<FieldValue.Kind,Object>, JsonpSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<FieldValue>static final FieldValuestatic final FieldValuestatic final FieldValue -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final FieldValue.Kind_kind()Get the of the kind of variant held by this object.anyValue()Get theanyvariant value, used to represent non-scalar values (i.e.booleanGet thebooleanvariant value.doubleGet thedoublevariant value.booleanisAny()Is this variant instance of kindany?booleanIs 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?longGet thelongvariant value.static FieldValueof(boolean value) static FieldValueof(double value) static FieldValueof(long value) static FieldValuestatic FieldValuestatic FieldValueof(Consumer<FieldValue.Builder> fn) voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Get thestringvariant value.
-
Field Details
-
NULL
-
TRUE
-
FALSE
-
_DESERIALIZER
-
-
Method Details
-
of
-
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,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<FieldValue.Kind,Object>
-
_toJsonString
-
of
-
isDouble
public boolean isDouble()Is this variant instance of kinddouble? -
doubleValue
public double doubleValue()Get thedoublevariant value.- Throws:
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:
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:
IllegalStateException- if the current variant is not of thebooleankind.
-
isString
public boolean isString()Is this variant instance of kindstring? -
stringValue
Get thestringvariant value.- Throws:
IllegalStateException- if the current variant is not of thestringkind.
-
isAny
public boolean isAny()Is this variant instance of kindany? -
anyValue
Get theanyvariant value, used to represent non-scalar values (i.e. objects and arrays)- Throws:
IllegalStateException- if the current variant is not of thestringkind.
-
isNull
public boolean isNull()Is this variant instance of kindnull? -
serialize
- Specified by:
serializein interfaceJsonpSerializable
-