# ReportUsageRequest

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/app/ReportUsageRequest.java+class:androidx.appsearch.app.ReportUsageRequest) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
class ReportUsageRequest
```

<br />

*** ** * ** ***

A request to report usage of a document.

See `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession#reportUsageAsync(androidx.appsearch.app.ReportUsageRequest)` for a detailed description of usage reporting.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession#reportUsageAsync(androidx.appsearch.app.ReportUsageRequest)` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportUsageRequest.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportUsageRequest` objects. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportUsageRequest#getDocumentId()()` Returns the ID of document that was used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportUsageRequest#getNamespace()()` Returns the namespace of the document that was used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/ReportUsageRequest#getUsageTimestampMillis()()` Returns the timestamp in milliseconds of the usage report (the time at which the document was used). |

## Public functions

### getDocumentId

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getDocumentId(): String
```

Returns the ID of document that was used.

### getNamespace

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getNamespace(): String
```

Returns the namespace of the document that was used.

### getUsageTimestampMillis

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun getUsageTimestampMillis(): Long
```

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

The value is in the `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.