A2uiStringSchema


public final class A2uiStringSchema extends A2uiSchema


Schema representing a string literal.

Use this for static text that cannot be dynamically bound.

Summary

Public fields

static final @NonNull A2uiStringSchema

Public constructors

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

Public methods

String

semantic description of the schema

@NonNull List<@NonNull A2uiSchemaKeyword<@NonNull String>>

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 A2uiStringSchema INSTANCE

Public constructors

A2uiStringSchema

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

Public methods

getDescription

public String getDescription()

semantic description of the schema

getKeywords

public @NonNull List<@NonNull A2uiSchemaKeyword<@NonNull String>> 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()