# SportsTeam.BuilderBase

Artifact: [androidx.appsearch:appsearch-builtin-types](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/builtintypes/SportsTeam.java+class:androidx.appsearch.builtintypes.SportsTeam.BuilderBase) Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

*** ** * ** ***


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

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase) ||||
|   | ↳ | [androidx.appsearch.builtintypes.Organization.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization.BuilderBase) |||
|   |   | ↳ | [androidx.appsearch.builtintypes.SportsOrganization.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase)\<T!\> ||
|   |   |   | ↳ | [androidx.appsearch.builtintypes.SportsTeam.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase) |

Known direct subclasses [SportsTeam.Builder](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.Builder)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.Builder` |   |

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#BuilderBase(androidx.appsearch.builtintypes.SportsTeam)(sportsTeam: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase` with all the existing values. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#BuilderBase(java.lang.String,java.lang.String,java.lang.String)(namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, sport: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setFormattedRecord(java.lang.String)(formattedRecord: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` 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` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setLosses(long)(losses: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the number of losses of the sports team. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setOvertimeLosses(long)(overtimeLosses: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the number of overtime losses of the sports team. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setOvertimeWins(long)(overtimeWins: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the number of overtime wins of the sports team. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setTies(long)(ties: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the number of ties of the sports team. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setWins(long)(wins: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the number of wins of the sports team. |

### Inherited functions

From [androidx.appsearch.builtintypes.Organization.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization.BuilderBase) `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization.BuilderBase#build()()`

Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Organization.BuilderBase#setLogo(androidx.appsearch.builtintypes.ImageObject)(logo: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/ImageObject?)`

Sets the logo of the organization.
From [androidx.appsearch.builtintypes.SportsOrganization.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase) `T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase#setAccentColor(android.graphics.Color)(accentColor: https://developer.android.com/reference/android/graphics/Color.html?)`

Sets the accent color of the sports organization as a `https://developer.android.com/reference/android/graphics/Color.html`.
From [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase) `T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addAlternateName(java.lang.String)(alternateName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

Adds an alias for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#addPotentialAction(androidx.appsearch.builtintypes.PotentialAction)(newPotentialAction: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/PotentialAction)`

Add a new action to the list of potential actions for this document.
`https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#build()()`

Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearAlternateNames()()`

Clears the aliases, if any, for the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#clearPotentialActions()()`

Clear all the potential actions for this document.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#resetIfBuilt()()`

If built, make a copy of previous data for every field so that the builder can be reused.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setAlternateNames(java.util.List<java.lang.String>)(alternateNames: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>?)`

Sets a list of aliases for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setCreationTimestampMillis(long)(creationTimestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDescription(java.lang.String)(description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the description for the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentScore(int)(documentScore: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchSpec#RANKING_STRATEGY_DOCUMENT_SCORE()`.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentTtlMillis(long)(documentTtlMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setImage(java.lang.String)(image: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the URL for an image of the item.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setName(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the name of the item.
`T` `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setPotentialActions(java.util.List<androidx.appsearch.builtintypes.PotentialAction>)(
newPotentialActions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/PotentialAction!>?
)`

Sets a list of potential actions for this document.
`T` `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing.BuilderBase#setUrl(java.lang.String)(url: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)`

Sets the deeplink URL of the item.

## Public constructors

### BuilderBase

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
BuilderBase(sportsTeam: SportsTeam)
```

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase` with all the existing values.

| Parameters |
|---|---|
| `sportsTeam: https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam` | The existing `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam` to copy values from. |

### BuilderBase

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

Constructor for `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/SportsTeam.BuilderBase`.

| Parameters |
|---|---|
| `namespace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Namespace for the Document. See `https://developer.android.com/reference/kotlin/androidx/appsearch/annotation/Document.Namespace`. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The unique identifier for the Document. |
| `sport: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The sport of the sports team. |

## Public functions

### build

```
fun build(): SportsTeam
```

Builds a `https://developer.android.com/reference/kotlin/androidx/appsearch/builtintypes/Thing` object.

### setFormattedRecord

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The formatted record of the sports team. |

### setLosses

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
fun setLosses(losses: Long): T
```

Sets the number of losses of the sports team.

| Parameters |
|---|---|
| `losses: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of losses of the sports team. |

### setOvertimeLosses

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
fun setOvertimeLosses(overtimeLosses: Long): T
```

Sets the number of overtime losses of the sports team.

| Parameters |
|---|---|
| `overtimeLosses: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of overtime losses of the sports team. |

### setOvertimeWins

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
fun setOvertimeWins(overtimeWins: Long): T
```

Sets the number of overtime wins of the sports team.

| Parameters |
|---|---|
| `overtimeWins: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of overtime wins of the sports team. |

### setTies

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
fun setTies(ties: Long): T
```

Sets the number of ties of the sports team.

| Parameters |
|---|---|
| `ties: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of ties of the sports team. |

### setWins

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
fun setWins(wins: Long): T
```

Sets the number of wins of the sports team.

| Parameters |
|---|---|
| `wins: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of wins of the sports team. |