# A2uiUpdateComponentsMessage

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

*** ** * ** ***


```
public final class A2uiUpdateComponentsMessage implements A2uiServerToClientMessage
```

<br />

*** ** * ** ***

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.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage#A2uiUpdateComponentsMessage(kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html surfaceId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiComponentPayload> components )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiComponentPayload>` | `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage#getComponents()()` A list of component payloads to insert or replace in the registry. |
| `@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/A2uiUpdateComponentsMessage#getSurfaceId()()` The ID of the surface to update. |
| `int` | `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUpdateComponentsMessage#hashCode()()` |
| `@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/A2uiUpdateComponentsMessage#toString()()` |

## Public constructors

### A2uiUpdateComponentsMessage

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

```
public A2uiUpdateComponentsMessage(
    @NonNull String surfaceId,
    @NonNull List<@NonNull A2uiComponentPayload> components
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getComponents

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

```
public final @NonNull List<@NonNull A2uiComponentPayload> getComponents()
```

A list of component payloads to insert or replace in the registry.

### getSurfaceId

```
public @NonNull String getSurfaceId()
```

The ID of the surface to update.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```