# SchemaVisibilityConfig

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

*** ** * ** ***

<br />

```
class SchemaVisibilityConfig
```

<br />

*** ** * ** ***

A class to hold a all necessary Visibility information corresponding to the same schema. This pattern allows for easier association of these documents.

This does not correspond to any schema, the properties held in this class are kept in two separate schemas, VisibilityConfig and PublicAclOverlay.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig.Builder` The builder class of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier!>` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig#getAllowedPackages()()` Returns a list of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier`s of packages that can access this schema. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier?` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig#getPubliclyVisibleTargetPackage()()` Returns the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier` of the package that will be used as the target package in a call to `https://developer.android.com/reference/android/content/pm/PackageManager.html#canPackageQuery(java.lang.String, java.lang.String)` to determine which packages can access this publicly visible schema. |
| `(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/SchemaVisibilityConfig#getRequiredPermissions()()` Returns an array of Integers representing Android Permissions that the caller must hold to access the schema this `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig` represents. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig#hashCode()()` |

## Public functions

### equals

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

### getAllowedPackages

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

```
fun getAllowedPackages(): (Mutable)List<PackageIdentifier!>
```

Returns a list of `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier`s of packages that can access this schema.

### getPubliclyVisibleTargetPackage

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

```
fun getPubliclyVisibleTargetPackage(): PackageIdentifier?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/PackageIdentifier` of the package that will be used as the target package in a call to `https://developer.android.com/reference/android/content/pm/PackageManager.html#canPackageQuery(java.lang.String, java.lang.String)` to determine which packages can access this publicly visible schema. Returns null if the schema is not publicly visible.

### getRequiredPermissions

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

```
fun getRequiredPermissions(): (Mutable)Set<(Mutable)Set<Int!>!>
```

Returns an array of Integers representing Android Permissions that the caller must hold to access the schema this `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SchemaVisibilityConfig` represents.

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

### hashCode

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