# A2uiCoreComponentDefinition

Artifact: [androidx.a2ui:a2ui-engine](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition.kt+class:androidx.a2ui.engine.catalog.A2uiCoreComponentDefinition) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
public interface A2uiCoreComponentDefinition
```

<br />

*** ** * ** ***

Defines a single UI component and its schema.

## 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/engine/catalog/A2uiCoreComponentDefinition#getDescription()()` Describes the component behavior so the AI agent knows when to use it. |
| `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/engine/catalog/A2uiCoreComponentDefinition#getName()()` Component name that would be provided to the AI agent. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | `https://developer.android.com/reference/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition#getPropertySchema()()` The schema of the properties of the component. |

| ### Extension functions |
|---|---|
| `default final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | `https://developer.android.com/reference/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinitionKt.https://developer.android.com/reference/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition#(androidx.a2ui.engine.catalog.A2uiCoreComponentDefinition).toSchema()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition receiver )` Converts this component definition into an `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema`. |

## Public methods

### getDescription

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

```
abstract @NonNull String getDescription()
```

Describes the component behavior so the AI agent knows when to use it.

### getName

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

```
abstract @NonNull String getName()
```

Component name that would be provided to the AI agent.

### getPropertySchema

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

```
abstract @NonNull A2uiSchema getPropertySchema()
```

The schema of the properties of the component.

## Extension functions

### A2uiCoreComponentDefinitionKt.toSchema

Artifact: [androidx.a2ui:a2ui-engine](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition.kt+function:toSchema)

```
default final @NonNull A2uiSchema A2uiCoreComponentDefinitionKt.toSchema(
    @NonNull A2uiCoreComponentDefinition receiver
)
```

Converts this component definition into an `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema`.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | the `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` representation of this component definition |