Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Builder

*** ** * ** ***

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.app.appsearch.AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) |

Builder for `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#Builder(kotlin.String)(propertyName: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Creates a new `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#`. |

| Public methods ||
|---|---|
| [AppSearchSchema.StringPropertyConfig](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#build()()` Constructs a new `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig` from the contents of this builder. |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setCardinality(kotlin.Int)(cardinality: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the cardinality of the property (whether it is optional, required or repeated). |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setDeletePropagationType(kotlin.Int)(deletePropagationType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Configures how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property. |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setDescription(kotlin.String)(description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets a natural language description of this property. |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setIndexingType(kotlin.Int)(indexingType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Configures how a property should be indexed so that it can be retrieved by queries. |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setJoinableValueType(kotlin.Int)(joinableValueType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Configures how this property should be used as a joining matcher. |
| [AppSearchSchema.StringPropertyConfig.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setTokenizerType(kotlin.Int)(tokenizerType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Configures how this property should be tokenized (split into words). |

## Public constructors

### Builder

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
Builder(propertyName: String)
```

Creates a new `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#`.

| Parameters ||
|---|---|
| `propertyName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |

## Public methods

### build

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun build(): AppSearchSchema.StringPropertyConfig
```

Constructs a new `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig` from the contents of this builder.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig` | This value cannot be `null`. |

| Exceptions ||
|---|---|
| `java.lang.IllegalStateException` | if any following condition: - Tokenizer type is not `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int` with indexing type `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int`. - Indexing type is not `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int` with tokenizer type `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int`. - Deletion type other than `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int` is used without setting `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int`. |

### setCardinality

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setCardinality(cardinality: Int): AppSearchSchema.StringPropertyConfig.Builder
```

Sets the cardinality of the property (whether it is optional, required or repeated).

If this method is not called, the default cardinality is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int`.

| Parameters ||
|---|---|
| `cardinality` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |

### setDeletePropagationType

Added in [API level 37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 24](https://developer.android.com/sdkExtensions)

```
fun setDeletePropagationType(deletePropagationType: Int): AppSearchSchema.StringPropertyConfig.Builder
```

Configures how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property.

If this method is not called, the default delete propagation type is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int`, indicating that deletion will not propagate between this document and the referenced document.

If the delete propagation type is not `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int`, then `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int` must also be set since the delete propagation has to use the qualified id. Otherwise, throw `https://developer.android.com/reference/kotlin/java/lang/IllegalStateException.html#` when building.

| Parameters ||
|---|---|
| `deletePropagationType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_PROPAGATE_FROM:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |

### setDescription

Added in [API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 18](https://developer.android.com/sdkExtensions)

```
fun setDescription(description: String): AppSearchSchema.StringPropertyConfig.Builder
```

Sets a natural language description of this property.

For more details about the description field, see `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#getDescription()`.

| Parameters ||
|---|---|
| `description` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |

### setIndexingType

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setIndexingType(indexingType: Int): AppSearchSchema.StringPropertyConfig.Builder
```

Configures how a property should be indexed so that it can be retrieved by queries.

If this method is not called, the default indexing type is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int`, so that it cannot be matched by queries.

| Parameters ||
|---|---|
| `indexingType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |

### setJoinableValueType

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
fun setJoinableValueType(joinableValueType: Int): AppSearchSchema.StringPropertyConfig.Builder
```

Configures how this property should be used as a joining matcher.

If this method is not called, the default joinable value type is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE:kotlin.Int`, so that it is not joinable.

At most, 64 properties can be set as joinable per schema.

| Parameters ||
|---|---|
| `joinableValueType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |

### setTokenizerType

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun setTokenizerType(tokenizerType: Int): AppSearchSchema.StringPropertyConfig.Builder
```

Configures how this property should be tokenized (split into words).

If this method is not called, the default indexing type is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int`, so that it is not tokenized.

This method must be called with a value other than `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int` if the property is indexed (that is, if `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#setIndexingType(kotlin.Int)` has been called with a value other than `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int`).

| Parameters ||
|---|---|
| `tokenizerType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_PLAIN:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_VERBATIM:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_RFC822:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#` | This value cannot be `null`. |