# SetSchemaResponse.Builder

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

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/appsearch/SetSchemaResponse.Builder "View this page in Java")  

```
class Builder
```

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

Builder for[SetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse)objects.

## Summary

|                                                                                                                 Public constructors                                                                                                                  ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#Builder())`()` Create a[Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#)object} |

|                                                                                                                                                                                                                                                                                                                                                                                  Public methods                                                                                                                                                                                                                                                                                                                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addDeletedType](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addDeletedType(kotlin.String))`(`deletedType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds one`deletedType`to the list of deleted schema types.                                                                                                                                                                                                                                                                                                                                       |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addDeletedTypes](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addDeletedTypes(kotlin.collections.MutableCollection))`(`deletedTypes:` `[MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>`)` Adds`deletedTypes`to the list of deleted schema types.                                                                                                                                                                                          |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addIncompatibleType](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addIncompatibleType(kotlin.String))`(`incompatibleType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds one`incompatibleType`to the list of incompatible schema types.                                                                                                                                                                                                                                                                                                              |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addIncompatibleTypes](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addIncompatibleTypes(kotlin.collections.MutableCollection))`(`incompatibleTypes:` `[MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>`)` Adds`incompatibleTypes`to the list of incompatible schema types.                                                                                                                                                                 |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addMigratedType](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addMigratedType(kotlin.String))`(`migratedType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds one`migratedType`to the list of migrated schema types.                                                                                                                                                                                                                                                                                                                                  |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addMigratedTypes](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addMigratedTypes(kotlin.collections.MutableCollection))`(`migratedTypes:` `[MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>`)` Adds`migratedTypes`to the list of migrated schema types.                                                                                                                                                                                     |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addMigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addMigrationFailure(android.app.appsearch.SetSchemaResponse.MigrationFailure))`(`migrationFailure:` `[SetSchemaResponse.MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)`)` Adds a[MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)to the list of migration failures.                                                                                                      |
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | [addMigrationFailures](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#addMigrationFailures(kotlin.collections.MutableCollection))`(`migrationFailures:` `[MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)<[SetSchemaResponse.MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)!>`)` Adds[MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)s to the list of migration failures. |
| [SetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse)                  | [build](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#build())`()` Builds a[SetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse)object.                                                                                                                                                                                                                                                                                                                                                                                                      |

## Public constructors

### Builder

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

```
Builder()
```

Create a[Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#)object}

## Public methods

### addDeletedType

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

```
fun addDeletedType(deletedType: String): SetSchemaResponse.Builder
```

Adds one`deletedType`to the list of deleted schema types.

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

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addDeletedTypes

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

```
fun addDeletedTypes(deletedTypes: MutableCollection<String!>): SetSchemaResponse.Builder
```

Adds`deletedTypes`to the list of deleted schema types.

|                                                                                                                      Parameters                                                                                                                      ||
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `deletedTypes` | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\>:This value cannot be`null`. |

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addIncompatibleType

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

```
fun addIncompatibleType(incompatibleType: String): SetSchemaResponse.Builder
```

Adds one`incompatibleType`to the list of incompatible schema types.

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

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addIncompatibleTypes

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

```
fun addIncompatibleTypes(incompatibleTypes: MutableCollection<String!>): SetSchemaResponse.Builder
```

Adds`incompatibleTypes`to the list of incompatible schema types.

|                                                                                                                        Parameters                                                                                                                         ||
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `incompatibleTypes` | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\>:This value cannot be`null`. |

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addMigratedType

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

```
fun addMigratedType(migratedType: String): SetSchemaResponse.Builder
```

Adds one`migratedType`to the list of migrated schema types.

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

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addMigratedTypes

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

```
fun addMigratedTypes(migratedTypes: MutableCollection<String!>): SetSchemaResponse.Builder
```

Adds`migratedTypes`to the list of migrated schema types.

|                                                                                                                      Parameters                                                                                                                       ||
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `migratedTypes` | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\>:This value cannot be`null`. |

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addMigrationFailure

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

```
fun addMigrationFailure(migrationFailure: SetSchemaResponse.MigrationFailure): SetSchemaResponse.Builder
```

Adds a[MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)to the list of migration failures.

|                                                                                          Parameters                                                                                           ||
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `migrationFailure` | [SetSchemaResponse.MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure):This value cannot be`null`. |

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### addMigrationFailures

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

```
fun addMigrationFailures(migrationFailures: MutableCollection<SetSchemaResponse.MigrationFailure!>): SetSchemaResponse.Builder
```

Adds[MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)s to the list of migration failures.

|                                                                                                                                                       Parameters                                                                                                                                                       ||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `migrationFailures` | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[SetSchemaResponse.MigrationFailure](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.MigrationFailure)!\>:This value cannot be`null`. |

|                                                                          Return                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse.Builder#) | This value cannot be`null`. |

### build

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

```
fun build(): SetSchemaResponse
```

Builds a[SetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse)object.

|                                                                  Return                                                                  ||
|-------------------------------------------------------------------------------------------------------------|-----------------------------|
| [SetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaResponse) | This value cannot be`null`. |