A2uiCompositeSchema


public abstract class A2uiCompositeSchema extends A2uiSchema

Known direct subclasses
A2uiAccessibilityAttributesSchema

Holds accessibility properties for assistive technologies.

A2uiActionSchema

Standard interactions that dispatch events or call client functions.

A2uiCheckRuleSchema

Validates input components.

A2uiCheckableSchema

Enables client-side check validations.

A2uiChildListSchema

Specifies child component identifiers.

A2uiComponentCommonSchema

Defines shared attributes for all components.

A2uiComponentIdSchema

Represents unique identifiers for components within a surface.

A2uiDataBindingSchema

Points to values within the data model.

A2uiDynamicBooleanSchema

Represents boolean values from literals, data bindings, or function calls.

A2uiDynamicNumberSchema

Represents number values from literals, data bindings, or function calls.

A2uiDynamicStringListSchema

Represents string lists from literals, data bindings, or function calls.

A2uiDynamicStringSchema

Represents string values from literals, data bindings, or function calls.

A2uiDynamicValueSchema

Represents values from literals, data bindings, or function calls.

A2uiFunctionCallSchema

Configures client function invocations.


Schema node that is defined by using other schema nodes.

Subclasses of this abstract class define a schema using A2uiSchema components returned by getDefinition. Supports reusable definitions in the $defs section of the generated JSON Schema when definitionName is specified.

Summary

Public constructors

Public methods

boolean
equals(Object other)
abstract @NonNull A2uiSchema

Returns the underlying schema definition.

String

Name of this schema within the $defs section of the generated JSON Schema.

@NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Object>>

List of JSON Schema keywords applied to this schema node.

String

Root schema ID used to reference this sub-schema.

int
@NonNull JsonElement

Serializes this schema to a JSON Schema string representation.

Inherited methods

From androidx.a2ui.model.schema.A2uiSchema
abstract String

Semantic description of the schema.

final @NonNull String

Serializes this schema to a JSON Schema string representation.

Public constructors

A2uiCompositeSchema

Added in 1.0.0-alpha01
public A2uiCompositeSchema()

Public methods

equals

public boolean equals(Object other)

getDefinition

Added in 1.0.0-alpha01
public abstract @NonNull A2uiSchema getDefinition()

Returns the underlying schema definition.

Concrete subclasses must implement this to return the actual schema details that this schema wraps.

Returns
@NonNull A2uiSchema

the underlying schema definition

getDefinitionName

Added in 1.0.0-alpha01
public String getDefinitionName()

Name of this schema within the $defs section of the generated JSON Schema.

If non-null, nested references to this schema will generate a $ref pointing to this definition name instead of inlining the full schema. Use this to avoid duplicating complex schemas in components.

getKeywords

public @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Object>> getKeywords()

List of JSON Schema keywords applied to this schema node.

getSchemaId

Added in 1.0.0-alpha01
public String getSchemaId()

Root schema ID used to reference this sub-schema.

Non-null values prepend this ID to the $ref path when serializing this schema.

  • Format when non-null: "$schemaId#/$defs/$definitionName"

  • Format when null: "#/$defs/$definitionName"

Note: This has no effect if definitionName is null.

hashCode

public int hashCode()

toJsonElement

Added in 1.0.0-alpha01
public @NonNull JsonElement toJsonElement()

Serializes this schema to a JSON Schema string representation.

If definitionName is non-null, this generates a $ref schema pointing to the definition instead of the full schema. Otherwise, it delegates to getDefinitionJsonSchema.

Returns
@NonNull JsonElement

the serialized JSON Schema string