# A2uiUserAction

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

*** ** * ** ***


```
public sealed interface A2uiUserAction
```

<br />

Known direct subclasses [A2uiEventAction](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiEventAction), [A2uiFunctionCallAction](https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiFunctionCallAction)

|---|---|
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiEventAction` | Defines an event action triggered by a user interaction to be sent to the server. |
| `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiFunctionCallAction` | Defines a local component function execution action triggered by a user interaction. |

*** ** * ** ***

Defines an A2UI component user interaction.

## 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/A2uiUserAction#getComponentId()()` unique identifier of the component that was interacted with |
| `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/A2uiUserAction#getSurfaceId()()` unique identifier of the surface where the action occurred |
| `abstract long` | `https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiUserAction#getTimestamp()()` timestamp of when the action occurred, represented as milliseconds since the epoch |

## Public methods

### getComponentId

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

```
abstract @NonNull String getComponentId()
```

unique identifier of the component that was interacted with

### getSurfaceId

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

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

unique identifier of the surface where the action occurred

### getTimestamp

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

```
abstract long getTimestamp()
```

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