# PortraitMediaEntity.Builder

# PortraitMediaEntity.Builder

*** ** * ** ***

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

<br />

```
class PortraitMediaEntity.Builder
```

<br />

*** ** * ** ***

Builder class for[PortraitMediaEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity).

## Summary

|                                                            ### Public constructors                                                             |
|------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#Builder())`()` |

|                                                                  ### Public functions                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addAllDisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addAllDisplayTimeWindow(java.util.List<com.google.android.engage.common.datamodel.DisplayTimeWindow>))`(` ` displayTimeWindows: (`[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)`!>!` `)` Adds the display time window for the social entity. |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addDisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addDisplayTimeWindow(com.google.android.engage.common.datamodel.DisplayTimeWindow))`(displayTimeWindow: `[DisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/DisplayTimeWindow)`!)` Adds the display time window for the social entity.                                                                                                                                                                                                                                   |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addInteractions](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addInteractions(java.util.List<com.google.android.engage.social.datamodel.Interaction>))`(interactions: (`[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)`<`[Interaction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Interaction)`!>!)` Adds the interactions for the portrait media entity.                                               |
| [PortraitMediaEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setActionLinkUri(android.net.Uri))`(actionLinkUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!)` Sets the action link uri for the social entity.                                                                                                                                                                                                                                                                                                                                                             |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setEntityId](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setEntityId(java.lang.String))`(entityId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets content id of the entity.                                                                                                                                                                                                                                                                                                                                                                               |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) ~~[setInteraction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setInteraction(com.google.android.engage.social.datamodel.Interaction))~~`(interaction: `[Interaction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Interaction)`!)` **This function is deprecated.** Use[addInteractions](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addInteractions(java.util.List<com.google.android.engage.social.datamodel.Interaction>))instead. <br />                                   |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setPortraitMediaPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setPortraitMediaPost(com.google.android.engage.social.datamodel.PortraitMediaPost))`(portraitMediaPost: `[PortraitMediaPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost)`!)` Sets the post content for the portrait media entity.                                                                                                                                                                                                                                  |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setProfile(com.google.android.engage.social.datamodel.Profile))`(profile: `[Profile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Profile)`!)` Sets the profile for the portrait media entity.                                                                                                                                                                                                                                                                                                   |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addAllDisplayTimeWindow

```
@CanIgnoreReturnValue
fun addAllDisplayTimeWindow(
    displayTimeWindows: (Mutable)List<DisplayTimeWindow!>!
): PortraitMediaEntity.Builder!
```

Adds the display time window for the social entity.

Optional.  

### addDisplayTimeWindow

```
@CanIgnoreReturnValue
fun addDisplayTimeWindow(displayTimeWindow: DisplayTimeWindow!): PortraitMediaEntity.Builder!
```

Adds the display time window for the social entity.

Optional.  

### addInteractions

```
@CanIgnoreReturnValue
fun addInteractions(interactions: (Mutable)List<Interaction!>!): PortraitMediaEntity.Builder!
```

Adds the interactions for the portrait media entity.

Optional.  

### build

```
fun build(): PortraitMediaEntity!
```  

### setActionLinkUri

```
@CanIgnoreReturnValue
fun setActionLinkUri(actionLinkUri: Uri!): PortraitMediaEntity.Builder!
```

Sets the action link uri for the social entity.

Required.  

### setEntityId

```
@CanIgnoreReturnValue
fun setEntityId(entityId: String!): PortraitMediaEntity.Builder!
```

Sets content id of the entity.

Optional.  

### setInteraction

```
@CanIgnoreReturnValue
fun [setInteraction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setInteraction(com.google.android.engage.social.datamodel.Interaction))(interaction: Interaction!): PortraitMediaEntity.Builder!
```
| **This function is deprecated.**   
|
| Use[addInteractions](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addInteractions(java.util.List<com.google.android.engage.social.datamodel.Interaction>))instead.

Sets the interaction for the portrait media entity.

Optional.  

### setPortraitMediaPost

```
@CanIgnoreReturnValue
fun setPortraitMediaPost(portraitMediaPost: PortraitMediaPost!): PortraitMediaEntity.Builder!
```

Sets the post content for the portrait media entity.

Required.  

### setProfile

```
@CanIgnoreReturnValue
fun setProfile(profile: Profile!): PortraitMediaEntity.Builder!
```

Sets the profile for the portrait media entity.

Optional.