# SetSchemaRequest

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

*** ** * ** ***


```
class SetSchemaRequest
```

<br />

*** ** * ** ***

Encapsulates a request to update the schema of an `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession` database.

The schema is composed of a collection of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` objects, each of which defines a unique type of data.

The first call to SetSchemaRequest will set the provided schema and store it within the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession` database.

Subsequent calls will compare the provided schema to the previously saved schema, to determine how to treat existing documents.

The following types of schema modifications are always safe and are made without deleting any existing documents:

- Addition of new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` types
- Addition of new properties to an existing `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` type
- Changing the cardinality of a property to be less restrictive

The following types of schema changes are not backwards compatible:

- Removal of an existing `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` type
- Removal of a property from an existing `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` type
- Changing the data type of an existing property
- Changing the cardinality of a property to be more restrictive

Providing a schema with incompatible changes, will throw an `https://developer.android.com/reference/kotlin/androidx/appsearch/exceptions/AppSearchException`, with a message describing the incompatibility. As a result, the previously set schema will remain unchanged.

Backward incompatible changes can be made by :

- setting `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#setForceOverride(boolean)` method to `true`. This deletes all documents that are incompatible with the new schema. The new schema is then saved and persisted to disk.
- Add a `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator` for each incompatible type and make no deletion. The migrator will migrate documents from its old schema version to the new version. Migrated types will be set into both `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaResponse#getIncompatibleTypes()` and `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaResponse#getMigratedTypes()`. See the migration section below.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSession#setSchemaAsync(androidx.appsearch.app.SetSchemaRequest)` |   |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest` objects. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#PRIVATE_COMPUTE_CORE_UID_ACCESS() = 12` The visibility access for Private Compute Core. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_ASSISTANT_APP_SEARCH_DATA() = 6` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_ASSISTANT_APP_SEARCH_DATA` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_CALENDAR() = 2` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_CALENDAR` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_CONTACTS() = 3` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_CONTACTS` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_EXTERNAL_STORAGE() = 4` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_HOME_APP_SEARCH_DATA() = 5` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_HOME_APP_SEARCH_DATA` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/kotlin/androidx/appsearch/app/Features.ADD_PERMISSIONS_AND_GET_VISIBILITY) https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_SMS() = 1` The `https://developer.android.com/reference/android/Manifest.permission.html#READ_SMS` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getMigrators()()` Returns the map of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator`, the key will be the schema type of the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator` associated with. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getPubliclyVisibleSchemas()()` Returns a mapping of publicly visible schemas to the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier` specifying the package the schemas are from. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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.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!>!>!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getRequiredPermissionsForSchemaTypeVisibility()()` Returns a mapping of schema types to the Map of `https://developer.android.com/reference/android/Manifest.permission.html` combinations that querier must hold to access that schema type. |
| `(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/AppSearchSchema!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getSchemas()()` Returns the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` types that are part of this request. |
| `(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/-string/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getSchemasNotDisplayedBySystem()()` Returns all the schema types that are opted out of being displayed and visible on any system UI surface. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig!>!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getSchemasVisibleToConfigs()()` Returns a mapping of schema types to the set of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig` that have access to that schema type. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier!>!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getSchemasVisibleToPackages()()` Returns a mapping of schema types to the set of packages that have access to that schema type. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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/-string/index.html!>!>` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getSchemasWipeoutAccountPropertyPaths()()` Returns a map containing all schema types that have been configured for account wipeout, mapped to the specific property paths within those schemas that hold the account identifiers. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#getVersion()()` Returns the database overall schema version. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#isForceOverride()()` Returns whether this request will force the schema to be overridden. |

## Constants

### PRIVATE_COMPUTE_CORE_UID_ACCESS

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

```
const val PRIVATE_COMPUTE_CORE_UID_ACCESS = 12: Int
```

The visibility access for Private Compute Core.

A schema with this permission requires callers to have a UID for which `https://developer.android.com/reference/android/os/Process.html#isPrivateComputeCoreUid(int)` returns true to access the data.

This permission can be combined with other permissions in the same set. In such cases, the caller must both have a Private Compute Core UID and hold all other permissions in the set to gain access.

### READ_ASSISTANT_APP_SEARCH_DATA

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_ASSISTANT_APP_SEARCH_DATA = 6: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_ASSISTANT_APP_SEARCH_DATA` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

### READ_CALENDAR

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_CALENDAR = 2: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_CALENDAR` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

### READ_CONTACTS

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_CONTACTS = 3: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_CONTACTS` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

### READ_EXTERNAL_STORAGE

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_EXTERNAL_STORAGE = 4: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

### READ_HOME_APP_SEARCH_DATA

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_HOME_APP_SEARCH_DATA = 5: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_HOME_APP_SEARCH_DATA` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

### READ_SMS

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

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
const val READ_SMS = 1: Int
```

The `https://developer.android.com/reference/android/Manifest.permission.html#READ_SMS` AppSearch supported in `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest.Builder#addRequiredPermissionsForSchemaTypeVisibility(java.lang.String,java.util.Set<java.lang.Integer>)`

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getMigrators

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

```
fun getMigrators(): (Mutable)Map<String!, Migrator!>
```

Returns the map of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator`, the key will be the schema type of the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/Migrator` associated with.

### getPubliclyVisibleSchemas

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

```
fun getPubliclyVisibleSchemas(): (Mutable)Map<String!, PackageIdentifier!>
```

Returns a mapping of publicly visible schemas to the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier` specifying the package the schemas are from.

### getRequiredPermissionsForSchemaTypeVisibility

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

```
fun getRequiredPermissionsForSchemaTypeVisibility(): (Mutable)Map<String!, (Mutable)Set<(Mutable)Set<Int!>!>!>
```

Returns a mapping of schema types to the Map of `https://developer.android.com/reference/android/Manifest.permission.html` combinations that querier must hold to access that 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.

It's inefficient to call this method repeatedly.

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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.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 map contains schema type and all combinations of required permission for querier to access it. The supported Permission are `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_SMS()`, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_CALENDAR()`, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_CONTACTS()`, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_EXTERNAL_STORAGE()`, `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_HOME_APP_SEARCH_DATA()` and `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SetSchemaRequest#READ_ASSISTANT_APP_SEARCH_DATA()`. |

### getSchemas

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

```
fun getSchemas(): (Mutable)Set<AppSearchSchema!>
```

Returns the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/AppSearchSchema` types that are part of this request.

### getSchemasNotDisplayedBySystem

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

```
fun getSchemasNotDisplayedBySystem(): (Mutable)Set<String!>
```

Returns all the schema types that are opted out of being displayed and visible on any system UI surface.

### getSchemasVisibleToConfigs

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

```
fun getSchemasVisibleToConfigs(): (Mutable)Map<String!, (Mutable)Set<SchemaVisibilityConfig!>!>
```

Returns a mapping of schema types to the set of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig` that have access to that schema type.

It's inefficient to call this method repeatedly.

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

### getSchemasVisibleToPackages

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

```
fun getSchemasVisibleToPackages(): (Mutable)Map<String!, (Mutable)Set<PackageIdentifier!>!>
```

Returns a mapping of schema types to the set of packages that have access to that schema type.

It's inefficient to call this method repeatedly.

### getSchemasWipeoutAccountPropertyPaths

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

```
@ExperimentalAppSearchApi
fun getSchemasWipeoutAccountPropertyPaths(): (Mutable)Map<String!, (Mutable)Set<String!>!>
```

Returns a map containing all schema types that have been configured for account wipeout, mapped to the specific property paths within those schemas that hold the account identifiers.

This method performs a deep copy to ensure the returned map and its contained sets are immutable from external modifications.

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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/-string/index.html!>!>` | A map where keys are schema type names, and values are sets of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PropertyPath` strings configured for account wipeout for that schema type. |

### getVersion

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

```
fun getVersion(): @IntRange(from = 1) Int
```

Returns the database overall schema version.

### hashCode

```
fun hashCode(): Int
```

### isForceOverride

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

```
fun isForceOverride(): Boolean
```

Returns whether this request will force the schema to be overridden.