Class MultiGetResponseItem<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.mget.MultiGetResponseItem<TDocument>
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<MultiGetResponseItem.Kind,java.lang.Object>
public class MultiGetResponseItem<TDocument> extends java.lang.Object implements TaggedUnion<MultiGetResponseItem.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiGetResponseItem.Builder<TDocument>
static class
MultiGetResponseItem.Kind
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
MultiGetResponseItem.Kind
_kind()
Get the of the kind of variant held by this object.static <TDocument>
JsonpDeserializer<MultiGetResponseItem<TDocument>>createMultiGetResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
MultiGetError
failure()
Get thefailure
variant value.boolean
isFailure()
Is this variant instance of kindfailure
?boolean
isResult()
Is this variant instance of kindresult
?static <TDocument>
MultiGetResponseItem<TDocument>of(java.util.function.Function<MultiGetResponseItem.Builder<TDocument>,ObjectBuilder<MultiGetResponseItem<TDocument>>> fn)
GetResult<TDocument>
result()
Get theresult
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<MultiGetResponseItem.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<MultiGetResponseItem.Kind,java.lang.Object>
-
of
public static <TDocument> MultiGetResponseItem<TDocument> of(java.util.function.Function<MultiGetResponseItem.Builder<TDocument>,ObjectBuilder<MultiGetResponseItem<TDocument>>> fn) -
isResult
public boolean isResult()Is this variant instance of kindresult
? -
result
Get theresult
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theresult
kind.
-
isFailure
public boolean isFailure()Is this variant instance of kindfailure
? -
failure
Get thefailure
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefailure
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
createMultiGetResponseItemDeserializer
public static <TDocument> JsonpDeserializer<MultiGetResponseItem<TDocument>> createMultiGetResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
-