A2uiObjectSchema


public final class A2uiObjectSchema extends A2uiSchema


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 @NonNull A2uiObjectSchema

Public constructors

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

boolean
equals(Object other)
final A2uiSchema

schema definition for additional dynamic properties.

String

semantic description of the schema

@NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Map<@NonNull String, @NonNull Object>>>

JSON Schema keywords applied to this schema node

final @NonNull Map<@NonNull String, @NonNull A2uiSchema>

A map of property names to their respective A2uiBaseSchema definitions.

final @NonNull Set<@NonNull String>

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

int
final boolean

true if properties not defined in properties are allowed

@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 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-alpha01
public final A2uiSchema getAdditionalPropertiesSchema()

schema definition for additional dynamic properties. Only applicable if 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-alpha01
public final @NonNull Map<@NonNull String, @NonNull A2uiSchemagetProperties()

A map of property names to their respective A2uiBaseSchema definitions.

getRequired

Added in 1.0.0-alpha01
public final @NonNull Set<@NonNull StringgetRequired()

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-alpha01
public final boolean isAdditionalPropertiesAllowed()

true if properties not defined in properties are allowed

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