ReportUsageRequest

  • 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.

public final classReportUsageRequest extendsObject
implementsParcelable

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.BuilderBuilder forReportUsageRequest objects. 

Inherited Constant Summary

From interface android.os.Parcelable
intCONTENTS_FILE_DESCRIPTOR
intPARCELABLE_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

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
From interface android.os.Parcelable
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.