# TvShowEntity

# TvShowEntity

*** ** * ** ***

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

<br />

```
public final class TvShowEntity 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.TvShowEntity](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity) |

*** ** * ** ***

An object representing a tv show.

## Summary

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

|                                                                                                                 ### Public fields                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `final int`                                                                                                                                                                                                                                       | [availability](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#availability())                                                                                                                                                                                                   |
| `final `[List](https://developer.android.com/reference/java/util/List.html)`<`[RatingSystem](https://developer.android.com/reference/com/google/android/engage/video/datamodel/RatingSystem)`>`                                                   | [contentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#contentRatings())                                                                                                                                                                                               |
| `final `[List](https://developer.android.com/reference/java/util/List.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                                          | [contentRatingsLegacy](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#contentRatingsLegacy()) **This field is deprecated.** Use[contentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#contentRatings())instead. <br /> |
| `final `[Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                                                       | [infoPageUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#infoPageUri())                                                                                                                                                                                                     |
| `final `[ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[PlatformSpecificUri](https://developer.android.com/reference/com/google/android/engage/common/datamodel/PlatformSpecificUri)`>` | [platformSpecificPlaybackUris](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#platformSpecificPlaybackUris())                                                                                                                                                                   |
| `final int`                                                                                                                                                                                                                                       | [seasonCount](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#seasonCount())                                                                                                                                                                                                     |

|                                                                                                            ### 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/TvShowEntity#getAvailability())`()` Returns the availability of the tv show.                                   |
| [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/TvShowEntity#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/TvShowEntity#getContentRatings())`()` Returns the rating systems for the tv show.                                                                                                                                                             |
| [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/TvShowEntity#getContentRatingsLegacy())~~`()` **This method is deprecated.** use[getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#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)`>`                                                                    | [getDescription](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#getDescription())`()` Returns the description of the entity.                                                                                                                                                                        |
| [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/TvShowEntity#getEntityId())`()` Returns the id of the entity.                                                                                                                                                                                       |
| [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/TvShowEntity#getFirstEpisodeAirDateEpochMillis())`()` Returns the air date of the first episode in this show, 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/TvShowEntity#getGenres())`()` Returns the genres of the tv show.                                                                                                                                                                                      |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                                                       | [getInfoPageUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#getInfoPageUri())`()` Returns the deeplink to open the details info page of the tv show.                                                                                                                                            |
| [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/TvShowEntity#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/TvShowEntity#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/TvShowEntity#getLatestEpisodeAirDateEpochMillis())`()` Returns the air date of the latest episode in this show, 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/TvShowEntity#getName())`()` Returns the name of the entity.                                                                                                                                                                                             |
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[PlatformSpecificUri](https://developer.android.com/reference/com/google/android/engage/common/datamodel/PlatformSpecificUri)`>` | [getPlatformSpecificPlaybackUris](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#getPlatformSpecificPlaybackUris())`()` Returns the platform specific playback uri's for the tv show 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/TvShowEntity#getPlayBackUri())`()` Returns the on device deeplink to start playing the tv show.                                                                                                                                                  |
| [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/TvShowEntity#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/TvShowEntity#getPrice())`()` Returns the price of the tv show, if available                                                                                                                                                                            |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[RecommendationReason](https://developer.android.com/reference/com/google/android/engage/common/datamodel/RecommendationReason)`>`            | [getRecommendationReason](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#getRecommendationReason())`()` Returns the recommendation reason of the entity.                                                                                                                                            |
| `int`                                                                                                                                                                                                                                     | [getSeasonCount](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#getSeasonCount())`()` Returns the total number of seasons in the current tv show.                                                                                                                                                   |
| [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/TvShowEntity#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
```  

### contentRatings

```
public final List<RatingSystem> contentRatings
```  

### contentRatingsLegacy

```
public final List<String> contentRatingsLegacy
```
| **This field is deprecated.**   
|
Use[contentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvShowEntity#contentRatings())instead.  

### infoPageUri

```
public final Uri infoPageUri
```  

### platformSpecificPlaybackUris

```
public final ImmutableList<PlatformSpecificUri> platformSpecificPlaybackUris
```  

### seasonCount

```
public final int seasonCount
```  

## Public methods

### getAvailability

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

Returns the availability of the tv show.  

### 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 show.  

### getContentRatingsLegacy

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

Returns the content ratings of the tv show.  

### getDescription

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

Returns the description of the entity.  

### getEntityId

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

Returns the id of the entity.  

### getFirstEpisodeAirDateEpochMillis

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

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

### getGenres

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

Returns the genres of the tv show.  

### getInfoPageUri

```
public Uri getInfoPageUri()
```

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

### 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 show, in milliseconds since Epoch.  

### getName

```
public String getName()
```

Returns the name of the entity.  

### getPlatformSpecificPlaybackUris

```
public ImmutableList<PlatformSpecificUri> getPlatformSpecificPlaybackUris()
```

Returns the platform specific playback uri's for the tv show entity.  

### getPlayBackUri

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

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

### getPosterImages

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

Returns the poster image of the entity.  

### getPrice

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

Returns the price of the tv show, if available  

### getRecommendationReason

```
public Optional<RecommendationReason> getRecommendationReason()
```

Returns the recommendation reason of the entity.  

### getSeasonCount

```
public int getSeasonCount()
```

Returns the total number of seasons in the current tv show.  

### getWatchNextType

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

Returns watch next type of the video entity.