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 class
FieldValue.Builder
static class
FieldValue.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<FieldValue>
_DESERIALIZER
static FieldValue
FALSE
static FieldValue
NULL
static FieldValue
TRUE
-
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()
boolean
booleanValue()
Get theboolean
variant value.double
doubleValue()
Get thedouble
variant value.boolean
isBoolean()
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
longValue()
Get thelong
variant value.static FieldValue
of(boolean value)
static FieldValue
of(double value)
static FieldValue
of(long value)
static FieldValue
of(java.lang.String value)
static FieldValue
of(java.util.function.Consumer<FieldValue.Builder> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
java.lang.String
stringValue()
Get thestring
variant 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:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<FieldValue.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in 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 thedouble
variant value.- Throws:
java.lang.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:
java.lang.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:
java.lang.IllegalStateException
- if the current variant is not of theboolean
kind.
-
isString
public boolean isString()Is this variant instance of kindstring
? -
stringValue
public java.lang.String stringValue()Get thestring
variant value.- Throws:
java.lang.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
-