# TextClassifierEvent.ConversationActionsEvent.Builder

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

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent.Builder "View this page in Java")  

```
class Builder : TextClassifierEvent.Builder<TextClassifierEvent.ConversationActionsEvent.Builder!>
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                                                          |||
| ↳ | [android.view.textclassifier.TextClassifierEvent.Builder](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder)\<[android.view.textclassifier.TextClassifierEvent.ConversationActionsEvent.Builder](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent.Builder#)\> ||
|   | ↳ | [android.view.textclassifier.TextClassifierEvent.ConversationActionsEvent.Builder](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent.Builder#) |

Builder class for[ConversationActionsEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent).

## Summary

|                                                                                                                                                                                                          Public constructors                                                                                                                                                                                                           ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent.Builder#Builder(kotlin.Int))`(`eventType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates a builder for building[TextSelectionEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.TextSelectionEvent)s. |

|                                                                                                                                                                                                                                             Public methods                                                                                                                                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [TextClassifierEvent.ConversationActionsEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent) | [build](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent.Builder#build())`()` Builds and returns a[ConversationActionsEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent). |

| Inherited functions ||
|---|---|
| From class[Builder](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder) |---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | T | [setActionIndices](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setActionIndices(kotlin.Int))`(`vararg` `actionIndices:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Sets the indices of the actions involved in this event. Actions are usually returned by the text classifier in priority order with the most preferred action at index 0. These indices give an indication of the position of the actions that are being reported. E.g. ```kotlin // 3 smart actions are shown at index 0, 1, 2 respectively in response to a link click. new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_ACTIONS_SHOWN) .setEventIndex(0, 1, 2) ... .build(); ... // Smart action at index 1 is activated. new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_SMART_ACTION) .setEventIndex(1) ... .build(); ``` <br /> | | T | [setEntityTypes](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setEntityTypes(kotlin.String))`(`vararg` `entityTypes:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Sets the entity types. e.g.[TextClassifier.TYPE_ADDRESS](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifier#TYPE_ADDRESS:kotlin.String). Supported types: See[TextClassifier](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifier)types See[ConversationAction](https://developer.android.com/reference/kotlin/android/view/textclassifier/ConversationAction)types See[ULocale.toLanguageTag()](https://developer.android.com/reference/kotlin/android/icu/util/ULocale.html#toLanguageTag()) <br />                                                            | | T | [setEventContext](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setEventContext(android.view.textclassifier.TextClassificationContext))`(`eventContext:` `[TextClassificationContext](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassificationContext)?`)` <br /> Sets the event context. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | T | [setEventIndex](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setEventIndex(kotlin.Int))`(`eventIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Sets the index of this event in the series of events it belongs to. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | T | [setExtras](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setExtras(android.os.Bundle))`(`extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)`)` <br /> Sets a bundle containing non-structured extra information about the event. **NOTE:**Prefer to set only immutable values on the bundle otherwise, avoid updating the internals of this bundle as it may have unexpected consequences on the clients of the built event object. For similar reasons, avoid depending on mutable objects in this bundle. <br />                                                                                                                                                                                                                                                                                                       | | T | [setLocale](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setLocale(android.icu.util.ULocale))`(`locale:` `[ULocale](https://developer.android.com/reference/kotlin/android/icu/util/ULocale.html#)?`)` <br /> Sets the detected locale. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | T | [setModelName](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setModelName(kotlin.String))`(`modelVersion:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Sets the model name string. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | T | [setResultId](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setResultId(kotlin.String))`(`resultId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Sets the id of the text classifier result related to this event. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | T | [setScores](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.Builder#setScores(kotlin.Float))`(`vararg` `scores:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` <br /> Sets the scores of the suggestions. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | ||

## Public constructors

### Builder

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

```
Builder(eventType: Int)
```

Creates a builder for building[TextSelectionEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.TextSelectionEvent)s.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `eventType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The event type. e.g.[TYPE_SMART_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_ACTION:kotlin.Int)Value is[android.view.textclassifier.TextClassifierEvent#TYPE_SELECTION_STARTED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_STARTED:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SELECTION_MODIFIED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_MODIFIED:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SMART_SELECTION_SINGLE](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_SELECTION_SINGLE:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SMART_SELECTION_MULTI](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_SELECTION_MULTI:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_AUTO_SELECTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_AUTO_SELECTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_ACTIONS_SHOWN](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_ACTIONS_SHOWN:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_LINK_CLICKED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_LINK_CLICKED:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_OVERTYPE](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_OVERTYPE:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_COPY_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_COPY_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_PASTE_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_PASTE_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_CUT_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_CUT_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SHARE_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SHARE_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SMART_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SMART_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SELECTION_DRAG](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_DRAG:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SELECTION_DESTROYED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_DESTROYED:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_OTHER_ACTION](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_OTHER_ACTION:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SELECT_ALL](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECT_ALL:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_SELECTION_RESET](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_SELECTION_RESET:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_MANUAL_REPLY](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_MANUAL_REPLY:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_ACTIONS_GENERATED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_ACTIONS_GENERATED:kotlin.Int),[android.view.textclassifier.TextClassifierEvent#TYPE_LINKS_GENERATED](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent#TYPE_LINKS_GENERATED:kotlin.Int), or android.view.textclassifier.TextClassifierEvent.TYPE_READ_CLIPBOARD |

## Public methods

### build

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

```
fun build(): TextClassifierEvent.ConversationActionsEvent
```

Builds and returns a[ConversationActionsEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent).

|                                                                                                Return                                                                                                ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [TextClassifierEvent.ConversationActionsEvent](https://developer.android.com/reference/kotlin/android/view/textclassifier/TextClassifierEvent.ConversationActionsEvent) | This value cannot be`null`. |