# 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)

*** ** * ** ***


```
public final class A2uiObjectSchema 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.A2uiObjectSchema](https://developer.android.com/reference/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 fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#INSTANCE()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#A2uiObjectSchema(kotlin.collections.Map,kotlin.collections.Set,kotlin.Boolean,androidx.a2ui.model.schema.A2uiSchema,kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema> properties, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> required, boolean isAdditionalPropertiesAllowed, https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema additionalPropertiesSchema, https://developer.android.com/reference/java/lang/String.html description, @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/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html>>> keywords )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#getAdditionalPropertiesSchema()()` schema definition for additional dynamic properties. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#getDescription()()` semantic description of the 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/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @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/A2uiObjectSchema#getKeywords()()` JSON Schema keywords applied to this schema node |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @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/A2uiObjectSchema#getProperties()()` A map of property names to their respective A2uiBaseSchema definitions. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@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/A2uiObjectSchema#getRequired()()` A set of property names that must be present in any object implementing this schema. |
| `int` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#isAdditionalPropertiesAllowed()()` true if properties not defined in `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiObjectSchema#properties()` are allowed |
| `@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/A2uiObjectSchema#toJsonElement()()` Returns the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema. |
| `@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/A2uiObjectSchema#toString()()` |

### Inherited methods

From [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema) `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 fields

### INSTANCE

```
public static final @NonNull A2uiObjectSchema INSTANCE
```

## Public constructors

### A2uiObjectSchema

```
public A2uiObjectSchema(
    @NonNull Map<@NonNull String, @NonNull A2uiSchema> properties,
    @NonNull Set<@NonNull String> required,
    boolean isAdditionalPropertiesAllowed,
    A2uiSchema additionalPropertiesSchema,
    String description,
    @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Map<@NonNull String, @NonNull Object>>> keywords
)
```

## Public methods

### equals

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

### getAdditionalPropertiesSchema

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

```
public final A2uiSchema getAdditionalPropertiesSchema()
```

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

### getDescription

```
public String getDescription()
```

semantic description of the schema

### getKeywords

```
public @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Map<@NonNull String, @NonNull Object>>> getKeywords()
```

JSON Schema keywords applied to this schema node

### getProperties

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

```
public final @NonNull Map<@NonNull String, @NonNull A2uiSchema> getProperties()
```

A map of property names to their respective A2uiBaseSchema definitions.

### getRequired

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

```
public final @NonNull Set<@NonNull String> getRequired()
```

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

### hashCode

```
public int hashCode()
```

### isAdditionalPropertiesAllowed

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

```
public final boolean isAdditionalPropertiesAllowed()
```

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

### toJsonElement

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

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

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

| 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 `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema |

### toString

```
public @NonNull String toString()
```