# TvEpisodeEntity

# TvEpisodeEntity

*** ** * ** ***

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


```
class TvEpisodeEntity : Entity
```

<br />

|---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                           |||
| ↳ | [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity)                    ||
|   | ↳ | [com.google.android.engage.video.datamodel.TvEpisodeEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity) |

*** ** * ** ***

An object representing a tv episode.

## Summary

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

|                                                                                                                                                             ### Public functions                                                                                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/DisplayTimeWindow)`!>!`     | [getAvailabilityTimeWindows](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getAvailabilityTimeWindows())`()` Returns the availability time windows of the video entity.                                                                                                                                          |
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[RatingSystem](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/RatingSystem)`!>!`                | [getContentRatings](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatings())`()` Returns the rating systems for the tv episode.                                                                                                                                                                        |
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                     | ~~[getContentRatingsLegacy](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatingsLegacy())~~`()` **This function is deprecated.** use [getContentRatings](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatings()) instead <br /> |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                             | [getEntityId](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getEntityId())`()` Returns the id of the entity.                                                                                                                                                                                                     |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                             | [getEpisodeDisplayNumber](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getEpisodeDisplayNumber())`()` Returns the episode number of the tv episode.                                                                                                                                                             |
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                     | [getGenres](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getGenres())`()` Returns the genres of the tv episode.                                                                                                                                                                                                 |
| [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)`!>!`                                                                                                                                                                          | [getInfoPageUri](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getInfoPageUri())`()` Returns the deeplink to open the details info page of the tv episode.                                                                                                                                                       |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`!>!`                                                                                                                                                           | [getIsNextEpisodeAvailable](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getIsNextEpisodeAvailable())`()` Returns if next episode is available.                                                                                                                                                                 |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`!>!`                                                                                                                                                                 | [getLastEngagementTimeMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#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://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`!>!`                                                                                                                                                                 | [getLastPlayBackPositionTimeMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getLastPlayBackPositionTimeMillis())`()` Returns last play back position of the video entity, in milliseconds.                                                                                                                 |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                                                                                                                                                                                                                                                           | [getName](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getName())`()` Returns the name of the entity.                                                                                                                                                                                                           |
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[PlatformSpecificUri](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/PlatformSpecificUri)`!>!` | [getPlatformSpecificPlaybackUris](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getPlatformSpecificPlaybackUris())`()` Returns the platform specific playback uris for the live tv episode.                                                                                                                      |
| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[Image](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Image)`!>!`                             | [getPosterImages](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#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/kotlin/com/google/android/engage/common/datamodel/Price)`!>!`                                                                                                                                     | [getPrice](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getPrice())`()` Returns the price of the tv episode, if available                                                                                                                                                                                       |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                             | [getSeasonNumber](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getSeasonNumber())`()` Returns the season number of the tv episode.                                                                                                                                                                              |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                             | [getSeasonTitle](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getSeasonTitle())`()` Returns the season title of the tv episode.                                                                                                                                                                                 |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                             | [getShowTitle](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getShowTitle())`()` Returns the show title of the tv episode.                                                                                                                                                                                       |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`!>!`                                                                                                                                                                   | [getWatchNextType](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getWatchNextType())`()` Returns watch next type of the video entity.                                                                                                                                                                            |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                                                                            | [isDownloadedOnDevice](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#isDownloadedOnDevice())`()` Returns whether the tv episode is downloaded on device or not                                                                                                                                                   |

|                            ### Public properties                             |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [airDateEpochMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#airDateEpochMillis()) |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)   | [availability](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#availability())             |
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [durationMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#durationMillis())         |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)`!`       | [playBackUri](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#playBackUri())               |

|                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                          |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getEntityType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity#getEntityType())`()` | |

## Public functions

### getAvailabilityTimeWindows

```
fun getAvailabilityTimeWindows(): (Mutable)List<DisplayTimeWindow!>!
```

Returns the availability time windows of the video entity.  

### getContentRatings

```
fun getContentRatings(): (Mutable)List<RatingSystem!>!
```

Returns the rating systems for the tv episode.  

### getContentRatingsLegacy

```
fun [getContentRatingsLegacy](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatingsLegacy())(): (Mutable)List<String!>!
```
| **This function is deprecated.**   
|
| use [getContentRatings](https://developer.android.com/reference/kotlin/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatings()) instead

Returns the content ratings of the tv episode.  

### getEntityId

```
fun getEntityId(): Optional<String!>!
```

Returns the id of the entity.  

### getEpisodeDisplayNumber

```
fun getEpisodeDisplayNumber(): Optional<String!>!
```

Returns the episode number of the tv episode.  

### getGenres

```
fun getGenres(): (Mutable)List<String!>!
```

Returns the genres of the tv episode.  

### getInfoPageUri

```
fun getInfoPageUri(): Optional<Uri!>!
```

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

### getIsNextEpisodeAvailable

```
fun getIsNextEpisodeAvailable(): Optional<Boolean!>!
```

Returns if next episode is available.  

### getLastEngagementTimeMillis

```
fun getLastEngagementTimeMillis(): Optional<Long!>!
```

Returns the last engagement time in milliseconds.  

### getLastPlayBackPositionTimeMillis

```
fun getLastPlayBackPositionTimeMillis(): Optional<Long!>!
```

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

### getName

```
fun getName(): String!
```

Returns the name of the entity.  

### getPlatformSpecificPlaybackUris

```
fun getPlatformSpecificPlaybackUris(): (Mutable)List<PlatformSpecificUri!>!
```

Returns the platform specific playback uris for the live tv episode.  

### getPosterImages

```
fun getPosterImages(): (Mutable)List<Image!>!
```

Returns the poster image of the entity.  

### getPrice

```
fun getPrice(): Optional<Price!>!
```

Returns the price of the tv episode, if available  

### getSeasonNumber

```
fun getSeasonNumber(): Optional<String!>!
```

Returns the season number of the tv episode.  

### getSeasonTitle

```
fun getSeasonTitle(): Optional<String!>!
```

Returns the season title of the tv episode.  

### getShowTitle

```
fun getShowTitle(): Optional<String!>!
```

Returns the show title of the tv episode.  

### getWatchNextType

```
fun getWatchNextType(): Optional<Int!>!
```

Returns watch next type of the video entity.  

### isDownloadedOnDevice

```
fun isDownloadedOnDevice(): Boolean
```

Returns whether the tv episode is downloaded on device or not  

## Public properties

### airDateEpochMillis

```
val airDateEpochMillis: Long
```  

### availability

```
val availability: Int
```  

### durationMillis

```
val durationMillis: Long
```  

### playBackUri

```
val playBackUri: Uri!
```