sealed class A2uiProperty<T : Any?>

Known direct subclasses
ChildListA2uiProperty

A property representing a structural list of child components.

DynamicA2uiProperty

A property that supports dynamic data-binding and requires reactive evaluation.

StaticA2uiProperty

A static configuration or structural property that should be read synchronously.


A typed declaration of a property expected by an A2UI component.

A2uiProperty serves two primary purposes:

  1. Schema Generation: It automatically constructs the underlying A2uiSchema used to communicate the component's structural requirements to the agent.

  2. Typed Resolution: It acts as a token utilized by A2uiComponentProperties and A2uiComponentScope to safely extract, type-cast, and optionally evaluate dynamic bindings from incoming protocol payloads at runtime.

Properties are divided into specific subtypes based on their runtime evaluation behavior:

The property subtypes listed above are used in the APIs provided by A2uiComponentScope to ensure that only the allowed property types are used with each of the relevant APIs.

Parameters
<T : Any?>

The expected type of the resolved property value at runtime.

Summary

Public companion functions

StaticA2uiProperty<Map<StringAny?>>
action(key: String, required: Boolean, description: String?)

Creates a static property describing an action to be executed when interacting with the component.

StaticA2uiProperty<Any>
any(key: String, required: Boolean, description: String?)

Creates a static property accepting an arbitrary payload without strict type enforcement.

StaticA2uiProperty<List<Any>>
anyList(
    key: String,
    required: Boolean,
    description: String?,
    minItems: @IntRange(from = 0) Int,
    maxItems: @IntRange(from = 0) Int
)

Creates a static property expecting a list of any values.

StaticA2uiProperty<Boolean>
boolean(key: String, required: Boolean, description: String?)

Creates a static property expecting a literal boolean value.

StaticA2uiProperty<List<Boolean>>
booleanList(
    key: String,
    required: Boolean,
    description: String?,
    minItems: @IntRange(from = 0) Int,
    maxItems: @IntRange(from = 0) Int
)

Creates a static property expecting a list of booleans.

StaticA2uiProperty<Boolean>
booleanWithDefault(key: String, defaultValue: Boolean, description: String?)

Creates an optional static property expecting a literal boolean value with a default value.

ChildListA2uiProperty
childList(key: String, required: Boolean, description: String?)

Creates a property representing a structural list of child component references.

StaticA2uiProperty<String>
componentId(key: String, required: Boolean, description: String?)

Creates a static property storing the string ID of another component within the same surface.

StaticA2uiProperty<T>
<T : Any?> custom(
    key: String,
    schema: A2uiSchema,
    safeCast: (Any) -> T?,
    required: Boolean
)

Creates a static property with a custom schema and type-casting logic.

DynamicA2uiProperty<Boolean>
dynamicBoolean(key: String, required: Boolean, description: String?)

Creates a dynamic property representing a reactive data binding mapped to a Boolean.

DynamicA2uiProperty<T>
<T : Any?> dynamicCustom(
    key: String,
    schema: A2uiSchema,
    safeCast: (Any) -> T?,
    required: Boolean
)

Creates a dynamic property with a custom schema and type-casting logic.

DynamicA2uiProperty<Number>
dynamicNumber(key: String, required: Boolean, description: String?)

Creates a dynamic property representing a reactive data binding mapped to a Number.

DynamicA2uiProperty<String>
dynamicString(key: String, required: Boolean, description: String?)

Creates a dynamic property representing a reactive data binding mapped to a String.

DynamicA2uiProperty<List<String>>
dynamicStringList(key: String, required: Boolean, description: String?)

Creates a dynamic property representing a reactive data binding mapped to a List of Strings.

DynamicA2uiProperty<Any>
dynamicValue(key: String, required: Boolean, description: String?)

Creates a dynamic property representing a reactive data binding that can resolve to any type.

StaticA2uiProperty<T>
<T : Enum<T>> enum(
    key: String,
    enumValues: List<T>,
    mapToString: (T) -> String,
    convertFromString: (String) -> T?,
    defaultValue: T,
    description: String?
)

Creates an optional static property expecting an enum value strictly bounded to a predefined list of enum options with a default value.

StaticA2uiProperty<T>
<T : Enum<T>> enum(
    key: String,
    enumValues: List<T>,
    mapToString: (T) -> String,
    convertFromString: (String) -> T?,
    required: Boolean,
    description: String?
)

