# AppFunctionSearchSpec

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/AppFunctionSearchSpec.kt+class:androidx.appfunctions.AppFunctionSearchSpec) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
public final class AppFunctionSearchSpec
```

<br />

*** ** * ** ***

Defines the specifications for filtering and searching app function snapshots.

A search will be performed using a logical AND operation across all provided criteria.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#AppFunctionSearchSpec(kotlin.collections.Set,kotlin.String,kotlin.String,kotlin.Int,kotlin.collections.Set,kotlin.collections.Set)( https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> packageNames, https://developer.android.com/reference/java/lang/String.html schemaCategory, https://developer.android.com/reference/java/lang/String.html schemaName, int minSchemaVersion, https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionName> functionNames, https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> scopes )` Creates a new instance of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec`. |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionName>` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getFunctionNames()()` The set of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionName` to filter by, or null if this filter is skipped. |
| `final int` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getMinSchemaVersion()()` The minimum schema version to filter by, or 0 if this filter is skipped. |
| `final https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getPackageNames()()` The set of package names to filter by, or null if this filter is skipped. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getSchemaCategory()()` The schema category to filter by, or null if this filter is skipped. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getSchemaName()()` The schema name to filter by, or null if this filter is skipped. |
| `final https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#getScopes()()` The set of `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionMetadata#scope()` type to filter by, or null if this filter is skipped. |

## Public constructors

### AppFunctionSearchSpec

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public AppFunctionSearchSpec(
    Set<@NonNull String> packageNames,
    String schemaCategory,
    String schemaName,
    int minSchemaVersion,
    Set<@NonNull AppFunctionName> functionNames,
    Set<@NonNull Integer> scopes
)
```

Creates a new instance of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec`.

## Public methods

### getFunctionNames

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final Set<@NonNull AppFunctionName> getFunctionNames()
```

The set of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionName` to filter by, or null if this filter is skipped.

### getMinSchemaVersion

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final int getMinSchemaVersion()
```

The minimum schema version to filter by, or 0 if this filter is skipped.

### getPackageNames

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final Set<@NonNull String> getPackageNames()
```

The set of package names to filter by, or null if this filter is skipped.

The calling app can only search metadata for functions in packages that it is allowed to query via `https://developer.android.com/reference/android/content/pm/PackageManager.html#canPackageQuery(java.lang.String, java.lang.String)`. If a package is not queryable by the calling app, its functions' metadata will not be visible.

### getSchemaCategory

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final String getSchemaCategory()
```

The schema category to filter by, or null if this filter is skipped.

### getSchemaName

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final String getSchemaName()
```

The schema name to filter by, or null if this filter is skipped.

### getScopes

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final Set<@NonNull Integer> getScopes()
```

The set of `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionMetadata#scope()` type to filter by, or null if this filter is skipped.