ReportUsageRequest.Builder

public final class ReportUsageRequest.Builder


Builder for ReportUsageRequest objects.

Summary

Public constructors

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

Creates a new ReportUsageRequest.Builder instance.

Public methods

@NonNull ReportUsageRequest

Builds a new ReportUsageRequest.

@NonNull ReportUsageRequest.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 namespace, @NonNull String documentId)

Creates a new ReportUsageRequest.Builder instance.

Parameters
@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

build

Added in 1.1.0-alpha04
public @NonNull ReportUsageRequest build()

Builds a new ReportUsageRequest.

setUsageTimestampMillis

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