# TvSeasonEntity

# TvSeasonEntity

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvSeasonEntity "View this page in Kotlin")\|Java  

<br />

```
public final class TvSeasonEntity extends Entity
```

<br />

|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)                                                                                  |||
| ↳ | [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity)                  ||
|   | ↳ | [com.google.android.engage.video.datamodel.TvSeasonEntity](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity) |

*** ** * ** ***

An object representing a tv season.

## Summary

|                                                                                                                                       ### Nested types                                                                                                                                       |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `public final class `[TvSeasonEntity.Builder](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity.Builder) Builder class for[TvSeasonEntity](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity). |

|                              ### Public fields                              |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `final int`                                                                 | [availability](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#availability()) |
| `final int`                                                                 | [episodeCount](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#episodeCount()) |
| `final `[Uri](https://developer.android.com/reference/android/net/Uri.html) | [infoPageUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#infoPageUri())   |

|                                                                                         ### Public methods                                                                                         |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int`                                                                                                                                                                                              | `@`[ContentAvailability](https://developer.android.com/reference/com/google/android/engage/common/datamodel/ContentAvailability) [getAvailability](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getAvailability())`()` Returns the availability of the tv season.                                   |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)`>` | [getAvailabilityTimeWindows](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getAvailabilityTimeWindows())`()` Returns the availability time windows of the video entity.                                                                                                                              |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[RatingSystem](https://developer.android.com/reference/com/google/android/engage/video/datamodel/RatingSystem)`>`            | [getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getContentRatings())`()` Returns the rating systems for the tv season.                                                                                                                                                             |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                   | ~~[getContentRatingsLegacy](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getContentRatingsLegacy())~~`()` **This method is deprecated.** use[getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getContentRatings())instead <br /> |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                             | [getEntityId](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getEntityId())`()` Returns the id of the entity.                                                                                                                                                                                         |
| `int`                                                                                                                                                                                              | [getEpisodeCount](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getEpisodeCount())`()` Returns the total number of episodes in the current tv season.                                                                                                                                                |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://developer.android.com/reference/java/lang/Long.html)`>`                                 | [getFirstEpisodeAirDateEpochMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getFirstEpisodeAirDateEpochMillis())`()` Returns the air date of the first episode in this season, in milliseconds since Epoch.                                                                                    |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                   | [getGenres](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getGenres())`()` Returns the genres of the tv season.                                                                                                                                                                                      |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                | [getInfoPageUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getInfoPageUri())`()` Returns the deeplink to open the details info page of the tv season.                                                                                                                                            |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://developer.android.com/reference/java/lang/Long.html)`>`                                 | [getLastEngagementTimeMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getLastEngagementTimeMillis())`()` Returns the last engagement time in milliseconds.                                                                                                                                     |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://developer.android.com/reference/java/lang/Long.html)`>`                                 | [getLastPlayBackPositionTimeMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getLastPlayBackPositionTimeMillis())`()` Returns last play back position of the video entity, in milliseconds.                                                                                                     |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://developer.android.com/reference/java/lang/Long.html)`>`                                 | [getLatestEpisodeAirDateEpochMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getLatestEpisodeAirDateEpochMillis())`()` Returns the air date of the latest episode in this season, in milliseconds since Epoch.                                                                                 |
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                            | [getName](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getName())`()` Returns the name of the entity.                                                                                                                                                                                               |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>`                                 | [getPlayBackUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getPlayBackUri())`()` Returns the on device deeplink to start playing the tv season.                                                                                                                                                  |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)`>`                         | [getPosterImages](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getPosterImages())`()` Returns the poster image of the entity.                                                                                                                                                                       |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Price](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Price)`>`   | [getPrice](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getPrice())`()` Returns the price of the tv season, if available                                                                                                                                                                            |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                             | [getSeasonDisplayNumber](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getSeasonDisplayNumber())`()` Returns the season display number of the tv season.                                                                                                                                             |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>`                           | [getWatchNextType](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getWatchNextType())`()` Returns watch next type of the video entity.                                                                                                                                                                |

|                                                                                                                                                                                                          ### Inherited methods                                                                                                                                                                                                           |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity) |-------|--------------------------------------------------------------------------------------------------------------------------------| | `int` | [getEntityType](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity#getEntityType())`()` | |

## Public fields

### availability

```
public final int availability
```  

### episodeCount

```
public final int episodeCount
```  

### infoPageUri

```
public final Uri infoPageUri
```  

## Public methods

### getAvailability

```
@ContentAvailability
public int getAvailability()
```

Returns the availability of the tv season.  

### getAvailabilityTimeWindows

```
public List<DisplayTimeWindow> getAvailabilityTimeWindows()
```

Returns the availability time windows of the video entity.  

### getContentRatings

```
public List<RatingSystem> getContentRatings()
```

Returns the rating systems for the tv season.  

### getContentRatingsLegacy

```
public List<String> [getContentRatingsLegacy](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getContentRatingsLegacy())()
```
| **This method is deprecated.**   
|
| use[getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvSeasonEntity#getContentRatings())instead

Returns the content ratings of the tv season.  

### getEntityId

```
public Optional<String> getEntityId()
```

Returns the id of the entity.  

### getEpisodeCount

```
public int getEpisodeCount()
```

Returns the total number of episodes in the current tv season.  

### getFirstEpisodeAirDateEpochMillis

```
public Optional<Long> getFirstEpisodeAirDateEpochMillis()
```

Returns the air date of the first episode in this season, in milliseconds since Epoch.  

### getGenres

```
public List<String> getGenres()
```

Returns the genres of the tv season.  

### getInfoPageUri

```
public Uri getInfoPageUri()
```

Returns the deeplink to open the details info page of the tv season.  

### getLastEngagementTimeMillis

```
public Optional<Long> getLastEngagementTimeMillis()
```

Returns the last engagement time in milliseconds.  

### getLastPlayBackPositionTimeMillis

```
public Optional<Long> getLastPlayBackPositionTimeMillis()
```

Returns last play back position of the video entity, in milliseconds.  

### getLatestEpisodeAirDateEpochMillis

```
public Optional<Long> getLatestEpisodeAirDateEpochMillis()
```

Returns the air date of the latest episode in this season, in milliseconds since Epoch.  

### getName

```
public String getName()
```

Returns the name of the entity.  

### getPlayBackUri

```
public Optional<Uri> getPlayBackUri()
```

Returns the on device deeplink to start playing the tv season.  

### getPosterImages

```
public List<Image> getPosterImages()
```

Returns the poster image of the entity.  

### getPrice

```
public Optional<Price> getPrice()
```

Returns the price of the tv season, if available  

### getSeasonDisplayNumber

```
public Optional<String> getSeasonDisplayNumber()
```

Returns the season display number of the tv season.  

### getWatchNextType

```
public Optional<Integer> getWatchNextType()
```

Returns watch next type of the video entity.