Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#inhmethods)

# AppSearchSchema.StringPropertyConfig.Builder

*** ** * ** ***


`
public
static
final

class
AppSearchSchema.StringPropertyConfig.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appsearch.AppSearchSchema.StringPropertyConfig.Builder |

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#Builder(java.lang.String)(https://developer.android.com/reference/java/lang/String propertyName) ` Creates a new `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder`. |

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

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### Builder

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

```
public Builder (String propertyName)
```

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

<br />

| Parameters ||
|---|---|
| `propertyName` | `String`: This value cannot be `null`. <br /> |

## Public methods

### build

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

```
public AppSearchSchema.StringPropertyConfig build ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig` | This value cannot be `null`. <br /> |

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

### setCardinality

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

```
public AppSearchSchema.StringPropertyConfig.Builder setCardinality (int cardinality)
```

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/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL`.

<br />

| Parameters ||
|---|---|
| `cardinality` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |

### setDeletePropagationType

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 24](https://developer.android.com/sdkExtensions)

```
public AppSearchSchema.StringPropertyConfig.Builder setDeletePropagationType (int deletePropagationType)
```

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/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE`, 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/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE`, then `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID` must also be set since the
delete propagation has to use the qualified id. Otherwise, throw `https://developer.android.com/reference/java/lang/IllegalStateException` when building.

<br />

| Parameters ||
|---|---|
| `deletePropagationType` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_PROPAGATE_FROM` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |

### setDescription

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 18](https://developer.android.com/sdkExtensions)

```
public AppSearchSchema.StringPropertyConfig.Builder setDescription (String description)
```

Sets a natural language description of this property.

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

<br />

| Parameters ||
|---|---|
| `description` | `String`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |

### setIndexingType

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

```
public AppSearchSchema.StringPropertyConfig.Builder setIndexingType (int indexingType)
```

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/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE`, so that it cannot be matched by queries.

<br />

| Parameters ||
|---|---|
| `indexingType` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |

### setJoinableValueType

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

```
public AppSearchSchema.StringPropertyConfig.Builder setJoinableValueType (int joinableValueType)
```

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/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE`, so that it is not joinable.

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

<br />

| Parameters ||
|---|---|
| `joinableValueType` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |

### setTokenizerType

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

```
public AppSearchSchema.StringPropertyConfig.Builder setTokenizerType (int tokenizerType)
```

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/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE`, so that it is not tokenized.

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

<br />

| Parameters ||
|---|---|
| `tokenizerType` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_PLAIN` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_VERBATIM` - `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_RFC822` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` | This value cannot be `null`. <br /> |