# A2uiObjectSchema

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

*** ** * ** ***


```
class A2uiObjectSchema : A2uiSchema
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema) ||
|   | ↳ | [androidx.a2ui.model.schema.A2uiObjectSchema](https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema) |

*** ** * ** ***

Schema representing an object with nested properties. Use this to define the top-level property structure of a component or a nested object argument.

## Summary

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#INSTANCE()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#A2uiObjectSchema(kotlin.collections.Map,kotlin.collections.Set,kotlin.Boolean,androidx.a2ui.model.schema.A2uiSchema,kotlin.String,kotlin.collections.List)( properties: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema>, required: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>, isAdditionalPropertiesAllowed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, additionalPropertiesSchema: https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema?, description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, keywords: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchemaKeyword<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>>> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#hashCode()()` |
| `open https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#toJsonElement()()` Returns the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema?` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#additionalPropertiesSchema()` schema definition for additional dynamic properties. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#description()` semantic description of the schema |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#isAdditionalPropertiesAllowed()` true if properties not defined in `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#properties()` are allowed |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchemaKeyword<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>>>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#keywords()` JSON Schema keywords applied to this schema node |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#properties()` A map of property names to their respective A2uiBaseSchema definitions. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#required()` A set of property names that must be present in any object implementing this schema. |

### Inherited functions

From [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiSchema#toJsonSchema()()`

Serializes this schema to a JSON Schema string representation.

## Public companion properties

### INSTANCE

```
val INSTANCE: A2uiObjectSchema
```

## Public constructors

### A2uiObjectSchema

```
A2uiObjectSchema(
    properties: Map<String, A2uiSchema> = emptyMap(),
    required: Set<String> = emptySet(),
    isAdditionalPropertiesAllowed: Boolean = true,
    additionalPropertiesSchema: A2uiSchema? = null,
    description: String? = null,
    keywords: List<A2uiSchemaKeyword<Map<String, Any>>> = emptyList()
)
```

## Public functions

### equals

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

### hashCode

```
open fun hashCode(): Int
```

### toJsonElement

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

```
open fun toJsonElement(): JsonElement
```

Returns the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema.

| Returns |
|---|---|
| `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema |

### toString

```
open fun toString(): String
```

## Public properties

### additionalPropertiesSchema

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

```
val additionalPropertiesSchema: A2uiSchema?
```

schema definition for additional dynamic properties. Only applicable if `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#isAdditionalPropertiesAllowed()` is true.

### description

```
open val description: String?
```

semantic description of the schema

### isAdditionalPropertiesAllowed

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

```
val isAdditionalPropertiesAllowed: Boolean
```

true if properties not defined in `https://developer.android.com/reference/kotlin/androidx/a2ui/model/schema/A2uiObjectSchema#properties()` are allowed

### keywords

```
open val keywords: List<A2uiSchemaKeyword<Map<String, Any>>>
```

JSON Schema keywords applied to this schema node

### properties

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

```
val properties: Map<String, A2uiSchema>
```

A map of property names to their respective A2uiBaseSchema definitions.

### required

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

```
val required: Set<String>
```

A set of property names that must be present in any object implementing this schema.