Class MgetResponse.Builder<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch._core.MgetResponse.Builder<TDocument>
- All Implemented Interfaces:
ObjectBuilder<MgetResponse<TDocument>>
- Enclosing class:
- MgetResponse<TDocument>
public static class MgetResponse.Builder<TDocument> extends java.lang.Object implements ObjectBuilder<MgetResponse<TDocument>>
Builder for
MgetResponse.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description MgetResponse.Builder<TDocument>addDocs(Hit<TDocument> value)Add a value todocs(List), creating the list if needed.MgetResponse.Builder<TDocument>addDocs(java.util.function.Function<Hit.Builder<TDocument>,ObjectBuilder<Hit<TDocument>>> fn)Add a value todocs(List), creating the list if needed.MgetResponse<TDocument>build()Builds aMgetResponse.MgetResponse.Builder<TDocument>docs(Hit<TDocument>... value)API name:docsMgetResponse.Builder<TDocument>docs(java.util.function.Function<Hit.Builder<TDocument>,ObjectBuilder<Hit<TDocument>>> fn)Setdocs(List)to a singleton list.MgetResponse.Builder<TDocument>docs(java.util.List<Hit<TDocument>> value)API name:docsMgetResponse.Builder<TDocument>tDocumentSerializer(JsonpSerializer<TDocument> value)Serializer for TDocument.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
docs
API name:docs -
docs
API name:docs -
addDocs
Add a value todocs(List), creating the list if needed. 4 -
docs
public MgetResponse.Builder<TDocument> docs(java.util.function.Function<Hit.Builder<TDocument>,ObjectBuilder<Hit<TDocument>>> fn)Setdocs(List)to a singleton list. -
addDocs
public MgetResponse.Builder<TDocument> addDocs(java.util.function.Function<Hit.Builder<TDocument>,ObjectBuilder<Hit<TDocument>>> fn)Add a value todocs(List), creating the list if needed. 5 -
tDocumentSerializer
public 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. -
build
Builds aMgetResponse.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-