Class FieldValue
- java.lang.Object
-
- org.opensearch.client.opensearch._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
All Methods Static Methods Instance Methods Concrete Methods 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.
-
-
-
Field Detail
-
NULL
public static final FieldValue NULL
-
TRUE
public static final FieldValue TRUE
-
FALSE
public static final FieldValue FALSE
-
_DESERIALIZER
public static final JsonpDeserializer<FieldValue> _DESERIALIZER
-
-
Method Detail
-
of
public static FieldValue of(long value)
-
of
public static FieldValue of(double value)
-
of
public static FieldValue of(boolean value)
-
of
public static FieldValue of(java.lang.String value)
-
_kind
public final FieldValue.Kind _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
public static FieldValue of(java.util.function.Consumer<FieldValue.Builder> fn)
-
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
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-