SportsTeam.BuilderBase


@ExperimentalAppSearchApi
class SportsTeam.BuilderBase<T : SportsTeam.BuilderBase<T!>?> : SportsOrganization.BuilderBase

Known direct subclasses

Builder for SportsTeam.

Summary

Public constructors

BuilderBase(sportsTeam: SportsTeam)

Constructor for SportsTeam.BuilderBase with all the existing values.

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

Constructor for SportsTeam.BuilderBase.

Public functions

SportsTeam

Builds a Thing object.

T
setFormattedRecord(formattedRecord: String?)

Sets the formatted record of the sports team. eg: "10 - 5", "10 - 5 (3 - 2)", "10 - 5 (3 - 2) - 1 OT" depending on the sport.

T
setLosses(losses: Long)

Sets the number of losses of the sports team.

T
setOvertimeLosses(overtimeLosses: Long)

Sets the number of overtime losses of the sports team.

T
setOvertimeWins(overtimeWins: Long)

Sets the number of overtime wins of the sports team.

T
setTies(ties: Long)

Sets the number of ties of the sports team.

T
setWins(wins: Long)

Sets the number of wins of the sports team.

Inherited functions

From androidx.appsearch.builtintypes.Organization.BuilderBase
Organization

Builds a Thing object.

T

Sets the logo of the organization.

From androidx.appsearch.builtintypes.SportsOrganization.BuilderBase
T
setAccentColor(accentColor: Color?)

Sets the accent color of the sports organization as a Color.

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

BuilderBase

Added in 1.2.0-alpha02
BuilderBase(sportsTeam: SportsTeam)

Constructor for SportsTeam.BuilderBase with all the existing values.

Parameters
sportsTeam: SportsTeam

The existing SportsTeam to copy values from.

BuilderBase

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

Constructor for SportsTeam.BuilderBase.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

The unique identifier for the Document.

sport: String

The sport of the sports team.

Public functions

build

fun build(): SportsTeam

Builds a Thing object.

setFormattedRecord

Added in 1.2.0-alpha02
fun setFormattedRecord(formattedRecord: String?): T

Sets the formatted record of the sports team. eg: "10 - 5", "10 - 5 (3 - 2)", "10 - 5 (3 - 2) - 1 OT" depending on the sport.

Parameters
formattedRecord: String?

The formatted record of the sports team.

setLosses

Added in 1.2.0-alpha02
fun setLosses(losses: Long): T

Sets the number of losses of the sports team.

Parameters
losses: Long

The number of losses of the sports team.

setOvertimeLosses

Added in 1.2.0-alpha02
fun setOvertimeLosses(overtimeLosses: Long): T

Sets the number of overtime losses of the sports team.

Parameters
overtimeLosses: Long

The number of overtime losses of the sports team.

setOvertimeWins

Added in 1.2.0-alpha02
fun setOvertimeWins(overtimeWins: Long): T

Sets the number of overtime wins of the sports team.

Parameters
overtimeWins: Long

The number of overtime wins of the sports team.

setTies

Added in 1.2.0-alpha02
fun setTies(ties: Long): T

Sets the number of ties of the sports team.

Parameters
ties: Long

The number of ties of the sports team.

setWins

Added in 1.2.0-alpha02
fun setWins(wins: Long): T

Sets the number of wins of the sports team.

Parameters
wins: Long

The number of wins of the sports team.