A2uiAnySchema


public final class A2uiAnySchema extends A2uiSchema


Schema representing an unstructured JSON payload or a keyword-only schema.

Summary

Public fields

static final @NonNull A2uiAnySchema

Public constructors

A2uiAnySchema(
    String description,
    @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Object>> keywords
)

Public methods

String

semantic description of the schema

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

JSON Schema keywords applied to this schema node

@NonNull JsonElement

Returns the JsonElement hierarchy representing this schema.

@NonNull String

Inherited methods

From androidx.a2ui.model.schema.A2uiSchema
boolean
equals(Object other)
int
final @NonNull String

Serializes this schema to a JSON Schema string representation.

Public fields

INSTANCE

public static final @NonNull A2uiAnySchema INSTANCE

Public constructors

A2uiAnySchema

public A2uiAnySchema(
    String description,
    @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull Object>> keywords
)

Public methods

getDescription

public String getDescription()

semantic description of the schema

getKeywords

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

JSON Schema keywords applied to this schema node

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