# ImageObject

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) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
@Document(name = "builtin:ImageObject")
public class ImageObject extends Thing
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.appsearch.builtintypes.Thing](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing) ||
|   | ↳ | [androidx.appsearch.builtintypes.ImageObject](https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject) |

*** ** * ** ***

Represents an image file.

See <http://schema.org/ImageObject> for more context.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/androidx/appsearch/annotation/Document.BuilderProducer public final class https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.Builder extends https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.BuilderBase<https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.Builder>` Builder for `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject`. |
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi public class https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.BuilderBase<T extends https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.BuilderBase<T>> extends https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase<T>` |

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#ImageObject(androidx.appsearch.builtintypes.ImageObject.BuilderBase<?>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html byte[]` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#getBytes()()` Returns the byte representation of this image or video. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/builtintypes/properties/Keyword>` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#getKeywords()()` Keywords or tags used to describe some item. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#getSha256()()` The SHA-2 SHA256 hash of the content of the item. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#getThumbnailSha256()()` Returns the `sha256` for the thumbnail of this image or video. |
| `int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject#hashCode()()` |

### Inherited methods

From [androidx.appsearch.builtintypes.Thing](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getAlternateNames()()`

Returns an unmodifiable list of aliases, if any, for this item.
`long` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()()`

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDescription()()`

Returns a description of this item.
`int` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDocumentScore()()`

Returns the intrinsic score (or importance) of this item.
`long` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDocumentTtlMillis()()`

Returns the time-to-live timestamp, in milliseconds since `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()`, for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getId()()`

Returns the unique identifier for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getImage()()`

Returns the URL for an image of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getName()()`

Returns the name of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getNamespace()()`

Returns the namespace (or logical grouping) for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction>` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getPotentialActions()()`

Returns the actions that can be taken on this object.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getUrl()()`

Returns the deeplink URL of this item.

## Public constructors

### ImageObject

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

```
@ExperimentalAppSearchApi
public ImageObject(@NonNull ImageObject.BuilderBase<@NonNull ?> builder)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder` | The builder to construct the `https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject` from. |

## Public methods

### equals

```
public boolean equals(Object o)
```

### getBytes

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

```
public @Nullable byte[] getBytes()
```

Returns the byte representation of this image or video. Can be a compressed bitmap (e.g. JPEG or PNG).

### getKeywords

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

```
public @NonNull List<Keyword> getKeywords()
```

Keywords or tags used to describe some item.

See <http://schema.org/keywords> for more context.

### getSha256

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

```
public @Nullable String getSha256()
```

The SHA-2 SHA256 hash of the content of the item. For example, a zero-length input has value 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'.

See <http://schema.org/sha256> for more context.

### getThumbnailSha256

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

```
public @Nullable String getThumbnailSha256()
```

Returns the `sha256` for the thumbnail of this image or video.

### hashCode

```
public int hashCode()
```