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 Summary
Constructors -
Method Summary
Modifier 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.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
docs
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 all elements of
listtodocs. -
docs
public 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. -
docs
public 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. -
tDocumentSerializer
public 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 classWithJsonObjectBuilderBase<MgetResponse.Builder<TDocument>>
-
build
Builds aMgetResponse.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
NullPointerException- if some of the required fields are null.
-