# 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 />

```
public final 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 |
|---|
| `public final class https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig.Builder` The builder class of `https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/app/PackageIdentifier>` | `https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig#getAllowedPackages()()` Returns a list of `https://developer.android.com/reference/androidx/appsearch/app/PackageIdentifier`s of packages that can access this schema. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/appsearch/app/PackageIdentifier` | `https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig#getPubliclyVisibleTargetPackage()()` Returns the `https://developer.android.com/reference/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://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<https://developer.android.com/reference/java/util/Set.html<https://developer.android.com/reference/java/lang/Integer.html>>` | `https://developer.android.com/reference/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/androidx/appsearch/app/SchemaVisibilityConfig` represents. |
| `int` | `https://developer.android.com/reference/androidx/appsearch/app/SchemaVisibilityConfig#hashCode()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object o)
```

### getAllowedPackages

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

```
public @NonNull List<PackageIdentifier> getAllowedPackages()
```

Returns a list of `https://developer.android.com/reference/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)

```
public @Nullable PackageIdentifier getPubliclyVisibleTargetPackage()
```

Returns the `https://developer.android.com/reference/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)

```
public @NonNull Set<Set<Integer>> getRequiredPermissions()
```

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

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

### hashCode

```
public int hashCode()
```