# PortraitMediaEntity

# PortraitMediaEntity

*** ** * ** ***

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

<br />

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

*** ** * ** ***

An object representing a PortraitMedia entity.

## Summary

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

|                                                                                                                                                           ### Public functions                                                                                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html)`!`                                                                                                                                                                                                                                                                    | [getActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity#getActionLinkUri())`()` Returns the action link uri of the social 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)`<`[DisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/DisplayTimeWindow)`!>!` | [getDisplayTimeWindows](https://developer.android.com/reference/kotlin/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://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                         | [getEntityId](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/Interaction)`!>!`                                                                                                                     | [getInteraction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity#getInteraction())`()` Returns the interaction 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/kotlin/com/google/android/engage/social/datamodel/Profile)`!>!`                                                                                                                             | [getProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity#getProfile())`()` Returns the profile metadata for the portrait media entity.                              |

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

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

### getActionLinkUri

```
fun getActionLinkUri(): Uri!
```

Returns the action link uri of the social entity.  

### getDisplayTimeWindows

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

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

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

Returns the id of the entity.  

### getInteraction

```
fun getInteraction(): Optional<Interaction!>!
```

Returns the interaction metadata for the portrait media entity.  

### getProfile

```
fun getProfile(): Optional<Profile!>!
```

Returns the profile metadata for the portrait media entity.  

## Public properties

### interactions

```
val interactions: ImmutableList<Interaction!>!
```  

### portraitMediaPost

```
val portraitMediaPost: PortraitMediaPost!
```