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


Summary

Public constructors

Builder(sportsEvent: SportsEvent)

Constructor with all the existing values.

Builder(
    namespace: String,
    id: String,
    startDate: Instant,
    sport: String,
    homeTeam: SportsTeam,
    awayTeam: SportsTeam
)

Constructor for SportsEvent.Builder.

Inherited functions

From androidx.appsearch.builtintypes.Event.BuilderBase
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.

From androidx.appsearch.builtintypes.SportsEvent.BuilderBase
SportsEvent

Builds a Thing object.

T
setAwayTeamAccessoryScore(awayTeamAccessoryScore: String?)

Sets the away team accessory score of the sports event.

T
setAwayTeamScore(awayTeamScore: String?)

Sets the away team score of the sports event.

T
setAwayTeamWinProbability(awayTeamWinProbability: Double)

Sets the away team win probability of the sports event.

T
setGameTemporalState(gameTemporalState: String?)

Sets the game temporal state of the sports event.

T
setHomeTeamAccessoryScore(homeTeamAccessoryScore: String?)

Sets the home team accessory score of the sports event.

T
setHomeTeamScore(homeTeamScore: String?)

Sets the home team score of the sports event.

T
setHomeTeamWinProbability(homeTeamWinProbability: Double)

Sets the home team win probability of the sports event.

T
setNotableDetail(notableDetail: String?)

Sets the most recent notable detail of the sports event.

T

Sets the Organization of the sports event.

T
setPlaceHomeTeamAtStart(placeHomeTeamAtStart: Boolean)

Sets whether the home team should be placed at the start for a visual representation of the sports event.

T
setResult(result: Long)

Sets whether the home team won the sports event.

T
setSportsEventStatus(sportsEventStatus: Long)

Sets the status of the sports event.

T
setSportsEventStatusLabel(sportsEventStatusLabel: String?)

Sets the status label of the sports event.

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.2.0-alpha02
Builder(sportsEvent: SportsEvent)

Constructor with all the existing values.

Builder

Added in 1.2.0-alpha02
Builder(
    namespace: String,
    id: String,
    startDate: Instant,
    sport: String,
    homeTeam: SportsTeam,
    awayTeam: SportsTeam
)

Constructor for SportsEvent.Builder.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

Unique identifier for the Document. See Document.Id.

startDate: Instant

The start date of the sports event.

sport: String

The sport of the sports event.

homeTeam: SportsTeam

The home team of the sports event.

awayTeam: SportsTeam

The away team of the sports event.