# ImageObject.BuilderBase

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/ImageObject.java+class:androidx.appsearch.builtintypes.ImageObject.BuilderBase) Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

*** ** * ** ***


```
@ExperimentalAppSearchApi
class ImageObject.BuilderBase<T : ImageObject.BuilderBase<T!>?> : Thing.BuilderBase<T!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase)\<T!\> ||
|   | ↳ | [androidx.appsearch.builtintypes.ImageObject.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase) |

Known direct subclasses [ImageObject.Builder](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.Builder)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.Builder` | Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject`. |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#BuilderBase(androidx.appsearch.builtintypes.ImageObject)(copyFrom: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase` with all the existing values. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#BuilderBase(java.lang.String,java.lang.String)(namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase`. |

| ### Public functions |
|---|---|
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#addKeyword(androidx.appsearch.builtintypes.properties.Keyword)(keyword: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword)` Appends the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#addKeyword(java.lang.String)(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Appends the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword` as a Text i.e. `https://developer.android.com/reference/java/lang/String.html`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#addKeywords(java.lang.Iterable<androidx.appsearch.builtintypes.properties.Keyword>)(values: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterable/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword!>)` Appends all the `values`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#setBytes(byte[])(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>?)` Sets the byte representation of this image or video. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#setSha256(java.lang.String)(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets the `sha256`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase#setThumbnailSha256(java.lang.String)(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets the `sha256` of the thumbnail of this image of video. |

### Inherited functions

From [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase) `T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addAlternateName(java.lang.String)(alternateName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

Adds an alias for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addPotentialAction(androidx.appsearch.builtintypes.PotentialAction)(newPotentialAction: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/PotentialAction)`

Add a new action to the list of potential actions for this document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearAlternateNames()()`

Clears the aliases, if any, for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearPotentialActions()()`

Clear all the potential actions for this document.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#resetIfBuilt()()`

If built, make a copy of previous data for every field so that the builder can be reused.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setAlternateNames(java.util.List<java.lang.String>)(alternateNames: (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 a list of aliases for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setCreationTimestampMillis(long)(creationTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDescription(java.lang.String)(description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the description for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentScore(int)(documentScore: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchSpec#RANKING_STRATEGY_DOCUMENT_SCORE()`.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentTtlMillis(long)(documentTtlMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setImage(java.lang.String)(image: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the URL for an image of the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setName(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the name of the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setPotentialActions(java.util.List<androidx.appsearch.builtintypes.PotentialAction>)(
newPotentialActions: (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/kotlin/androidx/appsearch/builtintypes/PotentialAction!>?
)`

Sets a list of potential actions for this document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setUrl(java.lang.String)(url: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the deeplink URL of the item.

## Public constructors

### BuilderBase

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

```
BuilderBase(copyFrom: ImageObject)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase` with all the existing values.

| Parameters |
|---|---|
| `copyFrom: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject` | The existing `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject` to copy values from. |

### BuilderBase

```
BuilderBase(namespace: String, id: String)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject.BuilderBase`.

| Parameters |
|---|---|
| `namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Namespace for the Document. See `https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document.Namespace`. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Unique identifier for the Document. See `https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document.Id`. |

## Public functions

### addKeyword

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

```
fun addKeyword(keyword: Keyword): T
```

Appends the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword`.

### addKeyword

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

```
fun addKeyword(text: String): T
```

Appends the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/properties/Keyword` as a Text i.e. `https://developer.android.com/reference/java/lang/String.html`.

### addKeywords

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

```
fun addKeywords(values: (Mutable)Iterable<Keyword!>): T
```

Appends all the `values`.

### build

```
fun build(): ImageObject
```

Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object.

### setBytes

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

```
fun setBytes(bytes: ByteArray<Byte>?): T
```

Sets the byte representation of this image or video.

### setSha256

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

```
fun setSha256(text: String?): T
```

Sets the `sha256`.

### setThumbnailSha256

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

```
fun setThumbnailSha256(text: String?): T
```

Sets the `sha256` of the thumbnail of this image of video.