Class MgetResponse.Builder<TDocument>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<MgetResponse.Builder<TDocument>>
co.elastic.clients.elasticsearch.core.MgetResponse.Builder<TDocument>
- All Implemented Interfaces:
- WithJson<MgetResponse.Builder<TDocument>>,- ObjectBuilder<MgetResponse<TDocument>>
- Enclosing class:
- MgetResponse<TDocument>
public static class MgetResponse.Builder<TDocument>
extends WithJsonObjectBuilderBase<MgetResponse.Builder<TDocument>>
implements ObjectBuilder<MgetResponse<TDocument>>
Builder for 
MgetResponse.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aMgetResponse.final MgetResponse.Builder<TDocument>docs(MultiGetResponseItem<TDocument> value, MultiGetResponseItem<TDocument>... values) Required - The response includes a docs array that contains the documents in the order specified in the request.final MgetResponse.Builder<TDocument>docs(Function<MultiGetResponseItem.Builder<TDocument>, ObjectBuilder<MultiGetResponseItem<TDocument>>> fn) Required - The response includes a docs array that contains the documents in the order specified in the request.final MgetResponse.Builder<TDocument>docs(List<MultiGetResponseItem<TDocument>> list) Required - The response includes a docs array that contains the documents in the order specified in the request.protected MgetResponse.Builder<TDocument>self()final MgetResponse.Builder<TDocument>Serializer for TDocument.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
docsRequired - The response includes a docs array that contains the documents in the order specified in the request. The structure of the returned documents is similar to that returned by the get API. If there is a failure getting a particular document, the error is included in place of the document.API name: docsAdds all elements of listtodocs.
- 
docspublic final MgetResponse.Builder<TDocument> docs(MultiGetResponseItem<TDocument> value, MultiGetResponseItem<TDocument>... values) Required - The response includes a docs array that contains the documents in the order specified in the request. The structure of the returned documents is similar to that returned by the get API. If there is a failure getting a particular document, the error is included in place of the document.API name: docsAdds one or more values to docs.
- 
docspublic final MgetResponse.Builder<TDocument> docs(Function<MultiGetResponseItem.Builder<TDocument>, ObjectBuilder<MultiGetResponseItem<TDocument>>> fn) Required - The response includes a docs array that contains the documents in the order specified in the request. The structure of the returned documents is similar to that returned by the get API. If there is a failure getting a particular document, the error is included in place of the document.API name: docsAdds a value to docsusing a builder lambda.
- 
tDocumentSerializerpublic final MgetResponse.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value) Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context.
- 
self- Specified by:
- selfin class- WithJsonObjectBuilderBase<MgetResponse.Builder<TDocument>>
 
- 
buildBuilds aMgetResponse.- Specified by:
- buildin interface- ObjectBuilder<TDocument>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-