# MovieEntity

# MovieEntity

*** ** * ** ***

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

<br />

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

*** ** * ** ***

An object representing a movie.

## Summary

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

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

|                                                                                                       ### 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/MovieEntity#getAvailability())`()` Returns the availability of the movie.                                    |
| [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/MovieEntity#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/MovieEntity#getContentRatings())`()` Returns the rating systems for the movie                                                                                                                                                               |
| [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/MovieEntity#getContentRatingsLegacy())~~`()` **This method is deprecated.** use[getContentRatings](https://developer.android.com/reference/com/google/android/engage/video/datamodel/MovieEntity#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/MovieEntity#getDescription())`()` Returns the description of the movie.                                                                                                                                                                        |
| `long`                                                                                                                                                                                                                         | [getDurationMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/MovieEntity#getDurationMillis())`()` Returns the duration of the movie, 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/MovieEntity#getEntityId())`()` Returns the id of the entity.                                                                                                                                                                                      |
| [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/MovieEntity#getGenres())`()` Returns the genres of the movie.                                                                                                                                                                                       |
| [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/MovieEntity#getInfoPageUri())`()` Returns the deeplink to open the details info page of the movie.                                                                                                                                             |
| [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/MovieEntity#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/MovieEntity#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/MovieEntity#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/MovieEntity#getPlatformSpecificPlaybackUris())`()` Returns the platform specific playback uris for the movie entity.                                                                                                          |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                                            | [getPlayBackUri](https://developer.android.com/reference/com/google/android/engage/video/datamodel/MovieEntity#getPlayBackUri())`()` Returns the on device deeplink to start playing the movie.                                                                                                                                                   |
| [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/MovieEntity#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/MovieEntity#getPrice())`()` Returns the price of the movie, 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/MovieEntity#getRecommendationReason())`()` Returns the recommendation reason 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)`>`                                                             | [getReleaseDateEpochMillis](https://developer.android.com/reference/com/google/android/engage/video/datamodel/MovieEntity#getReleaseDateEpochMillis())`()` Returns the release date of the movie, in milliseconds since Epoch.                                                                                                                    |
| [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/MovieEntity#getWatchNextType())`()` Returns watch next type of the video entity.                                                                                                                                                             |
| `boolean`                                                                                                                                                                                                                      | [isDownloadedOnDevice](https://developer.android.com/reference/com/google/android/engage/video/datamodel/MovieEntity#isDownloadedOnDevice())`()` Returns whether the movie 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

### availability

```
public final int availability
```  

### durationMillis

```
public final long durationMillis
```  

### playBackUri

```
public final Uri playBackUri
```  

## Public methods

### getAvailability

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

Returns the availability of the movie.  

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

### getContentRatingsLegacy

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

Returns the content ratings for the movie.  

### getDescription

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

Returns the description of the movie.  

### getDurationMillis

```
public long getDurationMillis()
```

Returns the duration of the movie, in milliseconds.  

### getEntityId

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

Returns the id of the entity.  

### getGenres

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

Returns the genres of the movie.  

### getInfoPageUri

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

Returns the deeplink to open the details info page of the movie.  

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

### getPlayBackUri

```
public Uri getPlayBackUri()
```

Returns the on device deeplink to start playing the movie.  

### getPosterImages

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

Returns the poster image of the entity.  

### getPrice

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

Returns the price of the movie, if available  

### getRecommendationReason

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

Returns the recommendation reason of the entity.  

### getReleaseDateEpochMillis

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

Returns the release date of the movie, in milliseconds since Epoch.  

### getWatchNextType

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

Returns watch next type of the video entity.  

### isDownloadedOnDevice

```
public boolean isDownloadedOnDevice()
```

Returns whether the movie is downloaded on device or not