# 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")
public class Thing
```

<br />

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

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

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

|---|---|
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsEvent` | AppSearch document representing a `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsEvent` entity. |
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsOrganization` | AppSearch document representing a `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsOrganization` entity. |
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam` | AppSearch document representing a `https://developer.android.com/reference/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/androidx/appsearch/annotation/Document.BuilderProducer public final class https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.Builder extends https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase<https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.Builder>` Builder for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing`. |
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi public class https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.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/Thing#Thing(androidx.appsearch.builtintypes.Thing.BuilderBase<?>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing`. |

| ### Public methods |
|---|---|
| `@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

### Thing

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

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

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

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

## Public methods

### getAlternateNames

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

```
public @NonNull List<String> getAlternateNames()
```

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)

```
public long getCreationTimestampMillis()
```

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)

```
public @Nullable String getDescription()
```

Returns a description of this item.

### getDocumentScore

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

```
public int getDocumentScore()
```

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)

```
public long getDocumentTtlMillis()
```

Returns the time-to-live timestamp, in milliseconds since `https://developer.android.com/reference/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)

```
public @NonNull String getId()
```

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
public @Nullable String getImage()
```

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)

```
public @Nullable String getName()
```

Returns the name of this item.

### getNamespace

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

```
public @NonNull String getNamespace()
```

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
public @NonNull List<PotentialAction> getPotentialActions()
```

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)

```
public @Nullable String getUrl()
```

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) |