# androidx.a2ui.engine.catalog

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog` | A registry of UI components and functions that a client surface can render. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition` | Defines a single UI component and its schema. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinitionCollection` | An immutable, indexed collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition`s registered within an `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog`. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalogSerializer` | Serializes an `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog` into JSON Schema representations. |

## Top-level functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinitionCollection` | `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#A2uiCoreComponentDefinitionCollection(kotlin.collections.List)( definitions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition> )` Creates an immutable `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#A2uiCoreComponentDefinitionCollection(kotlin.collections.List)` from a list of `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition`s. |

## Extension functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalogSerializer` | `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog.https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#(androidx.a2ui.engine.catalog.A2uiCoreCatalog).obtainSerializer()()` Creates an `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalogSerializer` for this catalog. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiInlineCatalog` | `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog.https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#(androidx.a2ui.engine.catalog.A2uiCoreCatalog).toInlineCatalog()()` Adapts this `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog` into an `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiInlineCatalog` for use in client capabilities advertisement. |
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema` | `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition.https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#(androidx.a2ui.engine.catalog.A2uiCoreComponentDefinition).toSchema()()` Converts this component definition into an `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema`. |

## Top-level functions

### A2uiCoreComponentDefinitionCollection

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/A2uiCoreComponentDefinitionCollection.kt+function:A2uiCoreComponentDefinitionCollection)

```
fun A2uiCoreComponentDefinitionCollection(
    definitions: List<A2uiCoreComponentDefinition> = emptyList()
): A2uiCoreComponentDefinitionCollection
```

Creates an immutable `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#A2uiCoreComponentDefinitionCollection(kotlin.collections.List)` from a list of `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition`s.

| Parameters |
|---|---|
| `definitions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinition> = emptyList()` | The list of component definitions to include. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreComponentDefinitionCollection` | An initialized `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/package-summary#A2uiCoreComponentDefinitionCollection(kotlin.collections.List)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If duplicate component definition names are detected. |

## Extension functions

### A2uiCoreCatalog.obtainSerializer

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

```
fun A2uiCoreCatalog.obtainSerializer(): A2uiCoreCatalogSerializer
```

Creates an `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalogSerializer` for this catalog.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalogSerializer` | a new serializer instance configured for this catalog |

### A2uiCoreCatalog.toInlineCatalog

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

```
fun A2uiCoreCatalog.toInlineCatalog(): A2uiInlineCatalog
```

Adapts this `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog` into an `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiInlineCatalog` for use in client capabilities advertisement.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/a2ui/engine/catalog/A2uiCoreCatalog#isInline()` is false. |

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

```
fun A2uiCoreComponentDefinition.toSchema(): A2uiSchema
```

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

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