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 classMultiGetResponseItem.Builder<TDocument>static classMultiGetResponseItem.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)MultiGetErrorfailure()Get thefailurevariant value.booleanisFailure()Is this variant instance of kindfailure?booleanisResult()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 theresultvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<MultiGetResponseItem.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin 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 theresultvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theresultkind.
-
isFailure
public boolean isFailure()Is this variant instance of kindfailure? -
failure
Get thefailurevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefailurekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
createMultiGetResponseItemDeserializer
public static <TDocument> JsonpDeserializer<MultiGetResponseItem<TDocument>> createMultiGetResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
-