ReportUsageRequest Stay organized with collections Save and categorize content based on your preferences.
Page Summary
ReportUsageRequest is a class used to report the usage of a document, implementing the Parcelable interface.
It includes a Builder class to create ReportUsageRequest objects.
Key methods allow retrieving the document's ID, namespace, and the usage timestamp in milliseconds.
The class also provides a CREATOR field for Parcelable implementation and a writeToParcel method.
A request to report usage of a document.
See AppSearchClient.reportUsage(ReportUsageRequest, String) for a detailed description of usage reporting.
Nested Class Summary
| class | ReportUsageRequest.Builder | Builder forReportUsageRequest objects. | |
Inherited Constant Summary
| int | CONTENTS_FILE_DESCRIPTOR | |
| int | PARCELABLE_WRITE_RETURN_VALUE |
Field Summary
| public static finalCreator<ReportUsageRequest> | CREATOR |
Public Method Summary
| String | getDocumentId() Returns the ID of document that was used. |
| String | getNamespace() Returns the namespace of the document that was used. |
| long | getUsageTimestampMillis() Returns the timestamp in milliseconds of the usage report (the time at which the document was used). |
| void | writeToParcel(Parcel dest, int flags) |
Inherited Method Summary
| abstract int | describeContents() |
| abstract void | writeToParcel(Parcel arg0, int arg1) |
Fields
public static finalCreator<ReportUsageRequest>CREATOR
Public Methods
publicStringgetDocumentId()
Returns the ID of document that was used.
publicStringgetNamespace()
Returns the namespace of the document that was used.
public longgetUsageTimestampMillis()
Returns the timestamp in milliseconds of the usage report (the time at which the document was used).
The value is in theSystem.currentTimeMillis() time base.
public voidwriteToParcel(Parcel dest, int flags)
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.