# PortraitMediaEntity

# PortraitMediaEntity

*** ** * ** ***

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

<br />

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

*** ** * ** ***

An object representing a PortraitMedia entity.

## Summary

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

|                                                                                                         ### Public fields                                                                                                         |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| `final `[ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)`>` | [interactions](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#interactions())           |
| `final `[PortraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost)                                                                                                 | [portraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#portraitMediaPost()) |

|                                                                                                    ### Public methods                                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                                       | [getActionLinkUri](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getActionLinkUri())`()` Returns the action link uri of the social entity.                            |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)`>`                        | [getDisplayTimeWindows](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getDisplayTimeWindows())`()` Returns the display time window associated with the social 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/social/datamodel/PortraitMediaEntity#getEntityId())`()` Returns the id of the entity.                                                          |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)`>`              | [getInteraction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getInteraction())`()` Returns the interaction metadata for the portrait media entity.                  |
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)`>` | [getInteractions](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getInteractions())`()` Returns the list of interactions for the portrait media entity.                |
| [PortraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost)                                                                                                 | [getPortraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getPortraitMediaPost())`()` Returns the post related metadata for the portrait media entity.     |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Profile](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Profile)`>`                      | [getProfile](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity#getProfile())`()` Returns the profile metadata for the portrait media 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

### interactions

```
public final ImmutableList<Interaction> interactions
```  

### portraitMediaPost

```
public final PortraitMediaPost portraitMediaPost
```  

## Public methods

### getActionLinkUri

```
public Uri getActionLinkUri()
```

Returns the action link uri of the social entity.  

### getDisplayTimeWindows

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

Returns the display time window associated with the social entity.

This can be used for several use cases like offer expiry time window, preorder availability time window.  

### getEntityId

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

Returns the id of the entity.  

### getInteraction

```
public Optional<Interaction> getInteraction()
```

Returns the interaction metadata for the portrait media entity.  

### getInteractions

```
public ImmutableList<Interaction> getInteractions()
```

Returns the list of interactions for the portrait media entity.  

### getPortraitMediaPost

```
public PortraitMediaPost getPortraitMediaPost()
```

Returns the post related metadata for the portrait media entity.  

### getProfile

```
public Optional<Profile> getProfile()
```

Returns the profile metadata for the portrait media entity.