@Document.BuilderProducer
public final class Person.Builder extends Person.BuilderBase


Builder class for Person.

Summary

Public constructors

Constructor for Builder with all the existing values of an Person.

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

Constructor for Person.Builder.

Inherited methods

From androidx.appsearch.builtintypes.Person.BuilderBase
@NonNull Person

Builds the Person.

@NonNull T

Sets a list of AdditionalName for that Person.

@NonNull T

Sets a list of affiliations for this Person.

@NonNull T
setBot(boolean isBot)

Sets whether this Person is a bot.

@NonNull T

Sets a list of ContactPoint for the Person.

@NonNull T

Sets the external Uri from a String representation for this Person.

@NonNull T
setExternalUri(@NonNull Uri externalUri)

Sets an external Uri for this Person.

@NonNull T

Sets the family name of this Person.

@NonNull T

Sets the given name of this Person.

@NonNull T

Sets the Uri of the profile image from a String representation for the Person.

@NonNull T
setImageUri(@NonNull Uri imageUri)

Sets the Uri of the profile image for the Person.

@NonNull T
setImportant(boolean isImportant)

Sets whether this Person is important.

@NonNull T

Sets whether this Person is a bot.

@NonNull T

Sets whether this Person is important.

@NonNull T

Sets the middle name of this Person.

@NonNull T

Sets the notes about this Person.

@NonNull T

Sets a list of relations for this Person, like "Father" or "Mother".

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull Thing

Builds a Thing object.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

Builder

Added in 1.1.0
public Builder(@NonNull Person person)

Constructor for Builder with all the existing values of an Person.

Builder

Added in 1.1.0
public Builder(@NonNull String namespace, @NonNull String id, @NonNull String name)

Constructor for Person.Builder.

Parameters
@NonNull String namespace

Namespace for the Person Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Person Document. See Document.Id.

@NonNull String name

The searchable full name of this Person. E.g. "Larry Page", or "Page, Larry".