# A2uiClientEventMessage

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/A2uiClientToServerMessage.kt+class:androidx.a2ui.model.protocol.A2uiClientEventMessage) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
class A2uiClientEventMessage : A2uiClientToServerMessage
```

<br />

*** ** * ** ***

Represents a client event message to be sent to the server.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#A2uiClientEventMessage(kotlin.String,kotlin.String,kotlin.String,kotlin.Long,kotlin.collections.Map,androidx.a2ui.model.protocol.A2uiClientDataModel)( type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, 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, 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?>, clientDataModel: https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientDataModel? )` |

| ### 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/A2uiClientEventMessage#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/A2uiClientEventMessage#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientDataModel?` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#clientDataModel()` An optional snapshot of active client data models to be synchronized with the server alongside this event. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#componentId()` The 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/A2uiClientEventMessage#context()` A 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/A2uiClientEventMessage#surfaceId()` The unique identifier of the surface where the action occurred. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#timestamp()` The timestamp of when the action occurred, represented as milliseconds since the epoch. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientEventMessage#type()` The type of the action performed (e.g., "click", "swipe"). |

## Public constructors

### A2uiClientEventMessage

```
A2uiClientEventMessage(
    type: String,
    surfaceId: String,
    componentId: String,
    timestamp: Long,
    context: Map<String, Any?> = emptyMap(),
    clientDataModel: A2uiClientDataModel? = null
)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### clientDataModel

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

```
val clientDataModel: A2uiClientDataModel?
```

An optional snapshot of active client data models to be synchronized with the server alongside this event.

### componentId

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

```
val componentId: String
```

The 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?>
```

A map containing custom properties and metadata associated with this action.

### surfaceId

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

```
val surfaceId: String
```

The unique identifier of the surface where the action occurred.

### timestamp

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

```
val timestamp: Long
```

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

### type

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

```
val type: String
```

The type of the action performed (e.g., "click", "swipe").