# A2uiServerToClientMessage

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

*** ** * ** ***


```
public sealed interface A2uiServerToClientMessage
```

<br />

Known direct subclasses [A2uiCreateSurfaceMessage](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiCreateSurfaceMessage), [A2uiDeleteSurfaceMessage](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDeleteSurfaceMessage), [A2uiUpdateComponentsMessage](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage), [A2uiUpdateDataModelMessage](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateDataModelMessage)

|---|---|
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiCreateSurfaceMessage` | Creates a new surface instance on the client. |
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDeleteSurfaceMessage` | Destroys an existing surface and frees its associated resources. |
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage` | Updates or replaces components in the surface's registry, which can include modifying static component properties (e.g., text, colors) or changing structural layout templates. |
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateDataModelMessage` | Updates the data model of a surface. |

*** ** * ** ***

The unified interface for all messages sent from the A2A server to the A2UI client.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiServerToClientMessage#getSurfaceId()()` The unique identifier of the surface this message targets. |

## Public methods

### getSurfaceId

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

```
abstract @NonNull String getSurfaceId()
```

The unique identifier of the surface this message targets.