ContactPoint.BuilderBase


@ExperimentalAppSearchApi
public class ContactPoint.BuilderBase<T extends ContactPoint.BuilderBase<T>> extends Thing.BuilderBase

Known direct subclasses

Summary

Public constructors

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

BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String label
)

Constructor for ContactPoint.BuilderBase.

Public methods

@NonNull ContactPoint

Builds the ContactPoint.

@NonNull T

Sets the flattened postal addresses.

@NonNull T

Sets the email addresses.

@NonNull T

Sets the telephone numbers.

Inherited methods

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

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(@NonNull ContactPoint contactPoint)

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

Parameters
@NonNull ContactPoint contactPoint

The existing ContactPoint to copy values from.

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String label
)

Constructor for ContactPoint.BuilderBase.

Parameters
@NonNull String namespace

Namespace for the ContactPoint Document. See Document.Namespace.

@NonNull String id

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

@NonNull String label

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

Public methods

build

public @NonNull ContactPoint build()

Builds the ContactPoint.

setAddresses

Added in 1.2.0-alpha02
public @NonNullsetAddresses(@NonNull List<String> addresses)

Sets the flattened postal addresses.

setEmails

Added in 1.2.0-alpha02
public @NonNullsetEmails(@NonNull List<String> emails)

Sets the email addresses.

setTelephones

Added in 1.2.0-alpha02
public @NonNullsetTelephones(@NonNull List<String> telephones)

Sets the telephone numbers.