PutDocumentsRequest.Builder

public static final class PutDocumentsRequest.Builder
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.PutDocumentsRequest.Builder


Builder for PutDocumentsRequest objects.

Summary

Public constructors

Builder()

Public methods

PutDocumentsRequest.Builder addDocuments(Collection<?> documents)

Adds a collection of annotated Document documents to the request.

PutDocumentsRequest.Builder addDocuments(Object... documents)

Adds one or more annotated Document documents to the request.

PutDocumentsRequest.Builder addGenericDocuments(Collection<? extends GenericDocument> documents)

Adds a collection of GenericDocument objects to the request.

PutDocumentsRequest.Builder addGenericDocuments(GenericDocument... documents)

Adds one or more GenericDocument objects to the request.

PutDocumentsRequest build()

Creates a new PutDocumentsRequest object.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

addDocuments

public PutDocumentsRequest.Builder addDocuments (Collection<?> documents)

Adds a collection of annotated Document documents to the request.

Parameters
documents Collection: annotated Document documents.

Returns
PutDocumentsRequest.Builder

Throws
AppSearchException if an error occurs converting a document into a GenericDocument.

addDocuments

public PutDocumentsRequest.Builder addDocuments (Object... documents)

Adds one or more annotated Document documents to the request.

Parameters
documents Object: annotated Document documents.

Returns
PutDocumentsRequest.Builder

Throws
AppSearchException if an error occurs converting a document class into a GenericDocument.

addGenericDocuments

public PutDocumentsRequest.Builder addGenericDocuments (Collection<? extends GenericDocument> documents)

Adds a collection of GenericDocument objects to the request.

Parameters
documents Collection

Returns
PutDocumentsRequest.Builder

addGenericDocuments

public PutDocumentsRequest.Builder addGenericDocuments (GenericDocument... documents)

Adds one or more GenericDocument objects to the request.

Parameters
documents GenericDocument

Returns
PutDocumentsRequest.Builder

build

public PutDocumentsRequest build ()

Creates a new PutDocumentsRequest object.

Returns
PutDocumentsRequest