# A2uiStringSchema

Artifact: [androidx.a2ui:a2ui-model](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/model/schema/A2uiStringSchema.kt+class:androidx.a2ui.model.schema.A2uiStringSchema) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
public final class A2uiStringSchema extends A2uiSchema
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema) ||
|   | ↳ | [androidx.a2ui.model.schema.A2uiStringSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema) |

*** ** * ** ***

Schema representing a string literal.

Use this for static text that cannot be dynamically bound.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#INSTANCE()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#A2uiStringSchema(kotlin.String,kotlin.collections.List)( https://developer.android.com/reference/java/lang/String.html description, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchemaKeyword<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html>> keywords )` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#getDescription()()` semantic description of the schema |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchemaKeyword<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html>>` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#getKeywords()()` JSON Schema keywords applied to this schema node |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#toJsonElement()()` Returns the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiStringSchema#toString()()` |

### Inherited methods

From [androidx.a2ui.model.schema.A2uiSchema](https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema) `boolean` `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` `int` `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema#hashCode()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/a2ui/model/schema/A2uiSchema#toJsonSchema()()`

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-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
public @NonNull JsonElement toJsonElement()
```

Returns the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` | the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/index.html` hierarchy representing this schema |

### toString

```
public @NonNull String toString()
```