# GenericPost.Builder

# GenericPost.Builder

*** ** * ** ***

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


```
class GenericPost.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                          ### Public functions                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.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/GenericPost.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.                                                                                                                                                                                                                                  |
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.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/GenericPost.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. |
| [GenericPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLinkPreviewContent](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.Builder#setLinkPreviewContent(com.google.android.engage.common.datamodel.LinkPreview))`(linkPreview: `[LinkPreview](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LinkPreview)`!)` Indicate the link preview content for the post.                                                                                                                                                                           |
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.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/GenericPost.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.                                                                                                                                                                                                                                                                           |
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.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/GenericPost.Builder#setTimestamp(long))`(timestamp: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the timestamp of the post.                                                                                                                                                                                                                                                                                                          |
| [GenericPost.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setVideoContent](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost.Builder#setVideoContent(com.google.android.engage.common.datamodel.VideoPreview))`(videoContent: `[VideoPreview](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/VideoPreview)`!)` Indicate the video preview content for the post.                                                                                                                                                                                  |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addVisualContent

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

Add an image for the post.

Optional.  

### addVisualContents

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

Add the image contents for the post.

Optional.  

### build

```
fun build(): GenericPost!
```  

### setLinkPreviewContent

```
@CanIgnoreReturnValue
fun setLinkPreviewContent(linkPreview: LinkPreview!): GenericPost.Builder!
```

Indicate the link preview content for the post.

Optional.  

### setTextContent

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

Indicate the text content for the post.

Optional.  

### setTimestamp

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

Sets the timestamp of the post.

Optional.  

### setVideoContent

```
@CanIgnoreReturnValue
fun setVideoContent(videoContent: VideoPreview!): GenericPost.Builder!
```

Indicate the video preview content for the post.

Optional.