AlarmInstance.BuilderBase


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

Known direct subclasses

Summary

Public constructors

Constructor for AlarmInstance.BuilderBase with all the existing values.

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

Constructor for AlarmInstance.BuilderBase.

Public methods

@NonNull AlarmInstance

Builds the AlarmInstance.

@NonNull T
setSnoozeDurationMillis(long snoozeDurationMillis)

Sets the length of time in milliseconds the AlarmInstance will remain snoozed before it fires again.

@NonNull T
setStatus(int status)

Sets the current status.

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 AlarmInstance alarmInstance)

Constructor for AlarmInstance.BuilderBase with all the existing values.

Parameters
@NonNull AlarmInstance alarmInstance

The existing AlarmInstance to copy values from.

BuilderBase

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

Constructor for AlarmInstance.BuilderBase.

Parameters
@NonNull String namespace

Namespace for the Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Document. See Document.Id.

@NonNull String scheduledTime

The time that this is expected to fire in ISO 8601 format. E.g.: 2022-01-14T00:00:00. Scheduled time should be timezone independent.

Public methods

build

public @NonNull AlarmInstance build()

Builds the AlarmInstance.

setSnoozeDurationMillis

Added in 1.2.0-alpha02
public @NonNullsetSnoozeDurationMillis(long snoozeDurationMillis)

Sets the length of time in milliseconds the AlarmInstance will remain snoozed before it fires again.

If not set, or set to -1, then it does not support snoozing.

setStatus

Added in 1.2.0-alpha02
public @NonNullsetStatus(int status)

Sets the current status.

Status can be either STATUS_UNKNOWN, STATUS_SCHEDULED, STATUS_FIRING, STATUS_DISMISSED, STATUS_SNOOZED, or STATUS_MISSED.