# PortraitMediaPost.Builder

# PortraitMediaPost.Builder

*** ** * ** ***

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

<br />

```
public final class PortraitMediaPost.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                            ### Public methods                                                             |
|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addVisualContent](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#addVisualContent(com.google.android.engage.common.datamodel.Image))`(`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)` image)` Add an image for the post.                                                                                                     |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addVisualContents](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#addVisualContents(java.util.List<com.google.android.engage.common.datamodel.Image>))`(`[List](https://developer.android.com/reference/java/util/List.html)`<`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)`> images)` Add the image contents for the post. |
| [PortraitMediaPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost)                 | [build](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setIsVideoContent](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setIsVideoContent(boolean))`(boolean isVideoContent)` Indicate the video preview content for the post.                                                                                                                                                                                                         |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setTextContent](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setTextContent(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` textContent)` Indicate the text content for the post.                                                                                                                                                |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setTimestamp](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setTimestamp(long))`(long timestamp)` Sets the timestamp of the post.                                                                                                                                                                                                                                               |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setVideoDurationMillis](https://developer.android.com/reference/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setVideoDurationMillis(long))`(long videoDurationMillis)` Indicate the video duration for the post.                                                                                                                                                                                                       |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### addVisualContent

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder addVisualContent(Image image)
```

Add an image for the post.

Required.  

### addVisualContents

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder addVisualContents(List<Image> images)
```

Add the image contents for the post.

Required.  

### build

```
public PortraitMediaPost build()
```  

### setIsVideoContent

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder setIsVideoContent(boolean isVideoContent)
```

Indicate the video preview content for the post.

Optional.  

### setTextContent

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder setTextContent(String textContent)
```

Indicate the text content for the post.

Optional.  

### setTimestamp

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder setTimestamp(long timestamp)
```

Sets the timestamp of the post.

Optional.  

### setVideoDurationMillis

```
@CanIgnoreReturnValue
public PortraitMediaPost.Builder setVideoDurationMillis(long videoDurationMillis)
```

Indicate the video duration for the post.

Optional.