ImpressionAction.Builder


@Document.BuilderProducer
class ImpressionAction.Builder : ImpressionAction.BuilderBase


Builder for ImpressionAction.

Summary

Public constructors

Builder(impressionAction: ImpressionAction)

Constructs ImpressionAction.Builder by copying existing values from the given ImpressionAction.

Builder(namespace: String, id: String, actionTimestampMillis: Long)

Constructor for ImpressionAction.Builder.

Inherited functions

From androidx.appsearch.usagereporting.ImpressionAction.BuilderBase
ImpressionAction

Builds an ImpressionAction.

T
setQuery(query: String?)

Sets the user-entered search input (without any operators or rewriting) that yielded the androidx.appsearch.app.SearchResult which impressed the user.

T
setReferencedQualifiedId(referencedQualifiedId: String?)

Sets the qualified id of the androidx.appsearch.app.SearchResult document that the user takes action on.

T
setResultRankGlobal(resultRankGlobal: Int)

Sets the global rank of the androidx.appsearch.app.SearchResult document.

T
setResultRankInBlock(resultRankInBlock: Int)

Sets the rank of the androidx.appsearch.app.SearchResult document among the user-defined block.

From androidx.appsearch.usagereporting.TakenAction.BuilderBase
TakenAction

For AppSearch annotation processor requirement only.

T
setDocumentTtlMillis(documentTtlMillis: Long)

Sets the time-to-live (TTL) of the TakenAction document as a duration in milliseconds.

Public constructors

Builder

Added in 1.1.0
Builder(impressionAction: ImpressionAction)

Constructs ImpressionAction.Builder by copying existing values from the given ImpressionAction.

Parameters
impressionAction: ImpressionAction

an existing ImpressionAction object.

Builder

Added in 1.1.0
Builder(namespace: String, id: String, actionTimestampMillis: Long)

Constructor for ImpressionAction.Builder.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

Unique identifier for the Document. See Document.Id.

actionTimestampMillis: Long

The timestamp when the user took the action, in milliseconds since Unix epoch.