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.GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) |

Builder for `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse` objects.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#Builder()()` Creates a new `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#` |
| `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#Builder(android.app.appsearch.GetSchemaResponse)(getSchemaResponse: https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse)` Creates a new `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#` from the given `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse`. |

| Public methods ||
|---|---|
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#addSchema(android.app.appsearch.AppSearchSchema)(schema: https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema)` Adds one `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema` to the schema list. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#addSchemaTypeNotDisplayedBySystem(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets whether or not documents from the provided `schemaType` will be displayed and visible on any system UI surface. |
| [GetSchemaResponse](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse` object. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearPubliclyVisibleSchema(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears the visibility setting that specifies that the given schema type should be publicly available to packages which already have visibility to a specified package. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearRequiredPermissionsForSchemaTypeVisibility(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears the set of required `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#` combinations to read the given schema type. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemaTypeNotDisplayedBySystem(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears the visibility setting for the given schema type that prevents the schema from being displayed and visible on any system UI surface. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemaTypeVisibleToConfigs(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears the `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`s for the given schema type which allow visibility to the schema if the caller matches ALL visibility requirements of ANY `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemaTypeVisibleToPackages(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears the set of packages that can read the given schema type. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemaTypeWipeoutAccountPropertyPaths(kotlin.String)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Clears all account `https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath` for the given `schemaType`. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemas()()` Clears all `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema`s from the list of schemas. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setPubliclyVisibleSchema(kotlin.String,%20android.app.appsearch.PackageIdentifier)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, packageIdentifier: https://developer.android.com/reference/kotlin/android/app/appsearch/PackageIdentifier)` Specify that the schema should be publicly available, to packages which already have visibility to `packageIdentifier`. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setRequiredPermissionsForSchemaTypeVisibility(kotlin.String,%20kotlin.collections.MutableSet)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, visibleToPermissionSets: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html!>!>)` Sets a set of required `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#` combinations to the given schema type. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setSchemaTypeVisibleToConfigs(kotlin.String,%20kotlin.collections.MutableSet)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, visibleToConfigs: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig!>)` Sets the documents from the provided `schemaType` can be read by the caller if they match the ALL visibility requirements set in `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setSchemaTypeVisibleToPackages(kotlin.String,%20kotlin.collections.MutableSet)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, packageIdentifiers: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://developer.android.com/reference/kotlin/android/app/appsearch/PackageIdentifier!>)` Sets whether or not documents from the provided `schemaType` can be read by the specified package. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setSchemaTypeWipeoutAccountPropertyPaths(kotlin.String,%20kotlin.collections.MutableSet)(schemaType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, accountPropertyPaths: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath!>)` Sets the account `https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath` for the given `schemaType`. |
| [GetSchemaResponse.Builder](https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#) | `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setVersion(kotlin.Int)(version: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the database overall schema version. |

## Public constructors

### Builder

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

```
Builder()
```

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

### Builder

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

```
Builder(getSchemaResponse: GetSchemaResponse)
```

Creates a new `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#` from the given `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse`.

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

## Public methods

### addSchema

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

```
fun addSchema(schema: AppSearchSchema): GetSchemaResponse.Builder
```

Adds one `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema` to the schema list.

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

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

### addSchemaTypeNotDisplayedBySystem

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

```
fun addSchemaTypeNotDisplayedBySystem(schemaType: String): GetSchemaResponse.Builder
```

Sets whether or not documents from the provided `schemaType` will be displayed and visible on any system UI surface.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The name of an `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema` within the same `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse`, which won't be displayed by system. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.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(): GetSchemaResponse
```

Builds a `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse` object.

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

### clearPubliclyVisibleSchema

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

```
fun clearPubliclyVisibleSchema(schemaType: String): GetSchemaResponse.Builder
```

Clears the visibility setting that specifies that the given schema type should be publicly available to packages which already have visibility to a specified package.

| Parameters ||
|---|---|
| `schemaType` | [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/GetSchemaResponse.Builder#` | This value cannot be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setPubliclyVisibleSchema(kotlin.String,%20android.app.appsearch.PackageIdentifier)`

### clearRequiredPermissionsForSchemaTypeVisibility

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

```
fun clearRequiredPermissionsForSchemaTypeVisibility(schemaType: String): GetSchemaResponse.Builder
```

Clears the set of required `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#` combinations to read the given schema type.

| Parameters ||
|---|---|
| `schemaType` | [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/GetSchemaResponse.Builder#` | This value cannot be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setRequiredPermissionsForSchemaTypeVisibility(kotlin.String,%20kotlin.collections.MutableSet)`

### clearSchemaTypeNotDisplayedBySystem

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

```
fun clearSchemaTypeNotDisplayedBySystem(schemaType: String): GetSchemaResponse.Builder
```

Clears the visibility setting for the given schema type that prevents the schema from being displayed and visible on any system UI surface.

| Parameters ||
|---|---|
| `schemaType` | [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/GetSchemaResponse.Builder#` | This value cannot be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#addSchemaTypeNotDisplayedBySystem(kotlin.String)`

### clearSchemaTypeVisibleToConfigs

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

```
fun clearSchemaTypeVisibleToConfigs(schemaType: String): GetSchemaResponse.Builder
```

Clears the `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`s for the given schema type which allow visibility to the schema if the caller matches ALL visibility requirements of ANY `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`.

| Parameters ||
|---|---|
| `schemaType` | [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/GetSchemaResponse.Builder#` | This value cannot be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setSchemaTypeVisibleToConfigs(kotlin.String,%20kotlin.collections.MutableSet)`

### clearSchemaTypeVisibleToPackages

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

```
fun clearSchemaTypeVisibleToPackages(schemaType: String): GetSchemaResponse.Builder
```

Clears the set of packages that can read the given schema type.

| Parameters ||
|---|---|
| `schemaType` | [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/GetSchemaResponse.Builder#` | This value cannot be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#setSchemaTypeVisibleToPackages(kotlin.String,%20kotlin.collections.MutableSet)`

### clearSchemaTypeWipeoutAccountPropertyPaths

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

```
fun clearSchemaTypeWipeoutAccountPropertyPaths(schemaType: String): GetSchemaResponse.Builder
```

Clears all account `https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath` for the given `schemaType`.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The name of the schema type for which to clear account property paths. This value cannot be `null`. |

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

### clearSchemas

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

```
fun clearSchemas(): GetSchemaResponse.Builder
```

Clears all `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema`s from the list of schemas.

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

### setPubliclyVisibleSchema

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

```
fun setPubliclyVisibleSchema(
    schemaType: String, 
    packageIdentifier: PackageIdentifier
): GetSchemaResponse.Builder
```

Specify that the schema should be publicly available, to packages which already have visibility to `packageIdentifier`.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the schema to make publicly accessible. This value cannot be `null`. |
| `packageIdentifier` | [PackageIdentifier](https://developer.android.com/reference/kotlin/android/app/appsearch/PackageIdentifier): the package from which the document schema is from. This value cannot be `null`. |

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

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest.Builder#setPubliclyVisibleSchema(kotlin.String,%20android.app.appsearch.PackageIdentifier)`

### setRequiredPermissionsForSchemaTypeVisibility

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

```
fun setRequiredPermissionsForSchemaTypeVisibility(
    schemaType: String, 
    visibleToPermissionSets: MutableSet<MutableSet<Int!>!>
): GetSchemaResponse.Builder
```

Sets a set of required `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#` combinations to the given schema type.

The querier could read the `https://developer.android.com/reference/kotlin/android/app/appsearch/GenericDocument` objects under the `schemaType` if they holds ALL required permissions of ANY of the individual value sets.

For example, if the Map contains `{{permissionA, PermissionB}, {PermissionC, PermissionD}, {PermissionE}}`.

- A querier holds both PermissionA and PermissionB has access.
- A querier holds both PermissionC and PermissionD has access.
- A querier holds only PermissionE has access.
- A querier holds both PermissionA and PermissionE has access.
- A querier holds only PermissionA doesn't have access.
- A querier holds both PermissionA and PermissionC doesn't have access.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The schema type to set visibility on. This value cannot be `null`. |
| `visibleToPermissionSets` | [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\<[MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\<[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)!\>!\>: The Sets of Android permissions that will be required to access the given schema. Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_SMS:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_CALENDAR:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_CONTACTS:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_EXTERNAL_STORAGE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_HOME_APP_SEARCH_DATA:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#READ_ASSISTANT_APP_SEARCH_DATA:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest#PRIVATE_COMPUTE_CORE_UID_ACCESS:kotlin.Int` . This value cannot be `null`. |

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

**See Also**

- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SMS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_CALENDAR:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_CONTACTS:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_EXTERNAL_STORAGE:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_HOME_APP_SEARCH_DATA:kotlin.String`
- `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_ASSISTANT_APP_SEARCH_DATA:kotlin.String`

### setSchemaTypeVisibleToConfigs

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

```
fun setSchemaTypeVisibleToConfigs(
    schemaType: String, 
    visibleToConfigs: MutableSet<SchemaVisibilityConfig!>
): GetSchemaResponse.Builder
```

Sets the documents from the provided `schemaType` can be read by the caller if they match the ALL visibility requirements set in `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`.

The requirements in a `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig` is "AND" relationship. A caller must match ALL requirements to access the schema. For example, a caller must hold required permissions AND it is a specified package.

The querier could have access if they match ALL requirements in ANY of the given `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`s

For example, if the Set contains `{{PackageA and Permission1}, {PackageB and Permission2}}`.

- A querier from packageA could read if they holds Permission1.
- A querier from packageA could NOT read if they only holds Permission2 instead of Permission1.
- A querier from packageB could read if they holds Permission2.
- A querier from packageC could never read.
- A querier holds both PermissionA and PermissionE has access.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The schema type to set visibility on. This value cannot be `null`. |
| `visibleToConfigs` | [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\<[SchemaVisibilityConfig](https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig)!\>: The `https://developer.android.com/reference/kotlin/android/app/appsearch/SchemaVisibilityConfig`s hold all requirements that a call must to match to access the schema. This value cannot be `null`. |

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

### setSchemaTypeVisibleToPackages

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

```
fun setSchemaTypeVisibleToPackages(
    schemaType: String, 
    packageIdentifiers: MutableSet<PackageIdentifier!>
): GetSchemaResponse.Builder
```

Sets whether or not documents from the provided `schemaType` can be read by the specified package.

Each package is represented by a `https://developer.android.com/reference/kotlin/android/app/appsearch/PackageIdentifier`, containing a package name and a byte array of type `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager.html#CERT_INPUT_SHA256:kotlin.Int`.

To opt into one-way data sharing with another application, the developer will need to explicitly grant the other application's package name and certificate Read access to its data.

For two-way data sharing, both applications need to explicitly grant Read access to one another.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The schema type to set visibility on. This value cannot be `null`. |
| `packageIdentifiers` | [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\<[PackageIdentifier](https://developer.android.com/reference/kotlin/android/app/appsearch/PackageIdentifier)!\>: Represents the package that has access to the given schema type. This value cannot be `null`. |

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

### setSchemaTypeWipeoutAccountPropertyPaths

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

```
fun setSchemaTypeWipeoutAccountPropertyPaths(
    schemaType: String, 
    accountPropertyPaths: MutableSet<PropertyPath!>
): GetSchemaResponse.Builder
```

Sets the account `https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath` for the given `schemaType`.

These property paths are used to identify data that belongs to an account, which can then be wiped when an account is removed from the system.

If called multiple times for the same `schemaType`, the new paths will be added to the existing ones. To replace the paths, first call `https://developer.android.com/reference/kotlin/android/app/appsearch/GetSchemaResponse.Builder#clearSchemaTypeWipeoutAccountPropertyPaths(kotlin.String)`.

| Parameters ||
|---|---|
| `schemaType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The name of the schema type to which these property paths belong. This value cannot be `null`. |
| `accountPropertyPaths` | [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\<[PropertyPath](https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath)!\>: A Set of `https://developer.android.com/reference/kotlin/android/app/appsearch/PropertyPath` that point to accounts. This value cannot be `null`. |

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

**See Also**

- `https://developer.android.com/reference/kotlin/android/app/appsearch/SetSchemaRequest.Builder#setSchemaTypeWipeoutAccountPropertyPaths(kotlin.String,%20kotlin.collections.MutableSet,%20kotlin.Boolean)`

### setVersion

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

```
fun setVersion(version: Int): GetSchemaResponse.Builder
```

Sets the database overall schema version.

Default version is 0

| Parameters ||
|---|---|
| `version` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is 0 or greater |

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