# TvEpisodeEntity

# TvEpisodeEntity

*** ** * ** ***

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

<br />

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

*** ** * ** ***

An object representing a tv episode.

## Summary

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

|                              ### Public fields                              |
|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `final long`                                                                | [airDateEpochMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#airDateEpochMillis()) |
| `final int`                                                                 | [availability](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#availability())             |
| `final long`                                                                | [durationMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#durationMillis())         |
| `final `[Uri](https://developer.android.com/reference/android/net/Uri.html) | [playBackUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#playBackUri())               |

|                                                                                           ### Public methods                                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `long`                                                                                                                                                                                                 | [getAirDateEpochMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getAirDateEpochMillis())`()` Returns the air date of the episode, in milliseconds since Epoch.                                                                                                                                  |
| `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/TvEpisodeEntity#getAvailability())`()` Returns the availability of the episode.                                      |
| [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/TvEpisodeEntity#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/TvEpisodeEntity#getContentRatings())`()` Returns the rating systems for the tv episode.                                                                                                                                                             |
| [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/TvEpisodeEntity#getContentRatingsLegacy())~~`()` **This method is deprecated.** use[getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getContentRatings())instead <br /> |
| `long`                                                                                                                                                                                                 | [getDurationMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getDurationMillis())`()` Returns the duration of the tv episode, in milliseconds.                                                                                                                                                   |
| [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/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://developer.android.com/reference/java/lang/String.html)`>`                                 | [getEpisodeDisplayNumber](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getEpisodeDisplayNumber())`()` Returns the episode number of the tv episode.                                                                                                                                                  |
| [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/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/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://developer.android.com/reference/java/lang/Boolean.html)`>`                               | [getIsNextEpisodeAvailable](https://developer.android.com/reference/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://developer.android.com/reference/java/lang/Long.html)`>`                                     | [getLastEngagementTimeMillis](https://developer.android.com/reference/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://developer.android.com/reference/java/lang/Long.html)`>`                                     | [getLastPlayBackPositionTimeMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getLastPlayBackPositionTimeMillis())`()` Returns last play back position of the video entity, in milliseconds.                                                                                                      |
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                                | [getName](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getName())`()` Returns the name of the entity.                                                                                                                                                                                                |
| [List](https://developer.android.com/reference/java/util/List.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/TvEpisodeEntity#getPlatformSpecificPlaybackUris())`()` Returns the platform specific playback uris for the live tv episode.                                                                                                           |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                    | [getPlayBackUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getPlayBackUri())`()` Returns the on device deeplink to start playing the tv episode.                                                                                                                                                  |
| [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/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/com/google/android/engage/common/datamodel/Price)`>`       | [getPrice](https://developer.android.com/reference/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://developer.android.com/reference/java/lang/String.html)`>`                                 | [getSeasonNumber](https://developer.android.com/reference/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://developer.android.com/reference/java/lang/String.html)`>`                                 | [getSeasonTitle](https://developer.android.com/reference/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://developer.android.com/reference/java/lang/String.html)`>`                                 | [getShowTitle](https://developer.android.com/reference/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)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>`                               | [getWatchNextType](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#getWatchNextType())`()` Returns watch next type of the video entity.                                                                                                                                                                 |
| `boolean`                                                                                                                                                                                              | [isDownloadedOnDevice](https://developer.android.com/reference/com/google/android/engage/video/datamodel/TvEpisodeEntity#isDownloadedOnDevice())`()` Returns whether the tv episode is downloaded on device or not                                                                                                                                        |

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

### airDateEpochMillis

```
public final long airDateEpochMillis
```  

### availability

```
public final int availability
```  

### durationMillis

```
public final long durationMillis
```  

### playBackUri

```
public final Uri playBackUri
```  

## Public methods

### getAirDateEpochMillis

```
public long getAirDateEpochMillis()
```

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

### getAvailability

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

Returns the availability of the episode.  

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

### getContentRatingsLegacy

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

Returns the content ratings of the tv episode.  

### getDurationMillis

```
public long getDurationMillis()
```

Returns the duration of the tv episode, in milliseconds.  

### getEntityId

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

Returns the id of the entity.  

### getEpisodeDisplayNumber

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

Returns the episode number of the tv episode.  

### getGenres

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

Returns the genres of the tv episode.  

### getInfoPageUri

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

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

### getIsNextEpisodeAvailable

```
public Optional<Boolean> getIsNextEpisodeAvailable()
```

Returns if next episode is available.  

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

### getName

```
public String getName()
```

Returns the name of the entity.  

### getPlatformSpecificPlaybackUris

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

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

### getPlayBackUri

```
public Uri getPlayBackUri()
```

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

### getPosterImages

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

Returns the poster image of the entity.  

### getPrice

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

Returns the price of the tv episode, if available  

### getSeasonNumber

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

Returns the season number of the tv episode.  

### getSeasonTitle

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

Returns the season title of the tv episode.  

### getShowTitle

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

Returns the show title of the tv episode.  

### getWatchNextType

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

Returns watch next type of the video entity.  

### isDownloadedOnDevice

```
public boolean isDownloadedOnDevice()
```

Returns whether the tv episode is downloaded on device or not