# A2uiArraySchema

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

*** ** * ** ***


```
public final class A2uiArraySchema 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.A2uiArraySchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema) |

*** ** * ** ***

Schema representing an array where all items conform to a specific schema.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#INSTANCE()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#A2uiArraySchema(androidx.a2ui.model.schema.A2uiSchema,kotlin.String,kotlin.Int,kotlin.Int,kotlin.collections.List)( https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema items, https://developer.android.com/reference/java/lang/String.html description, int minItems, int maxItems, @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/List.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/A2uiArraySchema#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#getDescription()()` semantic description of the schema |
| `final https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#getItems()()` schema that every element in this array must conform to, or null if any schema is allowed. |
| `@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/List.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/A2uiArraySchema#getKeywords()()` JSON Schema keywords applied to this schema node |
| `final int` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#getMaxItems()()` maximum number of items allowed in the array (unconstrained if -1) |
| `final int` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#getMinItems()()` minimum number of items required in the array (unconstrained if -1) |
| `int` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiArraySchema#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/A2uiArraySchema#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/A2uiArraySchema#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 A2uiArraySchema INSTANCE
```

## Public constructors

### A2uiArraySchema

```
public A2uiArraySchema(
    A2uiSchema items,
    String description,
    int minItems,
    int maxItems,
    @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull List<@NonNull Object>>> keywords
)
```

## Public methods

### equals

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

### getDescription

```
public String getDescription()
```

semantic description of the schema

### getItems

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

```
public final A2uiSchema getItems()
```

schema that every element in this array must conform to, or null if any schema is allowed.

### getKeywords

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

JSON Schema keywords applied to this schema node

### getMaxItems

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

```
public final int getMaxItems()
```

maximum number of items allowed in the array (unconstrained if -1)

### getMinItems

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

```
public final int getMinItems()
```

minimum number of items required in the array (unconstrained if -1)

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

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()
```