Class MultiSearchResponseItem<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.msearch.MultiSearchResponseItem<TDocument>
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<MultiSearchResponseItem.Kind,
Object>
public class MultiSearchResponseItem<TDocument>
extends Object
implements TaggedUnion<MultiSearchResponseItem.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
_kind()
Get the of the kind of variant held by this object.static <TDocument>
JsonpDeserializer<MultiSearchResponseItem<TDocument>>createMultiSearchResponseItemDeserializer
(JsonpDeserializer<TDocument> tDocumentDeserializer) failure()
Get thefailure
variant value.boolean
Is this variant instance of kindfailure
?boolean
isResult()
Is this variant instance of kindresult
?static <TDocument>
MultiSearchResponseItem<TDocument>of
(Function<MultiSearchResponseItem.Builder<TDocument>, ObjectBuilder<MultiSearchResponseItem<TDocument>>> fn) result()
Get theresult
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) toString()
-
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,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<MultiSearchResponseItem.Kind,
Object>
-
of
public static <TDocument> MultiSearchResponseItem<TDocument> of(Function<MultiSearchResponseItem.Builder<TDocument>, ObjectBuilder<MultiSearchResponseItem<TDocument>>> fn) -
isResult
public boolean isResult()Is this variant instance of kindresult
? -
result
Get theresult
variant value.- Throws:
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:
IllegalStateException
- if the current variant is not of thefailure
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
createMultiSearchResponseItemDeserializer
public static <TDocument> JsonpDeserializer<MultiSearchResponseItem<TDocument>> createMultiSearchResponseItemDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
-