# Person

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

*** ** * ** ***


```
@Document(name = "builtin:Person")
public class Person 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.Person](https://developer.android.com/reference/androidx/appsearch/builtintypes/Person) |

*** ** * ** ***

AppSearch document representing a Person entity modeled after [Person](http://schema.org/Person).

The `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` document includes commonly searchable properties such as name, organization, and notes, as well as contact information such as phone numbers, email addresses, etc, grouped by their label. The labeled contact information is present in a nested `https://developer.android.com/reference/androidx/appsearch/builtintypes/ContactPoint` document.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.AdditionalName` Holds type information for additional names for Person. |
| `@https://developer.android.com/reference/androidx/appsearch/annotation/Document.BuilderProducer public final class https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder extends https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase<https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder>` Builder class for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi public class https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase<T extends https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.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/Person#Person(androidx.appsearch.builtintypes.Person.BuilderBase<?>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |

| ### 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/Person#getAdditionalNames()()` Returns a list of additional names for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getAffiliations()()` Returns a list of affiliation for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/ContactPoint>` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#getContactPoints()()` Returns a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/ContactPoint`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#getExternalUri()()` Returns an external uri for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getFamilyName()()` Returns the family (or last) name for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getGivenName()()` Returns the given (or first) name for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#getImageUri()()` Returns `https://developer.android.com/reference/android/net/Uri.html` of the profile image for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getMiddleName()()` Returns the middle name(s) for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getNotes()()` Returns the notes about this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `@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/Person#getRelations()()` Returns a list of relations for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`, like "Father" or "Mother". |
| `@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/Person.AdditionalName>` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#getTypedAdditionalNames()()` Returns a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.AdditionalName` for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#isBot()()` Returns whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is a machine rather than a human. |
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#isImportant()()` Returns whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is important to the user of this device with regards to how frequently they interact. |

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

### Person

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

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

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

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

## Public methods

### getAdditionalNames

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

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

Returns a list of additional names for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

Additional names can include something like phonetic names, or nicknames.

Different from `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person#getTypedAdditionalNames()`, the return value doesn't include type information for the additional names.

### getAffiliations

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

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

Returns a list of affiliation for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. Like company, school, etc.

For a contact with the title "Software Engineer" in a department "Engineering" at a company "Cloud Company", this can include a flattened value of "Software Engineer, Engineering, Cloud Company".

### getContactPoints

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

```
public @NonNull List<ContactPoint> getContactPoints()
```

Returns a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/ContactPoint`.

More information can be found in `https://developer.android.com/reference/androidx/appsearch/builtintypes/ContactPoint`.

### getExternalUri

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

```
public @Nullable Uri getExternalUri()
```

Returns an external uri for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. Or `null` if no `https://developer.android.com/reference/android/net/Uri.html` is provided. A `https://developer.android.com/reference/android/net/Uri.html` can be any of the following:

- A `https://developer.android.com/reference/android/provider/ContactsContract.Contacts.html#CONTENT_LOOKUP_URI`.
- A `mailto:` schema\*
- A `tel:` schema\*

For mailto: and tel: URI schemes, it is recommended that the path portion refers to a valid contact in the Contacts Provider.

### getFamilyName

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

```
public @Nullable String getFamilyName()
```

Returns the family (or last) name for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

### getGivenName

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

```
public @Nullable String getGivenName()
```

Returns the given (or first) name for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

### getImageUri

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

```
public @Nullable Uri getImageUri()
```

Returns `https://developer.android.com/reference/android/net/Uri.html` of the profile image for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

### getMiddleName

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

```
public @Nullable String getMiddleName()
```

Returns the middle name(s) for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

For a Person with multiple middle names, this method returns a flattened and whitespace separated list. For example, "middle1 middle2 ..."

### getNotes

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

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

Returns the notes about this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

### getRelations

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

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

Returns a list of relations for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`, like "Father" or "Mother".

### getTypedAdditionalNames

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

```
public @NonNull List<Person.AdditionalName> getTypedAdditionalNames()
```

Returns a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.AdditionalName` for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

Additional names can include something like phonetic names, or nicknames.

Each `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.AdditionalName` contains type information for the additional name.

### isBot

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

```
public boolean isBot()
```

Returns whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is a machine rather than a human.

### isImportant

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

```
public boolean isImportant()
```

Returns whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is important to the user of this device with regards to how frequently they interact.