Class MgetResponse.Builder<TDocument>
java.lang.Object
org.opensearch.client.opensearch._global.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
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.client.util.ObjectBuilder
ObjectBuilder.Constant<V>
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description 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.Builder<TDocument>
addDocs(Hit<TDocument> value)
Add a value todocs(List)
, creating the list if needed.MgetResponse<TDocument>
build()
Builds aMgetResponse
.MgetResponse.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:docs
MgetResponse.Builder<TDocument>
docs(Hit<TDocument>... value)
API name:docs
MgetResponse.Builder<TDocument>
tDocumentSerializer(JsonpSerializer<TDocument> value)
Serializer for TDocument.
-
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. -
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. -
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:
build
in interfaceObjectBuilder<TDocument>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-