A2uiArraySchema


public final class A2uiArraySchema extends A2uiSchema


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

Summary

Public fields

static final @NonNull A2uiArraySchema

Public constructors

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

Public methods

boolean
equals(Object other)
String

semantic description of the schema

final A2uiSchema

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

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

JSON Schema keywords applied to this schema node

final int

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

final int

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

int
@NonNull JsonElement

Returns the JsonElement hierarchy representing this schema.

@NonNull String

Inherited methods

From androidx.a2ui.model.schema.A2uiSchema
final @NonNull String

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-alpha01
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-alpha01
public final int getMaxItems()

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

getMinItems

Added in 1.0.0-alpha01
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-alpha01
public @NonNull JsonElement toJsonElement()

Returns the JsonElement hierarchy representing this schema.

Returns
@NonNull JsonElement

the JsonElement hierarchy representing this schema

toString

public @NonNull String toString()