# Person.Builder

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

*** ** * ** ***


```
@Document.BuilderProducer
public final class Person.Builder extends Person.BuilderBase<Person.Builder>
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase) |||
|   | ↳ | [androidx.appsearch.builtintypes.Person.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase)\<[Person.Builder](https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder)\> ||
|   |   | ↳ | [androidx.appsearch.builtintypes.Person.Builder](https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder) |

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder#Builder(androidx.appsearch.builtintypes.Person)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Person person)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder` with all the existing values of an `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. |
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder#Builder(java.lang.String,java.lang.String,java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html namespace, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html id, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder`. |

### Inherited methods

From [androidx.appsearch.builtintypes.Person.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#build()()`

Builds the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setAdditionalNames(java.util.List<androidx.appsearch.builtintypes.Person.AdditionalName>)(@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> additionalNames)`

Sets a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.AdditionalName` for that `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setAffiliations(java.util.List<java.lang.String>)(@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> affiliations)`

Sets a list of affiliations for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setBot(boolean)(boolean isBot)`

Sets whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is a bot.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setContactPoints(java.util.List<androidx.appsearch.builtintypes.ContactPoint>)(@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> contactPoints)`

Sets a list of `https://developer.android.com/reference/androidx/appsearch/builtintypes/ContactPoint` for the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setExternalUri(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html externalUri)`

Sets the external `https://developer.android.com/reference/android/net/Uri.html` from a `https://developer.android.com/reference/java/lang/String.html` representation for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setExternalUri(android.net.Uri)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/net/Uri.html externalUri)`

Sets an external `https://developer.android.com/reference/android/net/Uri.html` for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setFamilyName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html familyName)`

Sets the family name of this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setGivenName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html givenName)`

Sets the given name of this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setImageUri(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html imageUri)`

Sets the `https://developer.android.com/reference/android/net/Uri.html` of the profile image from a `https://developer.android.com/reference/java/lang/String.html` representation for the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setImageUri(android.net.Uri)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/net/Uri.html imageUri)`

Sets the `https://developer.android.com/reference/android/net/Uri.html` of the profile image for the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setImportant(boolean)(boolean isImportant)`

Sets whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is important.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setIsBot(boolean)(boolean isBot)`

Sets whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is a bot.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setIsImportant(boolean)(boolean isImportant)`

Sets whether this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` is important.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setMiddleName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html middleName)`

Sets the middle name of this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setNotes(java.util.List<java.lang.String>)(@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> notes)`

Sets the notes about this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.BuilderBase#setRelations(java.util.List<java.lang.String>)(@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> relations)`

Sets a list of relations for this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`, like "Father" or "Mother".
From [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#addAlternateName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html alternateName)`

Adds an alias for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#addPotentialAction(androidx.appsearch.builtintypes.PotentialAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction newPotentialAction)`

Add a new action to the list of potential actions for this document.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#build()()`

Builds a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` object.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#clearAlternateNames()()`

Clears the aliases, if any, for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#clearPotentialActions()()`

Clear all the potential actions for this document.
`void` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#resetIfBuilt()()`

If built, make a copy of previous data for every field so that the builder can be reused.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setAlternateNames(java.util.List<java.lang.String>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> alternateNames)`

Sets a list of aliases for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setCreationTimestampMillis(long)(long creationTimestampMillis)`

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.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setDescription(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html description)`

Sets the description for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentScore(int)(int documentScore)`

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

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setImage(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html image)`

Sets the URL for an image of the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html name)`

Sets the name of the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setPotentialActions(java.util.List<androidx.appsearch.builtintypes.PotentialAction>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction> newPotentialActions)`

Sets a list of potential actions for this document.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setUrl(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html url)`

Sets the deeplink URL of the item.

## Public constructors

### Builder

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

```
public Builder(@NonNull Person person)
```

Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person.Builder` with all the existing values of an `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`.

### Builder

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

```
public Builder(@NonNull String namespace, @NonNull String id, @NonNull String name)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html namespace` | Namespace for the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` Document. See `https://developer.android.com/reference/androidx/appsearch/annotation/Document.Namespace`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html id` | Unique identifier for the `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person` Document. See `https://developer.android.com/reference/androidx/appsearch/annotation/Document.Id`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name` | The searchable full name of this `https://developer.android.com/reference/androidx/appsearch/builtintypes/Person`. E.g. "Larry Page", or "Page, Larry". |