public final class

ReportUsageRequest.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.ReportUsageRequest.Builder

Overview

Builder for ReportUsageRequest objects.

Summary

Constructors
publicBuilder(java.lang.String namespace, java.lang.String documentId)

Creates a new ReportUsageRequest.Builder instance.

Methods
public ReportUsageRequestbuild()

Builds a new ReportUsageRequest.

public ReportUsageRequest.BuildersetUsageTimestampMillis(long usageTimestampMillis)

Sets the timestamp in milliseconds of the usage report (the time at which the document was used).

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String namespace, java.lang.String documentId)

Creates a new ReportUsageRequest.Builder instance.

Parameters:

namespace: The namespace of the document that was used (e.g. from GenericDocument.getNamespace().
documentId: The ID of document that was used (e.g. from GenericDocument.getId().

Methods

public ReportUsageRequest.Builder setUsageTimestampMillis(long usageTimestampMillis)

Sets the timestamp in milliseconds of the usage report (the time at which the document was used).

The value is in the currentTimeMillis time base.

If unset, this defaults to the current timestamp at the time that the ReportUsageRequest is constructed.

public ReportUsageRequest build()

Builds a new ReportUsageRequest.