ReportSystemUsageRequest.Builder

public final class ReportSystemUsageRequest.Builder


Builder for ReportSystemUsageRequest objects.

Summary

Public constructors

Builder(
    @NonNull String packageName,
    @NonNull String databaseName,
    @NonNull String namespace,
    @NonNull String documentId
)

Creates a ReportSystemUsageRequest.Builder instance.

Public methods

@NonNull ReportSystemUsageRequest

Builds a new ReportSystemUsageRequest.

@NonNull ReportSystemUsageRequest.Builder
setUsageTimestampMillis(long usageTimestampMillis)

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

Public constructors

Builder

Added in 1.1.0-alpha04
public Builder(
    @NonNull String packageName,
    @NonNull String databaseName,
    @NonNull String namespace,
    @NonNull String documentId
)

Creates a ReportSystemUsageRequest.Builder instance.

Parameters
@NonNull String packageName

The package name of the app which owns the document that was used (such as from getPackageName).

@NonNull String databaseName

The database in which the document that was used resides (such as from getDatabaseName).

@NonNull String namespace

The namespace of the document that was used (such as from getNamespace.

@NonNull String documentId

The ID of document that was used (such as from getId.

Public methods

setUsageTimestampMillis

Added in 1.1.0-alpha04
public @NonNull ReportSystemUsageRequest.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 ReportSystemUsageRequest is constructed.