# PortraitMediaPost.Builder

# PortraitMediaPost.Builder

*** ** * ** ***

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

<br />

```
class PortraitMediaPost.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                                ### Public functions                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#addVisualContent(com.google.android.engage.common.datamodel.Image))`(image: `[Image](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Image)`!)` Add an image for the post.                                                                                                                                                                                                                                  |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#addVisualContents(java.util.List<com.google.android.engage.common.datamodel.Image>))`(images: (`[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)`<`[Image](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Image)`!>!)` Add the image contents for the post. |
| [PortraitMediaPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setIsVideoContent(boolean))`(isVideoContent: `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Indicate the video preview content for the post.                                                                                                                                                                                                                                                                 |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setTextContent(java.lang.String))`(textContent: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Indicate the text content for the post.                                                                                                                                                                                                                                                                           |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setTimestamp(long))`(timestamp: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the timestamp of the post.                                                                                                                                                                                                                                                                                                          |
| [PortraitMediaPost.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/social/datamodel/PortraitMediaPost.Builder#setVideoDurationMillis(long))`(videoDurationMillis: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Indicate the video duration for the post.                                                                                                                                                                                                                                                                  |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addVisualContent

```
@CanIgnoreReturnValue
fun addVisualContent(image: Image!): PortraitMediaPost.Builder!
```

Add an image for the post.

Required.  

### addVisualContents

```
@CanIgnoreReturnValue
fun addVisualContents(images: (Mutable)List<Image!>!): PortraitMediaPost.Builder!
```

Add the image contents for the post.

Required.  

### build

```
fun build(): PortraitMediaPost!
```  

### setIsVideoContent

```
@CanIgnoreReturnValue
fun setIsVideoContent(isVideoContent: Boolean): PortraitMediaPost.Builder!
```

Indicate the video preview content for the post.

Optional.  

### setTextContent

```
@CanIgnoreReturnValue
fun setTextContent(textContent: String!): PortraitMediaPost.Builder!
```

Indicate the text content for the post.

Optional.  

### setTimestamp

```
@CanIgnoreReturnValue
fun setTimestamp(timestamp: Long): PortraitMediaPost.Builder!
```

Sets the timestamp of the post.

Optional.  

### setVideoDurationMillis

```
@CanIgnoreReturnValue
fun setVideoDurationMillis(videoDurationMillis: Long): PortraitMediaPost.Builder!
```

Indicate the video duration for the post.

Optional.