A2uiBasicCatalogV1

class A2uiBasicCatalogV1


Defines the API contract and schemas for the A2UI Basic Catalog V1 following the specification in https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json.

This class is intended to support the Basic Catalog specification 1.0 defined in https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json, support for it is planned.

This class acts as the API contract for any design system (e.g. Material 3, Jetpack Compose Glimmer, TV Compose) wishing to implement the basic catalog specification.

Summary

Nested types

Attributes to enhance accessibility of the A2UI Basic Catalog components when using assistive technologies like screen readers.

The A2UI "AudioPlayer" component for playing audio content from a URL.

The A2UI "Button" component for clickable buttons that dispatch actions.

Visual style variant for a Button.

The A2UI "Card" component for displaying content in a styled container.

The A2UI "CheckBox" component for displaying a checkable control with an associated label.

Holds the evaluated result of a client-side validation rule.

The A2UI "ChoicePicker" component for selecting one or more options from a list.

Display style for a ChoicePicker.

A selectable option within a ChoicePicker component.

Selection behavior variant for a ChoicePicker.

The A2UI "Column" component for arranging children vertically.

Alignment of children along the cross axis of a Column.

Arrangement of children along the main axis of a Column.

The A2UI "DateTimeInput" component for selecting date and/or time.

The A2UI "Divider" component for displaying a horizontal or vertical dividing line.

Orientation of a Divider.

The A2UI "Icon" component for displaying an icon.

Built-in icon token for an Icon.

The visual source for the Icon.

An Icon drawn from a client-provided SVG path rather than a BuiltIn token.

An Icon named by a string that matches no predefined BuiltIn token.

The A2UI "Image" component for displaying an image from a URL.

Resizing behavior for an Image within its container.

Size and style variant for an Image.

The A2UI "List" component for displaying a scrollable list of components.

Alignment of children along the cross axis of a List.

Layout direction of the items in a List.

The A2UI "Modal" component for displaying a dialog window.

The A2UI "Row" component for displaying content in a horizontal layout.

Alignment of children along the cross axis of a Row.

Arrangement of children along the main axis of a Row.

The A2UI "Slider" component for selecting a numeric value within a range.

The A2UI "Tabs" component for displaying a set of tabs.

A resolved tab within a Tabs component.

The A2UI "Text" component for displaying text.

Typography style variant for a Text.

The A2UI "TextField" component for user text input.

Input style variant for a TextField.

The A2UI "Video" component for displaying a video from a URL.

Constants

const String

The catalog ID for the A2UI Basic Catalog V1.

Public companion properties

A2uiSchema

The standard theme schema for the A2UI Basic Catalog V1.

StaticA2uiProperty<Number>

The relative weight property for A2uiBasicCatalogV1 components.

Public constructors

