# A2uiClientDataModel

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

*** ** * ** ***


```
class A2uiClientDataModel
```

<br />

*** ** * ** ***

Represents the client data model synchronization payload sent to the agent.

This payload captures the current state of the data tree for active surfaces with `sendDataModel = true` and is automatically attached to outbound client event messages.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientDataModel#A2uiClientDataModel(kotlin.collections.Map)(surfaces: 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/A2uiClientDataModel#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/A2uiClientDataModel#hashCode()()` |
| `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.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/A2uiClientDataModel#toPayloadMap()()` Converts this data model object to the A2UI JSON-compatible Map structure. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientDataModel#toString()()` |

| ### Public properties |
|---|---|
| `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/A2uiClientDataModel#surfaces()` A map where keys are surface IDs and values are the complete, current data model root for that surface. |

## Public constructors

### A2uiClientDataModel

```
A2uiClientDataModel(surfaces: Map<String, Any?>)
```

## Public functions

### equals

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

### hashCode

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

### toPayloadMap

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

```
fun toPayloadMap(): Map<String, Map<String, Any?>>
```

Converts this data model object to the A2UI JSON-compatible Map structure.

### toString

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

## Public properties

### surfaces

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

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

A map where keys are surface IDs and values are the complete, current data model root for that surface.