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

Known indirect subclasses

Builder for Event.

Summary

Public constructors

Constructor for Event.BuilderBase with all the existing values.

BuilderBase(namespace: String, id: String, startDate: Instant)

Constructor for Event.BuilderBase.

Public functions

Event

Builds a Thing object.

T
setDuration(duration: Duration?)

Sets the duration of the event as a Duration.

T
setEndDate(endDate: Instant?)

Sets the end date of the event as a Instant.

T
setLocation(location: String?)

Sets the location of the event.

T

Sets the logo of the event.

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(event: Event)

Constructor for Event.BuilderBase with all the existing values.

Parameters
event: Event

The existing Event to copy values from.

BuilderBase

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

Constructor for Event.BuilderBase.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

The unique identifier for the Document.

startDate: Instant

The start date of the event.

Public functions

build

fun build(): Event

Builds a Thing object.

setDuration

Added in 1.2.0-alpha02
fun setDuration(duration: Duration?): T

Sets the duration of the event as a Duration.

Parameters
duration: Duration?

The duration of the event.

setEndDate

Added in 1.2.0-alpha02
fun setEndDate(endDate: Instant?): T

Sets the end date of the event as a Instant.

Parameters
endDate: Instant?

The end date of the event.

setLocation

Added in 1.2.0-alpha02
fun setLocation(location: String?): T

Sets the location of the event. A freeform string describing the Event location. This could be a venue name, a string representation of a street address, or a string representation of a latitude/longitude pair. For example, "Some Place" or "123 Main Street, Anytown, CA" or "37.7749,-122.4194".

setLogo

Added in 1.2.0-alpha02
fun setLogo(logo: ImageObject?): T

Sets the logo of the event.