ContactPoint.Builder


@Document.BuilderProducer
class ContactPoint.Builder : ContactPoint.BuilderBase


Builder for ContactPoint.

Summary

Public constructors

Builder(contactPoint: ContactPoint)

Constructor for Builder with all the existing values of a ContactPoint.

Builder(namespace: String, id: String, label: String)

Constructor for ContactPoint.Builder.

Inherited functions

From androidx.appsearch.builtintypes.ContactPoint.BuilderBase
ContactPoint

Builds the ContactPoint.

T

Sets the flattened postal addresses.

T

Sets the email addresses.

T
setTelephones(telephones: (Mutable)List<String!>)

Sets the telephone numbers.

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.

Thing

Builds a Thing object.

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

Builder

Added in 1.1.0
Builder(contactPoint: ContactPoint)

Constructor for Builder with all the existing values of a ContactPoint.

Builder

Added in 1.1.0
Builder(namespace: String, id: String, label: String)

Constructor for ContactPoint.Builder.

Parameters
namespace: String

Namespace for the ContactPoint Document. See Document.Namespace.

id: String

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

label: String

Label of this ContactPoint document. It could be "Home", "Work" or anything user defined.