Class MultiSearchResponseItem<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.msearch.MultiSearchResponseItem<TDocument>
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<MultiSearchResponseItem.Kind,java.lang.Object>
public class MultiSearchResponseItem<TDocument> extends java.lang.Object implements TaggedUnion<MultiSearchResponseItem.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiSearchResponseItem.Builder<TDocument>
static class
MultiSearchResponseItem.Kind
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
MultiSearchResponseItem.Kind
_kind()
Get the of the kind of variant held by this object.static <TDocument>
JsonpDeserializer<MultiSearchResponseItem<TDocument>>createMultiSearchResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
ErrorResponse
failure()
Get thefailure
variant value.boolean
isFailure()
Is this variant instance of kindfailure
?boolean
isResult()
Is this variant instance of kindresult
?static <TDocument>
MultiSearchResponseItem<TDocument>of(java.util.function.Function<MultiSearchResponseItem.Builder<TDocument>,ObjectBuilder<MultiSearchResponseItem<TDocument>>> fn)
MultiSearchItem<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<MultiSearchResponseItem.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<MultiSearchResponseItem.Kind,java.lang.Object>
-
of
public static <TDocument> MultiSearchResponseItem<TDocument> of(java.util.function.Function<MultiSearchResponseItem.Builder<TDocument>,ObjectBuilder<MultiSearchResponseItem<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
-
createMultiSearchResponseItemDeserializer
public static <TDocument> JsonpDeserializer<MultiSearchResponseItem<TDocument>> createMultiSearchResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
-