# PortraitMediaEntity.Builder

# PortraitMediaEntity.Builder

*** ** * ** ***

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

<br />

```
public final class PortraitMediaEntity.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                              ### Public methods                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addAllDisplayTimeWindow(java.util.List<com.google.android.engage.common.datamodel.DisplayTimeWindow>))`(`[List](https://developer.android.com/reference/java/util/List.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)`> displayTimeWindows)` Adds the display time window for the social entity.                                                                                          |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addDisplayTimeWindow(com.google.android.engage.common.datamodel.DisplayTimeWindow))`(`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)` displayTimeWindow)` Adds the display time window for the social entity.                                                                                                                                                                                        |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#addInteractions(java.util.List<com.google.android.engage.social.datamodel.Interaction>))`(`[List](https://developer.android.com/reference/java/util/List.html)`<`[Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)`> interactions)` Adds the interactions for the portrait media entity.                                                                                                                                 |
| [PortraitMediaEntity](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity)                 | [build](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setActionLinkUri(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri.html)` actionLinkUri)` Sets the action link uri for the social entity.                                                                                                                                                                                                                                                                                                           |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setEntityId(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` entityId)` Sets content id of the entity.                                                                                                                                                                                                                                                                                                                                      |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setInteraction(com.google.android.engage.social.datamodel.Interaction))~~`(`[Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)` interaction)` **This method is deprecated.** Use[addInteractions](https://developer.android.com/reference/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/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setPortraitMediaPost(com.google.android.engage.social.datamodel.PortraitMediaPost))`(`[PortraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost)` portraitMediaPost)` Sets the post content for the portrait media entity.                                                                                                                                                                                       |
| [PortraitMediaEntity.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setProfile(com.google.android.engage.social.datamodel.Profile))`(`[Profile](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Profile)` profile)` Sets the profile for the portrait media entity.                                                                                                                                                                                                                                                        |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### addAllDisplayTimeWindow

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder addAllDisplayTimeWindow(List<DisplayTimeWindow> displayTimeWindows)
```

Adds the display time window for the social entity.

Optional.  

### addDisplayTimeWindow

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder addDisplayTimeWindow(DisplayTimeWindow displayTimeWindow)
```

Adds the display time window for the social entity.

Optional.  

### addInteractions

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder addInteractions(List<Interaction> interactions)
```

Adds the interactions for the portrait media entity.

Optional.  

### build

```
public PortraitMediaEntity build()
```  

### setActionLinkUri

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder setActionLinkUri(Uri actionLinkUri)
```

Sets the action link uri for the social entity.

Required.  

### setEntityId

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder setEntityId(String entityId)
```

Sets content id of the entity.

Optional.  

### setInteraction

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder [setInteraction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaEntity.Builder#setInteraction(com.google.android.engage.social.datamodel.Interaction))(Interaction interaction)
```
| **This method is deprecated.**   
|
| Use[addInteractions](https://developer.android.com/reference/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
public PortraitMediaEntity.Builder setPortraitMediaPost(PortraitMediaPost portraitMediaPost)
```

Sets the post content for the portrait media entity.

Required.  

### setProfile

```
@CanIgnoreReturnValue
public PortraitMediaEntity.Builder setProfile(Profile profile)
```

Sets the profile for the portrait media entity.

Optional.