# GlobalSearchApplicationInfo.Builder

Artifact: [androidx.appsearch:appsearch-builtin-types](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.java+class:androidx.appsearch.builtintypes.GlobalSearchApplicationInfo.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***

<br />

```
class GlobalSearchApplicationInfo.Builder
```

<br />

*** ** * ** ***

Builder class for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#Builder(java.lang.String,java.lang.String,int)(namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, applicationType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#build()()` Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#setDocumentClasses(java.util.List<java.lang.Class<?>>)(schemaClasses: (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/java/lang/Class.html<*>>)` Sets the list of schemas this app is capable of producing (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`). |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#setSchemaTypes(java.util.List<java.lang.String>)(schemaTypes: (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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>)` Sets the list of schema type names this app is capable of producing (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`). |

| ### Protected properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#mApplicationType()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#mId()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#mNamespace()` |
| `(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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder#mSchemaTypes()` |

## Public constructors

### Builder

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

```
Builder(namespace: String, id: String, applicationType: Int)
```

Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.Builder`.

| Parameters |
|---|---|
| `namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | an arbitrary string corresponding to a logical grouping for this `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`. All AppSearch documents must have a namespace. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the identifier for this GlobalSearchApplicationInfo. AppSearch IDs are unique within their combination of package, database and namespace. |
| `applicationType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | whether the application is capable of producing, or interested in consuming, the schema types configured by `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.BuilderImpl#setSchemaTypes(java.util.List<java.lang.String>)` or `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.BuilderImpl#setDocumentClasses(java.util.List<java.lang.Class<?>>)`. |

## Public functions

### build

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

```
fun build(): GlobalSearchApplicationInfo
```

Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo`.

### setDocumentClasses

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

```
fun setDocumentClasses(schemaClasses: (Mutable)List<Class<*>>): T
```

Sets the list of schemas this app is capable of producing (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`).

This method is equivalent to `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.BuilderImpl#setSchemaTypes(java.util.List<java.lang.String>)` but accepts document classes instead of schema name strings.

| Parameters |
|---|---|
| `schemaClasses: (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/java/lang/Class.html<*>>` | A list of classes annotated with the @`https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document` annotation which correspond to the schemas this app produces or consumes. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/exceptions/AppSearchException` | if the schemaClasses are not @`https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document`-annotated classes or extraction of the schema name fails. |

### setSchemaTypes

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

```
fun setSchemaTypes(schemaTypes: (Mutable)List<String>): T
```

Sets the list of schema type names this app is capable of producing (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()` is `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#APPLICATION_TYPE_PRODUCER()`) or interested in consuming (if `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo#getApplicationType()`).

This method is equivalent to `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/GlobalSearchApplicationInfo.BuilderImpl#setDocumentClasses(java.util.List<java.lang.Class<?>>)` but accepts schema name strings instead of extracting schema information from document classes.

## Protected properties

### mApplicationType

```
protected val mApplicationType: Int
```

### mId

```
protected val mId: String!
```

### mNamespace

```
protected val mNamespace: String!
```

### mSchemaTypes

```
protected val mSchemaTypes: (Mutable)List<String!>!
```