A2uiObjectSchema


class A2uiObjectSchema : 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 companion properties

A2uiObjectSchema

Public constructors

A2uiObjectSchema(
    properties: Map<StringA2uiSchema>,
    required: Set<String>,
    isAdditionalPropertiesAllowed: Boolean,
    additionalPropertiesSchema: A2uiSchema?,
    description: String?,
    keywords: List<A2uiSchemaKeyword<Map<StringAny>>>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open JsonElement

Returns the JsonElement hierarchy representing this schema.

open String

Public properties

A2uiSchema?

schema definition for additional dynamic properties.

open String?

semantic description of the schema

Boolean

true if properties not defined in properties are allowed

open List<A2uiSchemaKeyword<Map<StringAny>>>

JSON Schema keywords applied to this schema node

Map<StringA2uiSchema>

A map of property names to their respective A2uiBaseSchema definitions.

Set<String>

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

Inherited functions

From androidx.a2ui.model.schema.A2uiSchema
String

Serializes this schema to a JSON Schema string representation.

Public companion properties

INSTANCE

val INSTANCEA2uiObjectSchema

Public constructors

A2uiObjectSchema

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

Public functions

equals

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

hashCode

open fun hashCode(): Int

toJsonElement

Added in 1.0.0-alpha01
open fun toJsonElement(): JsonElement

Returns the JsonElement hierarchy representing this schema.

Returns
JsonElement

the JsonElement hierarchy representing this schema

toString

open fun toString(): String

Public properties

additionalPropertiesSchema

Added in 1.0.0-alpha01
val additionalPropertiesSchemaA2uiSchema?

schema definition for additional dynamic properties. Only applicable if isAdditionalPropertiesAllowed is true.

description

open val descriptionString?

semantic description of the schema

isAdditionalPropertiesAllowed

Added in 1.0.0-alpha01
val isAdditionalPropertiesAllowedBoolean

true if properties not defined in properties are allowed

keywords

open val keywordsList<A2uiSchemaKeyword<Map<StringAny>>>

JSON Schema keywords applied to this schema node

properties

Added in 1.0.0-alpha01
val propertiesMap<StringA2uiSchema>

A map of property names to their respective A2uiBaseSchema definitions.

required

Added in 1.0.0-alpha01
val requiredSet<String>

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