# GetSchemaResponse.Builder

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/app/GetSchemaResponse.java+class:androidx.appsearch.app.GetSchemaResponse.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
class GetSchemaResponse.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#addSchema(androidx.appsearch.app.AppSearchSchema)(schema: https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema)` Adds one `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` to the schema list. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#addSchemaTypeNotDisplayedBySystem(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets whether or not documents from the provided `schemaType` will be displayed and visible on any system UI surface. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse` object. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearPubliclyVisibleSchema(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-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. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearRequiredPermissionsForSchemaTypeVisibility(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Clears the set of required `https://developer.android.com/reference/android/Manifest.permission.html` combinations to read the given schema type. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemaTypeNotDisplayedBySystem(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-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. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemaTypeVisibleToConfigs(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Clears the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/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/androidx/appsearch/app/SchemaVisibilityConfig`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemaTypeVisibleToPackages(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Clears the set of packages that can read the given schema type. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemaTypeWipeoutAccountPropertyPaths(java.lang.String)(schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Clears all account `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath` for the given `schemaType`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemas()()` Clears all `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema`s from the list of schemas. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setPubliclyVisibleSchema(java.lang.String,androidx.appsearch.app.PackageIdentifier)( schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, packageIdentifier: https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier )` Specify that the schema should be publicly available, to packages which already have visibility to `packageIdentifier`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.util.Set<java.lang.Integer>>)( schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, visibleToPermissionSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!> )` Sets a set of required `https://developer.android.com/reference/android/Manifest.permission.html` combinations to the given schema type. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setSchemaTypeVisibleToConfigs(java.lang.String,java.util.Set<androidx.appsearch.app.SchemaVisibilityConfig>)( schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, visibleToConfigs: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/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/androidx/appsearch/app/SchemaVisibilityConfig`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setSchemaTypeVisibleToPackages(java.lang.String,java.util.Set<androidx.appsearch.app.PackageIdentifier>)( schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, packageIdentifiers: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier!> )` Sets whether or not documents from the provided `schemaType` can be read by the specified package. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setSchemaTypeWipeoutAccountPropertyPaths(java.lang.String,java.util.Set<androidx.appsearch.app.PropertyPath>)( schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, accountPropertyPaths: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath!> )` Sets the account `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath` for the given `schemaType`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setVersion(int)(version: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the database overall schema version. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setVisibilitySettingSupported(boolean)(visibilitySettingSupported: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Method to set visibility setting. |

## Public constructors

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
Builder()
```

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

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@ExperimentalAppSearchApi
Builder(getSchemaResponse: GetSchemaResponse)
```

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

## Public functions

### addSchema

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

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

### addSchemaTypeNotDisplayedBySystem

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of an `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` within the same `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse`, which won't be displayed by system. |

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun build(): GetSchemaResponse
```

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

### clearPubliclyVisibleSchema

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@ExperimentalAppSearchApi
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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setPubliclyVisibleSchema(java.lang.String,androidx.appsearch.app.PackageIdentifier)` |   |

### clearRequiredPermissionsForSchemaTypeVisibility

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.util.Set<java.lang.Integer>>)` |   |

### clearSchemaTypeNotDisplayedBySystem

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@ExperimentalAppSearchApi
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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#addSchemaTypeNotDisplayedBySystem(java.lang.String)` |   |

### clearSchemaTypeVisibleToConfigs

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

Clears the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/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/androidx/appsearch/app/SchemaVisibilityConfig`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setSchemaTypeVisibleToConfigs(java.lang.String,java.util.Set<androidx.appsearch.app.SchemaVisibilityConfig>)` |   |

### clearSchemaTypeVisibleToPackages

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse.Builder#setSchemaTypeVisibleToPackages(java.lang.String,java.util.Set<androidx.appsearch.app.PackageIdentifier>)` |   |

### clearSchemaTypeWipeoutAccountPropertyPaths

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

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

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

| Parameters |
|---|---|
| `schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the schema type for which to clear account property paths. |

### clearSchemas

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

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

### setPubliclyVisibleSchema

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the schema to make publicly accessible. |
| `packageIdentifier: https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier` | the package from which the document schema is from. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#setPubliclyVisibleSchema(java.lang.String,androidx.appsearch.app.PackageIdentifier)` |   |

### setRequiredPermissionsForSchemaTypeVisibility

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

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

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

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

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

- 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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The schema type to set visibility on. |
| `visibleToPermissionSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!>` | The Sets of Android permissions that will be required to access the given schema. |

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

### setSchemaTypeVisibleToConfigs

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun setSchemaTypeVisibleToConfigs(
    schemaType: String,
    visibleToConfigs: (Mutable)Set<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/androidx/appsearch/app/SchemaVisibilityConfig`.

The requirements in a `https://developer.android.com/reference/kotlin/androidx/appsearch/app/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/androidx/appsearch/app/SchemaVisibilityConfig`s

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

- 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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The schema type to set visibility on. |
| `visibleToConfigs: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig!>` | The `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig`s hold all requirements that a call must to match to access the schema. |

### setSchemaTypeVisibleToPackages

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun setSchemaTypeVisibleToPackages(
    schemaType: String,
    packageIdentifiers: (Mutable)Set<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/androidx/appsearch/app/PackageIdentifier`, containing a package name and a byte array of type `https://developer.android.com/reference/android/content/pm/PackageManager.html#CERT_INPUT_SHA256`.

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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The schema type to set visibility on. |
| `packageIdentifiers: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier!>` | Represents the package that has access to the given schema type. |

### setSchemaTypeWipeoutAccountPropertyPaths

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
@ExperimentalAppSearchApi
fun setSchemaTypeWipeoutAccountPropertyPaths(
    schemaType: String,
    accountPropertyPaths: (Mutable)Set<PropertyPath!>
): GetSchemaResponse.Builder
```

Sets the account `https://developer.android.com/reference/kotlin/androidx/appsearch/app/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/androidx/appsearch/app/GetSchemaResponse.Builder#clearSchemaTypeWipeoutAccountPropertyPaths(java.lang.String)`.

| Parameters |
|---|---|
| `schemaType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the schema type to which these property paths belong. |
| `accountPropertyPaths: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath!>` | A Set of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath` that point to accounts. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#setSchemaTypeWipeoutAccountPropertyPaths(java.lang.String,java.util.Set<androidx.appsearch.app.PropertyPath>,boolean)` |   |

### setVersion

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun setVersion(version: @IntRange(from = 0) Int): GetSchemaResponse.Builder
```

Sets the database overall schema version.

Default version is 0

### setVisibilitySettingSupported

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
fun setVisibilitySettingSupported(visibilitySettingSupported: Boolean): GetSchemaResponse.Builder
```

Method to set visibility setting. If this is called with false, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse#getRequiredPermissionsForSchemaTypeVisibility()`, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse#getSchemaTypesNotDisplayedBySystem()`}, and `https://developer.android.com/reference/kotlin/androidx/appsearch/app/GetSchemaResponse#getSchemaTypesVisibleToPackages()` calls will throw an `https://developer.android.com/reference/java/lang/UnsupportedOperationException.html`. If called with true, visibility information for all schemas will be cleared.

| Parameters |
|---|---|
| `visibilitySettingSupported: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether supported `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features#ADD_PERMISSIONS_AND_GET_VISIBILITY()` by this backend/Android API level. |