@ExperimentalAppSearchApi
class Person.BuilderBase<T : Person.BuilderBase<T!>?> : Thing.BuilderBase

Known direct subclasses
Person.Builder

Builder class for Person.


Summary

Public constructors

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

BuilderBase(namespace: String, id: String, name: String)

Constructor for Person.BuilderBase.

Public functions

Person

Builds the Person.

T

Sets a list of AdditionalName for that Person.

T
setAffiliations(affiliations: (Mutable)List<String!>)

Sets a list of affiliations for this Person.

T
setBot(isBot: Boolean)

Sets whether this Person is a bot.

T

Sets a list of ContactPoint for the Person.

T

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

T
setExternalUri(externalUri: Uri)

Sets an external Uri for this Person.

T
setFamilyName(familyName: String)

Sets the family name of this Person.

T
setGivenName(givenName: String)

Sets the given name of this Person.

T

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

T
setImageUri(imageUri: Uri)

Sets the Uri of the profile image for the Person.

T
setImportant(isImportant: Boolean)

Sets whether this Person is important.

T

Sets whether this Person is a bot.

T

Sets whether this Person is important.

T
setMiddleName(middleName: String)

Sets the middle name of this Person.

T

Sets the notes about this Person.

T

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

Inherited functions

From androidx.appsearch.builtintypes.Thing.BuilderBase
T
addAlternateName(alternateName: String)

Adds an alias for the item.

T

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

T

Clears the aliases, if any, for the item.

T

Clear all the potential actions for this document.

Unit

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

T
setAlternateNames(alternateNames: (Mutable)List<String!>?)

Sets a list of aliases for the item.

T
setCreationTimestampMillis(creationTimestampMillis: Long)

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

T
setDescription(description: String?)

Sets the description for the item.

T
setDocumentScore(documentScore: Int)

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

T
setDocumentTtlMillis(documentTtlMillis: Long)

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

T

Sets the URL for an image of the item.

T
setName(name: String?)

Sets the name of the item.

T

Sets a list of potential actions for this document.

T
setUrl(url: String?)

Sets the deeplink URL of the item.

Public constructors

BuilderBase

Added in 1.2.0-alpha02
BuilderBase(person: Person)

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

Parameters
person: Person

The existing Person to copy values from.

BuilderBase

Added in 1.2.0-alpha02
BuilderBase(namespace: String, id: String, name: String)

Constructor for Person.BuilderBase.

Parameters
namespace: String

Namespace for the Person Document. See Document.Namespace.

id: String

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

name: String

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

Public functions

build

fun build(): Person

Builds the Person.

setAdditionalNames

Added in 1.2.0-alpha02
fun setAdditionalNames(
    additionalNames: (Mutable)List<Person.AdditionalName!>
): T

Sets a list of AdditionalName for that Person.

Only types defined in AdditionalName.NameType are accepted.

setAffiliations

Added in 1.2.0-alpha02
fun setAffiliations(affiliations: (Mutable)List<String!>): T

Sets a list of affiliations for this Person. Like company, school, etc.

setBot

Added in 1.2.0-alpha02
fun setBot(isBot: Boolean): T

Sets whether this Person is a bot.

setContactPoints

Added in 1.2.0-alpha02
fun setContactPoints(contactPoints: (Mutable)List<ContactPoint!>): T

Sets a list of ContactPoint for the Person.

More information could be found in ContactPoint.

setExternalUri

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
fun setExternalUri(externalUri: String): T

Sets the external Uri from a String representation for this Person. A Uri can be any of the following:

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

setExternalUri

Added in 1.2.0-alpha02
fun setExternalUri(externalUri: Uri): T

Sets an external Uri for this Person. Or null if no Uri is provided. A Uri can be any of the following:

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

setFamilyName

Added in 1.2.0-alpha02
fun setFamilyName(familyName: String): T

Sets the family name of this Person.

setGivenName

Added in 1.2.0-alpha02
fun setGivenName(givenName: String): T

Sets the given name of this Person.

setImageUri

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
fun setImageUri(imageUri: String): T

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

setImageUri

Added in 1.2.0-alpha02
fun setImageUri(imageUri: Uri): T

Sets the Uri of the profile image for the Person.

setImportant

Added in 1.2.0-alpha02
fun setImportant(isImportant: Boolean): T

Sets whether this Person is important.

setIsBot

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
fun setIsBot(isBot: Boolean): T

Sets whether this Person is a bot.

setIsImportant

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
fun setIsImportant(isImportant: Boolean): T

Sets whether this Person is important.

setMiddleName

Added in 1.2.0-alpha02
fun setMiddleName(middleName: String): T

Sets the middle name of this Person.

For Person with multiple middle names, they can all be set in this single string. Each middle name could be separated by a whitespace like "middleName1 middleName2 middleName3".

setNotes

Added in 1.2.0-alpha02
fun setNotes(notes: (Mutable)List<String!>): T

Sets the notes about this Person.

setRelations

Added in 1.2.0-alpha02
fun setRelations(relations: (Mutable)List<String!>): T

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