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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<FieldValue>
static final FieldValue
static final FieldValue
static 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 theany
variant value, used to represent non-scalar values (i.e.boolean
Get theboolean
variant value.double
Get thedouble
variant value.boolean
isAny()
Is this variant instance of kindany
?boolean
Is this variant instance of kindboolean
?boolean
isDouble()
Is this variant instance of kinddouble
?boolean
isLong()
Is this variant instance of kindlong
?boolean
isNull()
Is this variant instance of kindnull
?boolean
isString()
Is this variant instance of kindstring
?long
Get thelong
variant value.static FieldValue
of
(boolean value) static FieldValue
of
(double value) static FieldValue
of
(long value) static FieldValue
static FieldValue
static FieldValue
of
(Consumer<FieldValue.Builder> fn) void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Get thestring
variant value.
-
Field Details
-
NULL
-
TRUE
-
FALSE
-
_DESERIALIZER
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<FieldValue.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<FieldValue.Kind,
Object>
-
_toJsonString
-
of
-
isDouble
public boolean isDouble()Is this variant instance of kinddouble
? -
doubleValue
public double doubleValue()Get thedouble
variant value.- Throws:
IllegalStateException
- if the current variant is not of thedouble
kind.
-
isLong
public boolean isLong()Is this variant instance of kindlong
? -
longValue
public long longValue()Get thelong
variant value.- Throws:
IllegalStateException
- if the current variant is not of thelong
kind.
-
isBoolean
public boolean isBoolean()Is this variant instance of kindboolean
? -
booleanValue
public boolean booleanValue()Get theboolean
variant value.- Throws:
IllegalStateException
- if the current variant is not of theboolean
kind.
-
isString
public boolean isString()Is this variant instance of kindstring
? -
stringValue
Get thestring
variant value.- Throws:
IllegalStateException
- if the current variant is not of thestring
kind.
-
isAny
public boolean isAny()Is this variant instance of kindany
? -
anyValue
Get theany
variant value, used to represent non-scalar values (i.e. objects and arrays)- Throws:
IllegalStateException
- if the current variant is not of thestring
kind.
-
isNull
public boolean isNull()Is this variant instance of kindnull
? -
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-