# Thing

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

*** ** * ** ***


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

<br />

Known direct subclasses [AlarmInstance](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/AlarmInstance), [Alarm](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Alarm), [ContactPoint](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ContactPoint), [Event](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Event), [ImageObject](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject), [MobileApplication](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication), [Organization](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization), [Person](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Person), [StopwatchLap](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/StopwatchLap), [Stopwatch](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Stopwatch), [Timer](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Timer), [WebPage](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/WebPage)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/AlarmInstance` | AppSearch document representing an `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/AlarmInstance` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Alarm` | AppSearch document representing an `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Alarm` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ContactPoint` | A group of contact information corresponding to a label such as "Home" or "Work". |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Event` | AppSearch document representing an `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Event` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject` | Represents an image file. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/MobileApplication` | Represents an installed app to enable searching using names, nicknames, and package names. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization` | AppSearch document representing an `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Person` | AppSearch document representing a Person entity modeled after [Person](http://schema.org/Person). |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/StopwatchLap` | An AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/StopwatchLap` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Stopwatch` | An AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Stopwatch` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Timer` | AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Timer` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/WebPage` | AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/WebPage` entity. |

Known indirect subclasses [SportsEvent](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsEvent), [SportsOrganization](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization), [SportsTeam](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsEvent` | AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsEvent` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization` | AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization` entity. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam` | AppSearch document representing a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam` entity. |

*** ** * ** ***

AppSearch document representing a [Thing](http://schema.org/Thing), the most generic type of an item.

## Summary

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

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#Thing(androidx.appsearch.builtintypes.Thing.BuilderBase<?>)(builder: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase<*>)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing`. |

| ### Public functions |
|---|---|
| `(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/Thing#getAlternateNames()()` Returns an unmodifiable list of aliases, if any, for this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()()` Returns the creation timestamp, in milliseconds since Unix epoch, of this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getDescription()()` Returns a description of this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getDocumentScore()()` Returns the intrinsic score (or importance) of this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getDocumentTtlMillis()()` Returns the time-to-live timestamp, in milliseconds since `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()`, for this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getId()()` Returns the unique identifier for this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getImage()()` Returns the URL for an image of this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getName()()` Returns the name of this item. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getNamespace()()` Returns the namespace (or logical grouping) for this item. |
| `(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!>` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getPotentialActions()()` Returns the actions that can be taken on this object. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getUrl()()` Returns the deeplink URL of this item. |

## Public constructors

### Thing

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

```
@ExperimentalAppSearchApi
Thing(builder: Thing.BuilderBase<*>)
```

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

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase<*>` | The builder to construct the `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` from. |

## Public functions

### getAlternateNames

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

```
fun getAlternateNames(): (Mutable)List<String!>
```

Returns an unmodifiable list of aliases, if any, for this item.

### getCreationTimestampMillis

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

```
fun getCreationTimestampMillis(): Long
```

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.

### getDescription

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

```
fun getDescription(): String?
```

Returns a description of this item.

### getDocumentScore

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

```
fun getDocumentScore(): Int
```

Returns the intrinsic score (or importance) of this item.

### getDocumentTtlMillis

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

```
fun getDocumentTtlMillis(): Long
```

Returns the time-to-live timestamp, in milliseconds since `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()`, for this item.

### getId

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

```
fun getId(): String
```

Returns the unique identifier for this item.

### getImage

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

```
@ExperimentalAppSearchApi
fun getImage(): String?
```

Returns the URL for an image of this item.

### getName

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

```
fun getName(): String?
```

Returns the name of this item.

### getNamespace

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

```
fun getNamespace(): String
```

Returns the namespace (or logical grouping) for this item.

### getPotentialActions

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

```
@ExperimentalAppSearchApi
fun getPotentialActions(): (Mutable)List<PotentialAction!>
```

Returns the actions that can be taken on this object.

### getUrl

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

```
fun getUrl(): String?
```

Returns the deeplink URL of this item.

This item can be opened (or viewed) by creating an `https://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW` intent with this URL as the `https://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri)` uri.

| See also |
|---|---|
| `https://reference/android/content/Intent#intent-structure` | [Intent Structure](https://reference/android/content/Intent#intent-structure) |