PutDocumentsRequest.Builder

class PutDocumentsRequest.Builder


Builder for PutDocumentsRequest objects.

Summary

Public constructors

Public functions

PutDocumentsRequest.Builder
addDocuments(documents: Array<Any!>)

Adds one or more annotated androidx.appsearch.annotation.Document documents to the request.

PutDocumentsRequest.Builder

Adds a collection of annotated androidx.appsearch.annotation.Document documents to the request.

PutDocumentsRequest.Builder

Adds one or more GenericDocument objects to the request.

PutDocumentsRequest.Builder

Adds a collection of GenericDocument objects to the request.

PutDocumentsRequest

Creates a new PutDocumentsRequest object.

Public constructors

Builder

Added in 1.1.0-alpha04
Builder()

Public functions

addDocuments

fun addDocuments(documents: Array<Any!>): PutDocumentsRequest.Builder

Adds one or more annotated androidx.appsearch.annotation.Document documents to the request.

Parameters
documents: Array<Any!>

annotated androidx.appsearch.annotation.Document documents.

Throws
androidx.appsearch.exceptions.AppSearchException

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

addDocuments

Added in 1.1.0-alpha04
fun addDocuments(documents: (Mutable)Collection<Any!>): PutDocumentsRequest.Builder

Adds a collection of annotated androidx.appsearch.annotation.Document documents to the request.

Parameters
documents: (Mutable)Collection<Any!>

annotated androidx.appsearch.annotation.Document documents.

Throws
androidx.appsearch.exceptions.AppSearchException

if an error occurs converting a document into a GenericDocument.

addGenericDocuments

fun addGenericDocuments(documents: Array<GenericDocument!>): PutDocumentsRequest.Builder

Adds one or more GenericDocument objects to the request.

addGenericDocuments

Added in 1.1.0-alpha04
fun addGenericDocuments(documents: (Mutable)Collection<GenericDocument!>): PutDocumentsRequest.Builder

Adds a collection of GenericDocument objects to the request.

build

Added in 1.1.0-alpha04
fun build(): PutDocumentsRequest

Creates a new PutDocumentsRequest object.