AlarmInstance.BuilderBase


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

Known direct subclasses

Summary

Public constructors

BuilderBase(alarmInstance: AlarmInstance)

Constructor for AlarmInstance.BuilderBase with all the existing values.

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

Constructor for AlarmInstance.BuilderBase.

Public functions

AlarmInstance

Builds the AlarmInstance.

T
setSnoozeDurationMillis(snoozeDurationMillis: Long)

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

T
setStatus(status: Int)

Sets the current status.

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

Constructor for AlarmInstance.BuilderBase with all the existing values.

Parameters
alarmInstance: AlarmInstance

The existing AlarmInstance to copy values from.

BuilderBase

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

Constructor for AlarmInstance.BuilderBase.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

Unique identifier for the Document. See Document.Id.

scheduledTime: String

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 functions

build

fun build(): AlarmInstance

Builds the AlarmInstance.

setSnoozeDurationMillis

Added in 1.2.0-alpha02
fun setSnoozeDurationMillis(snoozeDurationMillis: Long): T

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
fun setStatus(status: Int): T

Sets the current status.

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