# ReportSystemUsageRequest.Builder

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#inhmethods)  

# ReportSystemUsageRequest.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/appsearch/ReportSystemUsageRequest.Builder "View this page in Kotlin")\|Java

`
public
static
final

class
ReportSystemUsageRequest.Builder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appsearch.ReportSystemUsageRequest.Builder |

<br />

*** ** * ** ***

Builder for[ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest)objects.

## Summary

|                                                                                                                                                                                                                                                                                                                                       ### Public constructors                                                                                                                                                                                                                                                                                                                                       ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#Builder(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` packageName, `[String](https://developer.android.com/reference/java/lang/String)` databaseName, `[String](https://developer.android.com/reference/java/lang/String)` namespace, `[String](https://developer.android.com/reference/java/lang/String)` documentId) ` Creates a[ReportSystemUsageRequest.Builder](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder)instance. |

|                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest)                 | ` `[build](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#build())`() ` Builds a new[ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest).                                    |
| ` `[ReportSystemUsageRequest.Builder](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder) | ` `[setUsageTimestampMillis](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder#setUsageTimestampMillis(long))`(long usageTimestampMillis) ` Sets the timestamp in milliseconds of the usage report (the time at which the document was used). |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### Builder

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Builder (String packageName, 
                String databaseName, 
                String namespace, 
                String documentId)
```

Creates a[ReportSystemUsageRequest.Builder](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder)instance.

<br />

|                                                                                                                                Parameters                                                                                                                                ||
|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `packageName`  | `String`: The package name of the app which owns the document that was used (such as from[SearchResult.getPackageName](https://developer.android.com/reference/android/app/appsearch/SearchResult#getPackageName())). This value cannot be`null`. <br /> |
| `databaseName` | `String`: The database in which the document that was used resides (such as from[SearchResult.getDatabaseName](https://developer.android.com/reference/android/app/appsearch/SearchResult#getDatabaseName())). This value cannot be`null`. <br />        |
| `namespace`    | `String`: The namespace of the document that was used (such as from[GenericDocument.getNamespace()](https://developer.android.com/reference/android/app/appsearch/GenericDocument#getNamespace()). This value cannot be`null`. <br />                    |
| `documentId`   | `String`: The ID of document that was used (such as from[GenericDocument.getId()](https://developer.android.com/reference/android/app/appsearch/GenericDocument#getId()). This value cannot be`null`. <br />                                             |

## Public methods

### build

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ReportSystemUsageRequest build ()
```

Builds a new[ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest).

<br />

|                                                                        Returns                                                                         ||
|--------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest) | This value cannot be`null`. <br /> |

### setUsageTimestampMillis

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public 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[System.currentTimeMillis](https://developer.android.com/reference/java/lang/System#currentTimeMillis())time base.

If unset, this defaults to the current timestamp at the time that the[ReportSystemUsageRequest](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest)is constructed.

<br />

|                                                                 Parameters                                                                  ||
|------------------------|---------------------------------------------------------------------------------------------------------------------|
| `usageTimestampMillis` | `long`: Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z. <br /> |

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [ReportSystemUsageRequest.Builder](https://developer.android.com/reference/android/app/appsearch/ReportSystemUsageRequest.Builder) | This value cannot be`null`. <br /> |