@Document.BuilderProducer
class SportsTeam.Builder


Summary

Public constructors

Builder(sportsTeam: SportsTeam)

Constructor with all the existing values.

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

Constructor for SportsTeam.Builder.

Public functions

T
addAlternateName(alternateName: String)

Adds an alias for the item.

T

Add a new action to the list of potential actions for this document.

SportsTeam

Builds a Thing object.

SportsOrganization

Builds a Thing object.

Organization

Builds a Thing object.

Thing

Builds a Thing object.

T

Clears the aliases, if any, for the item.

T

Clear all the potential actions for this document.

T
setAccentColor(accentColor: Color?)

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

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
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

Sets the URL for an image of the item.

T

Sets the logo of the organization.

T
setLosses(losses: Long)

Sets the number of losses of the sports team.

T
setName(name: String?)

Sets the name of the item.

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

Sets a list of potential actions for this document.

T
setTies(ties: Long)

Sets the number of ties of the sports team.

T
setUrl(url: String?)

Sets the deeplink URL of the item.

T
setWins(wins: Long)

Sets the number of wins of the sports team.

Public constructors

Builder

Added in 1.2.0-alpha01
Builder(sportsTeam: SportsTeam)

Constructor with all the existing values.

Builder

Added in 1.2.0-alpha01
Builder(namespace: String, id: String, sport: String)

Constructor for SportsTeam.Builder.

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

addAlternateName

Added in 1.2.0-alpha01
fun addAlternateName(alternateName: String): T

Adds an alias for the item.

addPotentialAction

Added in 1.2.0-alpha01
@ExperimentalAppSearchApi
fun addPotentialAction(newPotentialAction: PotentialAction): T

Add a new action to the list of potential actions for this document.

build

Added in 1.2.0-alpha01
fun build(): SportsTeam

Builds a Thing object.

build

Added in 1.2.0-alpha01
fun build(): SportsOrganization

Builds a Thing object.

build

Added in 1.2.0-alpha01
fun build(): Organization

Builds a Thing object.

build

Added in 1.2.0-alpha01
fun build(): Thing

Builds a Thing object.

clearAlternateNames

Added in 1.2.0-alpha01
fun clearAlternateNames(): T

Clears the aliases, if any, for the item.

clearPotentialActions

Added in 1.2.0-alpha01
@ExperimentalAppSearchApi
fun clearPotentialActions(): T

Clear all the potential actions for this document.

setAccentColor

Added in 1.2.0-alpha01
fun setAccentColor(accentColor: Color?): T

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

Parameters
accentColor: Color?

The accent color of the sports organization.

setAlternateNames

Added in 1.2.0-alpha01
fun setAlternateNames(alternateNames: (Mutable)List<String!>?): T

Sets a list of aliases for the item.

setCreationTimestampMillis

Added in 1.2.0-alpha01
fun setCreationTimestampMillis(creationTimestampMillis: Long): T

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

This timestamp refers to the creation time of the AppSearch entity, not when the document is written into AppSearch.

If not set, then the current timestamp will be used.

See androidx.appsearch.annotation.Document.CreationTimestampMillis for more information on creation timestamp.

setDescription

Added in 1.2.0-alpha01
fun setDescription(description: String?): T

Sets the description for the item.

setDocumentScore

Added in 1.2.0-alpha01
fun setDocumentScore(documentScore: Int): T

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

See androidx.appsearch.annotation.Document.Score for more information on score.

setDocumentTtlMillis

Added in 1.2.0-alpha01
fun setDocumentTtlMillis(documentTtlMillis: Long): T

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

The document will be automatically deleted when the TTL expires.

If not set, then the document will never expire.

See androidx.appsearch.annotation.Document.TtlMillis for more information on TTL.

setFormattedRecord

Added in 1.2.0-alpha01
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.

setImage

Added in 1.2.0-alpha01
@ExperimentalAppSearchApi
fun setImage(image: String?): T

Sets the URL for an image of the item.

setLogo

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

Sets the logo of the organization.

setLosses

Added in 1.2.0-alpha01
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.

setName

Added in 1.2.0-alpha01
fun setName(name: String?): T

Sets the name of the item.

setOvertimeLosses

Added in 1.2.0-alpha01
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-alpha01
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.

setPotentialActions

Added in 1.2.0-alpha01
@ExperimentalAppSearchApi
fun setPotentialActions(
    newPotentialActions: (Mutable)List<PotentialAction!>?
): T

Sets a list of potential actions for this document.

setTies

Added in 1.2.0-alpha01
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.

setUrl

Added in 1.2.0-alpha01
fun setUrl(url: String?): T

Sets the deeplink URL of the item.

If this item can be displayed by any system UI surface, or can be read by another Android package, through one of the androidx.appsearch.app.SetSchemaRequest.Builder methods, this url should act as a deeplink into the activity that can open it. Callers should be able to construct an ACTION_VIEW intent with the url as the setData to view the item inside your application.

See Allowing Other Apps to Start Your Activity for more details on how to make activities in your app open for use by other apps by defining intent filters.

setWins

Added in 1.2.0-alpha01
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.

Protected properties

mAccentColor

protected val mAccentColorColor?

mAlternateNames

protected val mAlternateNames: (Mutable)List<String!>!

mCreationTimestampMillis

protected val mCreationTimestampMillisLong

mDescription

protected val mDescriptionString!

mDocumentScore

protected val mDocumentScoreInt

mDocumentTtlMillis

protected val mDocumentTtlMillisLong

mFormattedRecord

protected val mFormattedRecordString?

mId

protected val mIdString!

mImage

protected val mImageString!

mLogo

protected val mLogoImageObject?

mLosses

protected val mLossesLong

mName

protected val mNameString!

mNamespace

protected val mNamespaceString!

mOvertimeLosses

protected val mOvertimeLossesLong

mOvertimeWins

protected val mOvertimeWinsLong

mPotentialActions

protected val mPotentialActions: (Mutable)List<PotentialAction!>!

mSport

protected val mSportString

mTies

protected val mTiesLong

mUrl

protected val mUrlString!

mWins

protected val mWinsLong