# A2uiCompositeSchema

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

*** ** * ** ***


```
public abstract class A2uiCompositeSchema extends A2uiSchema
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema) ||
|   | ↳ | [androidx.a2ui.model.schema.A2uiCompositeSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema) |

Known direct subclasses [A2uiAccessibilityAttributesSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiAccessibilityAttributesSchema), [A2uiActionSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiActionSchema), [A2uiCheckRuleSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiCheckRuleSchema), [A2uiCheckableSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiCheckableSchema), [A2uiChildListSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiChildListSchema), [A2uiComponentCommonSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiComponentCommonSchema), [A2uiComponentIdSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiComponentIdSchema), [A2uiDataBindingSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDataBindingSchema), [A2uiDynamicBooleanSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicBooleanSchema), [A2uiDynamicNumberSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicNumberSchema), [A2uiDynamicStringListSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicStringListSchema), [A2uiDynamicStringSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicStringSchema), [A2uiDynamicValueSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicValueSchema), [A2uiFunctionCallSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiFunctionCallSchema)

|---|---|
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiAccessibilityAttributesSchema` | Holds accessibility properties for assistive technologies. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiActionSchema` | Standard interactions that dispatch events or call client functions. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiCheckRuleSchema` | Validates input components. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiCheckableSchema` | Enables client-side check validations. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiChildListSchema` | Specifies child component identifiers. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiComponentCommonSchema` | Defines shared attributes for all components. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiComponentIdSchema` | Represents unique identifiers for components within a surface. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDataBindingSchema` | Points to values within the data model. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicBooleanSchema` | Represents boolean values from literals, data bindings, or function calls. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicNumberSchema` | Represents number values from literals, data bindings, or function calls. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicStringListSchema` | Represents string lists from literals, data bindings, or function calls. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicStringSchema` | Represents string values from literals, data bindings, or function calls. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiDynamicValueSchema` | Represents values from literals, data bindings, or function calls. |
| `https://developer.android.com/reference/androidx/a2ui/model/schema/commontypes/A2uiFunctionCallSchema` | Configures client function invocations. |

*** ** * ** ***

Schema node that is defined by using other schema nodes.

Subclasses of this abstract class define a schema using `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` components returned by `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#getDefinition()`. Supports reusable definitions in the `$defs` section of the generated JSON Schema when `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#definitionName()` is specified.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#A2uiCompositeSchema()()` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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/model/schema/A2uiCompositeSchema#getDefinition()()` Returns the underlying schema definition. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#getDefinitionName()()` Name of this schema within the `$defs` section of the generated JSON Schema. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchemaKeyword<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html>>` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#getKeywords()()` List of JSON Schema keywords applied to this schema node. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#getSchemaId()()` Root schema ID used to reference this sub-schema. |
| `int` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#toJsonElement()()` Serializes this schema to a JSON Schema string representation. |

### Inherited methods

From [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema) `abstract https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema#getDescription()()`

Semantic description of the schema.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema#toJsonSchema()()`

Serializes this schema to a JSON Schema string representation.

## Public constructors

### A2uiCompositeSchema

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

```
public A2uiCompositeSchema()
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getDefinition

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

```
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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | the underlying schema definition |

### getDefinitionName

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

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

```
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 `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#definitionName()` is null.

### hashCode

```
public int hashCode()
```

### toJsonElement

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

```
public @NonNull JsonElement toJsonElement()
```

Serializes this schema to a JSON Schema string representation.

If `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#definitionName()` is non-null, this generates a `$ref` schema pointing to the definition instead of the full schema. Otherwise, it delegates to `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiCompositeSchema#getDefinitionJsonSchema()`.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | the serialized JSON Schema string |