A2uiBasicCatalogV1(
    text: A2uiBasicCatalogV1.Text,
    image: A2uiBasicCatalogV1.Image,
    icon: A2uiBasicCatalogV1.Icon,
    video: A2uiBasicCatalogV1.Video,
    audioPlayer: A2uiBasicCatalogV1.AudioPlayer,
    row: A2uiBasicCatalogV1.Row,
    column: A2uiBasicCatalogV1.Column,
    list: A2uiBasicCatalogV1.List,
    card: A2uiBasicCatalogV1.Card,
    tabs: A2uiBasicCatalogV1.Tabs,
    modal: A2uiBasicCatalogV1.Modal,
    divider: A2uiBasicCatalogV1.Divider,
    button: A2uiBasicCatalogV1.Button,
    textField: A2uiBasicCatalogV1.TextField,
    checkBox: A2uiBasicCatalogV1.CheckBox,
    choicePicker: A2uiBasicCatalogV1.ChoicePicker,
    slider: A2uiBasicCatalogV1.Slider,
    dateTimeInput: A2uiBasicCatalogV1.DateTimeInput,
    functions: List<A2uiFunction>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

A2uiBasicCatalogV1.AudioPlayer

the AudioPlayer component implementation

A2uiBasicCatalogV1.Button

the Button component implementation

A2uiBasicCatalogV1.Card

the Card component implementation

String

The unique identifier for this catalog.

A2uiBasicCatalogV1.CheckBox

the CheckBox component implementation

A2uiBasicCatalogV1.ChoicePicker

the ChoicePicker component implementation

A2uiBasicCatalogV1.Column

the Column component implementation

List<A2uiComponent>

The list of A2uiComponents supported by this catalog.

A2uiBasicCatalogV1.DateTimeInput

the DateTimeInput component implementation

A2uiBasicCatalogV1.Divider

the Divider component implementation

List<A2uiFunction>

the list of A2uiFunctions supported by this catalog, recommended default is to create the function list using androidx.a2ui.model.catalog.basiccatalog.createBasicCatalogFunctions

A2uiBasicCatalogV1.Icon

the Icon component implementation

A2uiBasicCatalogV1.Image

the Image component implementation

A2uiBasicCatalogV1.List

the List component implementation

A2uiBasicCatalogV1.Modal

the Modal component implementation

A2uiBasicCatalogV1.Row

the Row component implementation

A2uiBasicCatalogV1.Slider

the Slider component implementation

A2uiBasicCatalogV1.Tabs

the Tabs component implementation

A2uiBasicCatalogV1.Text

the Text component implementation

A2uiBasicCatalogV1.TextField

the TextField component implementation

A2uiSchema

The A2uiSchema defining the dynamic theme schema for this catalog.

A2uiBasicCatalogV1.Video

the Video component implementation

Extension functions

A2uiCatalog

Converts this basic catalog into an A2uiCatalog holding the catalog definitions.

Constants

CatalogId

const val CatalogIdString

The catalog ID for the A2UI Basic Catalog V1.

Public companion properties

ThemeSchema

Added in 1.0.0-alpha01
val ThemeSchemaA2uiSchema

The standard theme schema for the A2UI Basic Catalog V1.

WeightProperty

Added in 1.0.0-alpha01
val WeightPropertyStaticA2uiProperty<Number>

The relative weight property for A2uiBasicCatalogV1 components.

Defined at the catalog level because it is supported across all A2uiBasicCatalogV1 components rather than belonging to a single component type.

Expected usage:

  • Components: Included in the A2uiComponent.properties list of all basic catalog components.

  • Parent components: Container components (such as Row and Column) access this property from child component properties to apply layout weights to their direct children.

Public constructors

A2uiBasicCatalogV1

A2uiBasicCatalogV1(
    text: A2uiBasicCatalogV1.Text,
    image: A2uiBasicCatalogV1.Image,
    icon: A2uiBasicCatalogV1.Icon,
    video: A2uiBasicCatalogV1.Video,
    audioPlayer: A2uiBasicCatalogV1.AudioPlayer,
    row: A2uiBasicCatalogV1.Row,
    column: A2uiBasicCatalogV1.Column,
    list: A2uiBasicCatalogV1.List,
    card: A2uiBasicCatalogV1.Card,
    tabs: A2uiBasicCatalogV1.Tabs,
    modal: A2uiBasicCatalogV1.Modal,
    divider: A2uiBasicCatalogV1.Divider,
    button: A2uiBasicCatalogV1.Button,
    textField: A2uiBasicCatalogV1.TextField,
    checkBox: A2uiBasicCatalogV1.CheckBox,
    choicePicker: A2uiBasicCatalogV1.ChoicePicker,
    slider: A2uiBasicCatalogV1.Slider,
    dateTimeInput: A2uiBasicCatalogV1.DateTimeInput,
    functions: List<A2uiFunction>
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

audioPlayer

Added in 1.0.0-alpha01
val audioPlayerA2uiBasicCatalogV1.AudioPlayer

the AudioPlayer component implementation

button

Added in 1.0.0-alpha01
val buttonA2uiBasicCatalogV1.Button

the Button component implementation

card

Added in 1.0.0-alpha01
val cardA2uiBasicCatalogV1.Card

the Card component implementation

catalogId

Added in 1.0.0-alpha01
val catalogIdString

The unique identifier for this catalog.

checkBox

Added in 1.0.0-alpha01
val checkBoxA2uiBasicCatalogV1.CheckBox

the CheckBox component implementation

choicePicker

Added in 1.0.0-alpha01
val choicePickerA2uiBasicCatalogV1.ChoicePicker

the ChoicePicker component implementation

column

Added in 1.0.0-alpha01
val columnA2uiBasicCatalogV1.Column

the Column component implementation

components

Added in 1.0.0-alpha01
val componentsList<A2uiComponent>

The list of A2uiComponents supported by this catalog.

dateTimeInput

Added in 1.0.0-alpha01
val dateTimeInputA2uiBasicCatalogV1.DateTimeInput

the DateTimeInput component implementation

divider

Added in 1.0.0-alpha01
val dividerA2uiBasicCatalogV1.Divider

the Divider component implementation

functions

Added in 1.0.0-alpha01
val functionsList<A2uiFunction>

the list of A2uiFunctions supported by this catalog, recommended default is to create the function list using androidx.a2ui.model.catalog.basiccatalog.createBasicCatalogFunctions

icon

Added in 1.0.0-alpha01
val iconA2uiBasicCatalogV1.Icon

the Icon component implementation

image

Added in 1.0.0-alpha01
val imageA2uiBasicCatalogV1.Image

the Image component implementation

list

Added in 1.0.0-alpha01
val listA2uiBasicCatalogV1.List

the List component implementation

modal

Added in 1.0.0-alpha01
val modalA2uiBasicCatalogV1.Modal

the Modal component implementation

row

Added in 1.0.0-alpha01
val rowA2uiBasicCatalogV1.Row

the Row component implementation

slider

Added in 1.0.0-alpha01
val sliderA2uiBasicCatalogV1.Slider

the Slider component implementation

tabs

Added in 1.0.0-alpha01
val tabsA2uiBasicCatalogV1.Tabs

the Tabs component implementation

text

Added in 1.0.0-alpha01
val textA2uiBasicCatalogV1.Text

the Text component implementation

textField

Added in 1.0.0-alpha01
val textFieldA2uiBasicCatalogV1.TextField

the TextField component implementation

themeSchema

Added in 1.0.0-alpha01
val themeSchemaA2uiSchema

The A2uiSchema defining the dynamic theme schema for this catalog.

video

Added in 1.0.0-alpha01
val videoA2uiBasicCatalogV1.Video

the Video component implementation

Extension functions

A2uiBasicCatalogV1.toA2uiCatalog

fun A2uiBasicCatalogV1.toA2uiCatalog(isInline: Boolean = false): A2uiCatalog

Converts this basic catalog into an A2uiCatalog holding the catalog definitions.

Parameters
isInline: Boolean = false

whether this catalog's schema should be serialized inline as part of the capabilities advertisement sent to the agent

Returns
A2uiCatalog

a fully initialized A2uiCatalog