# A2uiEventAction

Artifact: [androidx.a2ui:a2ui-model](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/model/protocol/A2uiUserAction.kt+class:androidx.a2ui.model.protocol.A2uiEventAction) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
class A2uiEventAction : A2uiUserAction
```

<br />

*** ** * ** ***

Defines an event action triggered by a user interaction to be sent to the server.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#A2uiEventAction(kotlin.String,kotlin.String,kotlin.Long,kotlin.String,kotlin.collections.Map)( surfaceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, componentId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, timestamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, eventName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, context: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#toString()()` |

| ### Public properties |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#componentId()` unique identifier of the component that was interacted with |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#context()` map containing custom properties and metadata associated with this action |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#eventName()` name of the event |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#surfaceId()` unique identifier of the surface where the action occurred |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiEventAction#timestamp()` timestamp of when the action occurred, represented as milliseconds since the epoch |

## Public constructors

### A2uiEventAction

```
A2uiEventAction(
    surfaceId: String,
    componentId: String,
    timestamp: Long,
    eventName: String,
    context: Map<String, Any?>
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### componentId

```
open val componentId: String
```

unique identifier of the component that was interacted with

### context

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val context: Map<String, Any?>
```

map containing custom properties and metadata associated with this action

### eventName

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val eventName: String
```

name of the event

### surfaceId

```
open val surfaceId: String
```

unique identifier of the surface where the action occurred

### timestamp

```
open val timestamp: Long
```

timestamp of when the action occurred, represented as milliseconds since the epoch