Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#inhmethods)

# AppFunctionSearchSpec.Builder

*** ** * ** ***

` public static final class AppFunctionSearchSpec.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appfunctions.AppFunctionSearchSpec.Builder |

<br />

*** ** * ** ***

Builder for constructing `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#Builder()() ` Constructs a `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder`. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#build()() ` Constructs an `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec`. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setFunctionNames(java.util.Set<android.app.appfunctions.AppFunctionName>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/android/app/appfunctions/AppFunctionName> functionNames) ` Sets the list of `https://developer.android.com/reference/android/app/appfunctions/AppFunctionName` to filter by, or null to skip this filter. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setMinSchemaVersion(long)(long minSchemaVersion) ` Sets the minimum schema version to filter by, or 0 to skip this filter. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setPackageNames(java.util.Set<java.lang.String>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String> packageNames) ` Sets the list of package names to filter by, or null to skip this filter. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setSchemaCategory(java.lang.String)(https://developer.android.com/reference/java/lang/String schemaCategory) ` Sets the schema category to filter by, or null to skip this filter. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setSchemaName(java.lang.String)(https://developer.android.com/reference/java/lang/String schemaName) ` Sets the schema name to filter by, or null to skip this filter. |
| ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | ` https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder#setScopes(java.util.Set<java.lang.Integer>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/Integer> scopes) ` Sets the scope types to filter by, or null to skip this filter. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

Constructs a `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder`.

<br />

## Public methods

### build

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec build ()
```

Constructs an `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec` | This value cannot be `null`. <br /> |

### setFunctionNames

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setFunctionNames (Set<AppFunctionName> functionNames)
```

Sets the list of `https://developer.android.com/reference/android/app/appfunctions/AppFunctionName` to filter by, or null to skip this filter.

<br />

| Parameters ||
|---|---|
| `functionNames` | `Set`: the list of `https://developer.android.com/reference/android/app/appfunctions/AppFunctionName` to filter by. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `functionNames` is an empty list. |

### setMinSchemaVersion

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setMinSchemaVersion (long minSchemaVersion)
```

Sets the minimum schema version to filter by, or 0 to skip this filter.

<br />

| Parameters ||
|---|---|
| `minSchemaVersion` | `long`: the minimum schema version to filter by. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSchemaMetadata#getVersion()`

### setPackageNames

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setPackageNames (Set<String> packageNames)
```

Sets the list of package names to filter by, or null to skip this filter.

<br />

| Parameters ||
|---|---|
| `packageNames` | `Set`: the list of package names to filter by. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `packageNames` is an empty list. |

### setSchemaCategory

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setSchemaCategory (String schemaCategory)
```

Sets the schema category to filter by, or null to skip this filter.

<br />

| Parameters ||
|---|---|
| `schemaCategory` | `String`: the schema category to filter by. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSchemaMetadata#getCategory()`

### setSchemaName

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setSchemaName (String schemaName)
```

Sets the schema name to filter by, or null to skip this filter.

<br />

| Parameters ||
|---|---|
| `schemaName` | `String`: the schema name to filter by. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSchemaMetadata#getName()`

### setScopes

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AppFunctionSearchSpec.Builder setScopes (Set<Integer> scopes)
```

Sets the scope types to filter by, or null to skip this filter.

<br />

| Parameters ||
|---|---|
| `scopes` | `Set`: the set of scope types to filter by. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appfunctions/AppFunctionSearchSpec.Builder` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/appfunctions/AppFunctionMetadata#getScope()`