Creates a static property expecting an enum value strictly bounded to a predefined list of enum options with the ability to map values to custom types to support statically typed enums.

StaticA2uiProperty<A2uiComponentProperties>
nested(
    key: String,
    properties: List<A2uiProperty<*>>,
    required: Boolean,
    description: String?,
    isAdditionalPropertiesAllowed: Boolean,
    additionalPropertiesSchema: A2uiSchema?
)

Creates a static property representing a nested property object.

StaticA2uiProperty<List<A2uiComponentProperties>>
nestedList(
    key: String,
    properties: List<A2uiProperty<*>>,
    required: Boolean,
    description: String?,
    minItems: @IntRange(from = 0) Int,
    maxItems: @IntRange(from = 0) Int,
    isAdditionalPropertiesAllowed: Boolean,
    additionalPropertiesSchema: A2uiSchema?
)

Creates a static property representing an list of nested property objects.

StaticA2uiProperty<Number>
number(key: String, defaultValue: Double, description: String?)

Creates an optional static property expecting a literal numeric value with a double default value.

StaticA2uiProperty<Number>
number(key: String, defaultValue: Float, description: String?)

Creates an optional static property expecting a literal numeric value with a float default value.

StaticA2uiProperty<Number>
number(key: String, defaultValue: Int, description: String?)

Creates an optional static property expecting a literal numeric value with an integer default value.

StaticA2uiProperty<Number>
number(key: String, defaultValue: Long, description: String?)

Creates an optional static property expecting a literal numeric value with a long default value.

StaticA2uiProperty<Number>
number(key: String, required: Boolean, description: String?)

Creates a static property expecting a literal numeric value.

StaticA2uiProperty<Number>
numberEnum(
    key: String,
    enumValues: DoubleList,
    defaultValue: Double,
    description: String?
)

Creates an optional static property expecting a double value strictly bounded to a predefined list of options with a specified default value.

StaticA2uiProperty<Number>
numberEnum(
    key: String,
    enumValues: FloatList,
    defaultValue: Float,
    description: String?
)

Creates an optional static property expecting a float value strictly bounded to a predefined list of options with a specified default value.

StaticA2uiProperty<Number>
numberEnum(
    key: String,
    enumValues: IntList,
    defaultValue: Int,
    description: String?
)

Creates an optional static property expecting an integer value strictly bounded to a predefined list of options with a specified default value.

StaticA2uiProperty<Number>
numberEnum(
    key: String,
    enumValues: List<Number>,
    required: Boolean,
    description: String?
)

Creates a static property expecting a number value strictly bounded to a predefined list of options.

StaticA2uiProperty<Number>
numberEnum(
    key: String,
    enumValues: LongList,
    defaultValue: Long,
    description: String?
)

Creates an optional static property expecting a long value strictly bounded to a predefined list of options with a specified default value.

StaticA2uiProperty<List<Number>>
numberList(
    key: String,
    required: Boolean,
    description: String?,
    minItems: @IntRange(from = 0) Int,
    maxItems: @IntRange(from = 0) Int
)

Creates a static property expecting a list of numbers.

StaticA2uiProperty<String>
string(key: String, required: Boolean, description: String?)

Creates a static property expecting a literal string value.

StaticA2uiProperty<String>
stringEnum(
    key: String,
    enumValues: List<String>,
    defaultValue: String,
    description: String?
)

Creates an optional static property expecting a string value strictly bounded to a predefined list of options with a default value.

StaticA2uiProperty<String>
stringEnum(
    key: String,
    enumValues: List<String>,
    required: Boolean,
    description: String?
)

Creates a static property expecting a string value strictly bounded to a predefined list of options.

StaticA2uiProperty<List<String>>
stringList(
    key: String,
    required: Boolean,
    description: String?,
    minItems: @IntRange(from = 0) Int,
    maxItems: @IntRange(from = 0) Int
)

Creates a static property expecting a list of strings.

Protected constructors

<T : Any?> A2uiProperty()

Public properties

abstract Boolean

Indicates whether the agent is strictly required to provide this property.

abstract String

The key of the property as it appears in the A2UI protocol payload.

abstract A2uiSchema

The underlying A2uiSchema definition describing this property to the agent.

