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

# AppSearchAccount.Builder

*** ** * ** ***

` public static final class AppSearchAccount.Builder `   
` ` ` extends https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder<https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder> ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.app.appsearch.GenericDocument.Builder](https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder)\<[android.app.appsearch.AppSearchAccount.Builder](https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder)\> ||
|   | ↳ | android.app.appsearch.AppSearchAccount.Builder |

<br />

*** ** * ** ***

The builder class for `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder#Builder(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String namespace, https://developer.android.com/reference/java/lang/String id) ` Creates a new `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount` | ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder#build()() ` Builds the `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount` object. |
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder` | ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder#setAccountId(java.lang.String)(https://developer.android.com/reference/java/lang/String accountId) ` Sets the account id of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`. |
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder` | ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder#setAccountName(java.lang.String)(https://developer.android.com/reference/java/lang/String accountName) ` Sets the name of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`. |
| ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder` | ` https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder#setAccountType(java.lang.String)(https://developer.android.com/reference/java/lang/String accountType) ` Sets the type of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`. |

### Inherited methods

From class ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder ` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#build()() `

Builds the `https://developer.android.com/reference/android/app/appsearch/GenericDocument` object.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#clearProperty(java.lang.String)(https://developer.android.com/reference/java/lang/String name) `

Clears the value for the property with the given name.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setCreationTimestampMillis(long)(long creationTimestampMillis) `

Sets the creation timestamp of the `https://developer.android.com/reference/android/app/appsearch/GenericDocument`, in milliseconds.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setId(java.lang.String)(https://developer.android.com/reference/java/lang/String id) `

Sets the ID of this document, changing the value provided in the constructor.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setNamespace(java.lang.String)(https://developer.android.com/reference/java/lang/String namespace) `

Sets the app-defined namespace this document resides in, changing the value provided in the constructor.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyBlobHandle(java.lang.String,%20android.app.appsearch.AppSearchBlobHandle[])(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/android/app/appsearch/AppSearchBlobHandle values) `

Sets one or multiple `https://developer.android.com/reference/android/app/appsearch/AppSearchBlobHandle` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyBoolean(java.lang.String,%20boolean[])(https://developer.android.com/reference/java/lang/String name, boolean... values) `

Sets one or multiple `boolean` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyBytes(java.lang.String,%20byte[][])(https://developer.android.com/reference/java/lang/String name, byte... values) `

Sets one or multiple `byte[]` for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyDocument(java.lang.String,%20android.app.appsearch.GenericDocument[])(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/android/app/appsearch/GenericDocument values) `

Sets one or multiple `https://developer.android.com/reference/android/app/appsearch/GenericDocument` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyDouble(java.lang.String,%20double[])(https://developer.android.com/reference/java/lang/String name, double... values) `

Sets one or multiple `double` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyEmbedding(java.lang.String,%20android.app.appsearch.EmbeddingVector[])(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/android/app/appsearch/EmbeddingVector values) `

Sets one or multiple `EmbeddingVector` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyLong(java.lang.String,%20long[])(https://developer.android.com/reference/java/lang/String name, long... values) `

Sets one or multiple `long` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setPropertyString(java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String values) `

Sets one or multiple `String` values for a property, replacing its previous values.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setSchemaType(java.lang.String)(https://developer.android.com/reference/java/lang/String schemaType) `

Sets the schema type of this document, changing the value provided in the constructor.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setScore(int)(int score) `

Sets the score of the `https://developer.android.com/reference/android/app/appsearch/GenericDocument`.
` BuilderType` ` https://developer.android.com/reference/android/app/appsearch/GenericDocument.Builder#setTtlMillis(long)(long ttlMillis) `

Sets the TTL (time-to-live) of the `https://developer.android.com/reference/android/app/appsearch/GenericDocument`, in milliseconds.
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)  
Also in [T Extensions 22](https://developer.android.com/sdkExtensions)

```
public Builder (String namespace, 
                String id)
```

Creates a new `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount.Builder`

<br />

| Parameters ||
|---|---|
| `namespace` | `String`: The namespace of the account. This value cannot be `null`. <br /> |
| `id` | `String`: The document ID of the account. This value cannot be `null`. <br /> |

## Public methods

### build

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

```
public AppSearchAccount build ()
```

Builds the `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount` object.

<br />

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

### setAccountId

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

```
public AppSearchAccount.Builder setAccountId (String accountId)
```

Sets the account id of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`.

<br />

| Parameters ||
|---|---|
| `accountId` | `String`: A non-null, permanent identifier for the account. <br /> |

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

### setAccountName

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

```
public AppSearchAccount.Builder setAccountName (String accountName)
```

Sets the name of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`.

<br />

| Parameters ||
|---|---|
| `accountName` | `String`: The non-null name for the specific user account. <br /> |

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

### setAccountType

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

```
public AppSearchAccount.Builder setAccountType (String accountType)
```

Sets the type of `https://developer.android.com/reference/android/app/appsearch/AppSearchAccount`.

<br />

| Parameters ||
|---|---|
| `accountType` | `String`: The non-null, unique identifier for the account service. This must correspond to a registered `Authenticator` type on the system. <br /> |

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