# DismissAction.Builder

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

*** ** * ** ***


```
@Document.BuilderProducer
class DismissAction.Builder : DismissAction.BuilderBase<DismissAction.Builder!>
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.appsearch.usagereporting.TakenAction.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction.BuilderBase) |||
|   | ↳ | [androidx.appsearch.usagereporting.DismissAction.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase)\<[DismissAction.Builder](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder)!\> ||
|   |   | ↳ | [androidx.appsearch.usagereporting.DismissAction.Builder](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder) |

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder#Builder(androidx.appsearch.usagereporting.DismissAction)(dismissAction: https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction)` Constructs `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder` by copying existing values from the given `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder#Builder(java.lang.String,java.lang.String,long)(namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, actionTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder`. |

### Inherited functions

From [androidx.appsearch.usagereporting.DismissAction.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase) `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase#build()()`

Builds an `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction`.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase#setQuery(java.lang.String)(query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the user-entered search input (without any operators or rewriting) that yielded the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult` which impressed the user.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase#setReferencedQualifiedId(java.lang.String)(referencedQualifiedId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the qualified id of the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult` document that the user takes action on.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase#setResultRankGlobal(int)(resultRankGlobal: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the global rank of the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult` document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.BuilderBase#setResultRankInBlock(int)(resultRankInBlock: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the rank of the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult` document among the user-defined block.
From [androidx.appsearch.usagereporting.TakenAction.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction.BuilderBase) `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction.BuilderBase#build()()`

For AppSearch annotation processor requirement only.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction.BuilderBase#setDocumentTtlMillis(long)(documentTtlMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the time-to-live (TTL) of the `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/TakenAction` document as a duration in milliseconds.

## Public constructors

### Builder

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

```
Builder(dismissAction: DismissAction)
```

Constructs `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder` by copying existing values from the given `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction`.

| Parameters |
|---|---|
| `dismissAction: https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction` | an existing `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction` object. |

### Builder

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

```
Builder(namespace: String, id: String, actionTimestampMillis: Long)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/usagereporting/DismissAction.Builder`.

| Parameters |
|---|---|
| `namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Namespace for the Document. See `https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document.Namespace`. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Unique identifier for the Document. See `https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document.Id`. |
| `actionTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The timestamp when the user took the action, in milliseconds since Unix epoch. |