Public companion functions

action

Added in 1.0.0-alpha01
fun action(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<Map<StringAny?>>

Creates a static property describing an action to be executed when interacting with the component.

The payload dictates whether the action invokes a local UI function (e.g. openUrl) or queues an interaction event over the network to the server.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Map<StringAny?>>

A StaticA2uiProperty resolving to the action definition Map at runtime.

any

Added in 1.0.0-alpha01
fun any(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<Any>

Creates a static property accepting an arbitrary payload without strict type enforcement.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Any>

A StaticA2uiProperty resolving to Any (usually a Map, List, or primitive) at runtime.

anyList

Added in 1.0.0-alpha01
fun anyList(
    key: String,
    required: Boolean = false,
    description: String? = null,
    minItems: @IntRange(from = 0) Int = 0,
    maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE
): StaticA2uiProperty<List<Any>>

Creates a static property expecting a list of any values.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

minItems: @IntRange(from = 0) Int = 0

The minimum number of items required in the list, defaults to 0.

maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE

The maximum number of items allowed in the list, defaults to Int.MAX_VALUE meaning no constraint.

Returns
StaticA2uiProperty<List<Any>>

A StaticA2uiProperty that resolves to a List of Any at runtime.

boolean

Added in 1.0.0-alpha01
fun boolean(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<Boolean>

Creates a static property expecting a literal boolean value.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Boolean>

A StaticA2uiProperty that resolves to a Boolean at runtime.

booleanList

Added in 1.0.0-alpha01
fun booleanList(
    key: String,
    required: Boolean = false,
    description: String? = null,
    minItems: @IntRange(from = 0) Int = 0,
    maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE
): StaticA2uiProperty<List<Boolean>>

Creates a static property expecting a list of booleans.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

minItems: @IntRange(from = 0) Int = 0

The minimum number of items required in the list, defaults to 0.

maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE

The maximum number of items allowed in the list, defaults to Int.MAX_VALUE meaning no constraint.

Returns
StaticA2uiProperty<List<Boolean>>

A StaticA2uiProperty that resolves to a List of Boolean at runtime.

booleanWithDefault

Added in 1.0.0-alpha01
fun booleanWithDefault(
    key: String,
    defaultValue: Boolean,
    description: String? = null
): StaticA2uiProperty<Boolean>

Creates an optional static property expecting a literal boolean value with a default value.

Parameters
key: String

The key for this property.

defaultValue: Boolean

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Boolean>

A StaticA2uiProperty that resolves to a Boolean at runtime.

childList

Added in 1.0.0-alpha01
fun childList(key: String, required: Boolean = false, description: String? = null): ChildListA2uiProperty

Creates a property representing a structural list of child component references.

This signals to the agent that it can provide either:

  1. A static list of ComponentId string references.

  2. An object describing a dynamic data-bound template (e.g., {"path": "/users", "componentId": "user_card"}).

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
ChildListA2uiProperty

A ChildListA2uiProperty to be handled via A2uiComponentProperties.bindChildReferences().

componentId

Added in 1.0.0-alpha01
fun componentId(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<String>

Creates a static property storing the string ID of another component within the same surface.

Used to link container components to singular children (e.g. a Button's child).

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<String>

A StaticA2uiProperty resolving to the target component's ID as a String.

custom

Added in 1.0.0-alpha01
fun <T : Any?> custom(
    key: String,
    schema: A2uiSchema,
    safeCast: (Any) -> T?,
    required: Boolean = false
): StaticA2uiProperty<T>

Creates a static property with a custom schema and type-casting logic.

This allows defining a property that is constrained by a custom JSON schema (e.g., oneOf with specific literal schemas).

Parameters
key: String

The key for this property.

schema: A2uiSchema

The custom A2uiSchema defining this property's structural requirements.

safeCast: (Any) -> T?

A function to safely cast the raw payload into the expected type T.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

Returns
StaticA2uiProperty<T>

A StaticA2uiProperty that resolves to T at runtime.

dynamicBoolean

Added in 1.0.0-alpha01
fun dynamicBoolean(
    key: String,
    required: Boolean = false,
    description: String? = null
): DynamicA2uiProperty<Boolean>

Creates a dynamic property representing a reactive data binding mapped to a Boolean.

The resolved runtime value will safely attempt to coerce compliant Strings (e.g. "true") or Numbers (1 ->true, 0 ->false) into a Boolean.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
DynamicA2uiProperty<Boolean>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

dynamicCustom

Added in 1.0.0-alpha01
fun <T : Any?> dynamicCustom(
    key: String,
    schema: A2uiSchema,
    safeCast: (Any) -> T?,
    required: Boolean = false
): DynamicA2uiProperty<T>

Creates a dynamic property with a custom schema and type-casting logic.

This allows defining a property that is dynamically evaluated against the data model, but constrained by a custom JSON schema (e.g., oneOf with specific literal schemas).

Parameters
key: String

The key for this property.

schema: A2uiSchema

The custom A2uiSchema defining this property's structural requirements.

safeCast: (Any) -> T?

A function to safely cast the evaluated payload into the expected type T.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

Returns
DynamicA2uiProperty<T>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

dynamicNumber

Added in 1.0.0-alpha01
fun dynamicNumber(key: String, required: Boolean = false, description: String? = null): DynamicA2uiProperty<Number>

Creates a dynamic property representing a reactive data binding mapped to a Number.

The resolved runtime value will safely attempt to coerce compliant Strings (e.g. "42") or Booleans (true ->1) into a Number.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
DynamicA2uiProperty<Number>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

dynamicString

Added in 1.0.0-alpha01
fun dynamicString(key: String, required: Boolean = false, description: String? = null): DynamicA2uiProperty<String>

Creates a dynamic property representing a reactive data binding mapped to a String.

The resolved runtime value will automatically be safely coerced or stringified if the bound path points to non-string primitives or complex objects.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
DynamicA2uiProperty<String>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

dynamicStringList

Added in 1.0.0-alpha01
fun dynamicStringList(
    key: String,
    required: Boolean = false,
    description: String? = null
): DynamicA2uiProperty<List<String>>

Creates a dynamic property representing a reactive data binding mapped to a List of Strings.

The resolved runtime value must be a list. Its children will automatically be coerced or stringified into String values.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
DynamicA2uiProperty<List<String>>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

dynamicValue

Added in 1.0.0-alpha01
fun dynamicValue(key: String, required: Boolean = false, description: String? = null): DynamicA2uiProperty<Any>

Creates a dynamic property representing a reactive data binding that can resolve to any type.

The payload provided by the agent can be a literal value, a data-model JSON pointer (e.g., {"path": "/user"}), or a function call execution tree.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
DynamicA2uiProperty<Any>

A DynamicA2uiProperty evaluated dynamically against the surface's data model at runtime.

enum

fun <T : Enum<T>> enum(
    key: String,
    enumValues: List<T>,
    mapToString: (T) -> String,
    convertFromString: (String) -> T?,
    defaultValue: T,
    description: String? = null
): StaticA2uiProperty<T>

Creates an optional static property expecting an enum value strictly bounded to a predefined list of enum options with a default value.

Parameters
key: String

The key for this property.

enumValues: List<T>

A list of valid enum values the agent is allowed to supply for this property.

mapToString: (T) -> String

A mapping function to serialize an enum entry into its string schema value.

convertFromString: (String) -> T?

A parsing function to convert a raw string value into an enum entry.

defaultValue: T

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<T>

A StaticA2uiProperty that resolves to T at runtime.

enum

fun <T : Enum<T>> enum(
    key: String,
    enumValues: List<T>,
    mapToString: (T) -> String,
    convertFromString: (String) -> T?,
    required: Boolean = false,
    description: String? = null
): StaticA2uiProperty<T>

Creates a static property expecting an enum value strictly bounded to a predefined list of enum options with the ability to map values to custom types to support statically typed enums.

Parameters
key: String

The key for this property.

enumValues: List<T>

A list of valid enum values the agent is allowed to supply for this property.

mapToString: (T) -> String

A mapping function to serialize an enum entry into its string schema value.

convertFromString: (String) -> T?

A parsing function to convert a raw string value into an enum entry.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<T>

A StaticA2uiProperty that resolves to T at runtime.

nested

fun nested(
    key: String,
    properties: List<A2uiProperty<*>>,
    required: Boolean = false,
    description: String? = null,
    isAdditionalPropertiesAllowed: Boolean = true,
    additionalPropertiesSchema: A2uiSchema? = null
): StaticA2uiProperty<A2uiComponentProperties>

Creates a static property representing a nested property object.

Parameters
key: String

The key for this property.

properties: List<A2uiProperty<*>>

A list of typed properties defining the nested object.

required: Boolean = false

Whether the agent must provide this property.

description: String? = null

An optional string explaining this property's purpose.

isAdditionalPropertiesAllowed: Boolean = true

Whether properties not explicitly listed in properties are allowed, defaults to true.

additionalPropertiesSchema: A2uiSchema? = null

Schema definition for additional dynamic properties, only applicable if isAdditionalPropertiesAllowed is true.

nestedList

fun nestedList(
    key: String,
    properties: List<A2uiProperty<*>>,
    required: Boolean = false,
    description: String? = null,
    minItems: @IntRange(from = 0) Int = 0,
    maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE,
    isAdditionalPropertiesAllowed: Boolean = true,
    additionalPropertiesSchema: A2uiSchema? = null
): StaticA2uiProperty<List<A2uiComponentProperties>>

Creates a static property representing an list of nested property objects.

Parameters
key: String

The key for this property.

properties: List<A2uiProperty<*>>

A list of typed properties defining the structure of the list items.

required: Boolean = false

Whether the agent must provide this property.

description: String? = null

An optional string explaining this property's purpose.

minItems: @IntRange(from = 0) Int = 0

The minimum number of items required in the list, defaults to 0.

maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE

The maximum number of items allowed in the list, defaults to Int.MAX_VALUE meaning no constraint.

isAdditionalPropertiesAllowed: Boolean = true

Whether properties not explicitly listed in properties are allowed, defaults to true.

additionalPropertiesSchema: A2uiSchema? = null

Schema definition for additional dynamic properties, only applicable if isAdditionalPropertiesAllowed is true.

number

Added in 1.0.0-alpha01
fun number(key: String, defaultValue: Double, description: String? = null): StaticA2uiProperty<Number>

Creates an optional static property expecting a literal numeric value with a double default value.

Parameters
key: String

The key for this property.

defaultValue: Double

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

number

Added in 1.0.0-alpha01
fun number(key: String, defaultValue: Float, description: String? = null): StaticA2uiProperty<Number>

Creates an optional static property expecting a literal numeric value with a float default value.

Parameters
key: String

The key for this property.

defaultValue: Float

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

number

Added in 1.0.0-alpha01
fun number(key: String, defaultValue: Int, description: String? = null): StaticA2uiProperty<Number>

Creates an optional static property expecting a literal numeric value with an integer default value.

Parameters
key: String

The key for this property.

defaultValue: Int

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

number

Added in 1.0.0-alpha01
fun number(key: String, defaultValue: Long, description: String? = null): StaticA2uiProperty<Number>

Creates an optional static property expecting a literal numeric value with a long default value.

Parameters
key: String

The key for this property.

defaultValue: Long

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

number

Added in 1.0.0-alpha01
fun number(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<Number>

Creates a static property expecting a literal numeric value.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberEnum

Added in 1.0.0-alpha01
fun numberEnum(
    key: String,
    enumValues: DoubleList,
    defaultValue: Double,
    description: String? = null
): StaticA2uiProperty<Number>

Creates an optional static property expecting a double value strictly bounded to a predefined list of options with a specified default value.

Parameters
key: String

The key for this property.

enumValues: DoubleList

A list of valid double values the agent is allowed to supply for this property.

defaultValue: Double

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberEnum

Added in 1.0.0-alpha01
fun numberEnum(
    key: String,
    enumValues: FloatList,
    defaultValue: Float,
    description: String? = null
): StaticA2uiProperty<Number>

Creates an optional static property expecting a float value strictly bounded to a predefined list of options with a specified default value.

Parameters
key: String

The key for this property.

enumValues: FloatList

A list of valid float values the agent is allowed to supply for this property.

defaultValue: Float

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberEnum

Added in 1.0.0-alpha01
fun numberEnum(
    key: String,
    enumValues: IntList,
    defaultValue: Int,
    description: String? = null
): StaticA2uiProperty<Number>

Creates an optional static property expecting an integer value strictly bounded to a predefined list of options with a specified default value.

Parameters
key: String

The key for this property.

enumValues: IntList

A list of valid integer values the agent is allowed to supply for this property.

defaultValue: Int

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberEnum

fun numberEnum(
    key: String,
    enumValues: List<Number>,
    required: Boolean = false,
    description: String? = null
): StaticA2uiProperty<Number>

Creates a static property expecting a number value strictly bounded to a predefined list of options.

Parameters
key: String

The key for this property.

enumValues: List<Number>

A list of valid number values the agent is allowed to supply for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberEnum

Added in 1.0.0-alpha01
fun numberEnum(
    key: String,
    enumValues: LongList,
    defaultValue: Long,
    description: String? = null
): StaticA2uiProperty<Number>

Creates an optional static property expecting a long value strictly bounded to a predefined list of options with a specified default value.

Parameters
key: String

The key for this property.

enumValues: LongList

A list of valid long values the agent is allowed to supply for this property.

defaultValue: Long

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<Number>

A StaticA2uiProperty that resolves to a Number at runtime.

numberList

Added in 1.0.0-alpha01
fun numberList(
    key: String,
    required: Boolean = false,
    description: String? = null,
    minItems: @IntRange(from = 0) Int = 0,
    maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE
): StaticA2uiProperty<List<Number>>

Creates a static property expecting a list of numbers.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

minItems: @IntRange(from = 0) Int = 0

The minimum number of items required in the list, defaults to 0.

maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE

The maximum number of items allowed in the list, defaults to Int.MAX_VALUE meaning no constraint.

Returns
StaticA2uiProperty<List<Number>>

A StaticA2uiProperty that resolves to a List of Number at runtime.

string

Added in 1.0.0-alpha01
fun string(key: String, required: Boolean = false, description: String? = null): StaticA2uiProperty<String>

Creates a static property expecting a literal string value.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<String>

A StaticA2uiProperty that resolves to a String at runtime.

stringEnum

Added in 1.0.0-alpha01
fun stringEnum(
    key: String,
    enumValues: List<String>,
    defaultValue: String,
    description: String? = null
): StaticA2uiProperty<String>

Creates an optional static property expecting a string value strictly bounded to a predefined list of options with a default value.

Parameters
key: String

The key for this property.

enumValues: List<String>

A list of valid string values the agent is allowed to supply for this property.

defaultValue: String

The default value for this property.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<String>

A StaticA2uiProperty that resolves to a String at runtime.

stringEnum

Added in 1.0.0-alpha01
fun stringEnum(
    key: String,
    enumValues: List<String>,
    required: Boolean = false,
    description: String? = null
): StaticA2uiProperty<String>

Creates a static property expecting a string value strictly bounded to a predefined list of options.

Parameters
key: String

The key for this property.

enumValues: List<String>

A list of valid string values the agent is allowed to supply for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

Returns
StaticA2uiProperty<String>

A StaticA2uiProperty that resolves to a String at runtime.

stringList

Added in 1.0.0-alpha01
fun stringList(
    key: String,
    required: Boolean = false,
    description: String? = null,
    minItems: @IntRange(from = 0) Int = 0,
    maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE
): StaticA2uiProperty<List<String>>

Creates a static property expecting a list of strings.

Parameters
key: String

The key for this property.

required: Boolean = false

Whether the agent must provide this property to successfully render the component.

description: String? = null

An optional string explaining this property's purpose to the agent.

minItems: @IntRange(from = 0) Int = 0

The minimum number of items required in the list, defaults to 0.

maxItems: @IntRange(from = 0) Int = Int.MAX_VALUE

The maximum number of items allowed in the list, defaults to Int.MAX_VALUE meaning no constraint.

Returns
StaticA2uiProperty<List<String>>

A StaticA2uiProperty that resolves to a List of String at runtime.

Protected constructors

A2uiProperty

protected <T : Any?> A2uiProperty()
Parameters
<T : Any?>

The expected type of the resolved property value at runtime.

Public properties

isRequired

Added in 1.0.0-alpha01
abstract val isRequiredBoolean

Indicates whether the agent is strictly required to provide this property.

key

Added in 1.0.0-alpha01
abstract val keyString

The key of the property as it appears in the A2UI protocol payload.

schema

Added in 1.0.0-alpha01
abstract val schemaA2uiSchema

The underlying A2uiSchema definition describing this property to the agent.