# GenericPost.Builder

# GenericPost.Builder

*** ** * ** ***

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

<br />

```
public final class GenericPost.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                      ### Public methods                                                       |
|-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.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.                                                                                                     |
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.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. |
| [GenericPost](https://developer.android.com/reference/com/google/android/engage/social/datamodel/GenericPost)                 | [build](https://developer.android.com/reference/com/google/android/engage/social/datamodel/GenericPost.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.Builder#setLinkPreviewContent(com.google.android.engage.common.datamodel.LinkPreview))`(`[LinkPreview](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview)` linkPreview)` Indicate the link preview content for the post.                                              |
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.Builder#setTextContent(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` textContent)` Indicate the text content for the post.                                                                                                                                                |
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.Builder#setTimestamp(long))`(long timestamp)` Sets the timestamp of the post.                                                                                                                                                                                                                                               |
| [GenericPost.Builder](https://developer.android.com/reference/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/com/google/android/engage/social/datamodel/GenericPost.Builder#setVideoContent(com.google.android.engage.common.datamodel.VideoPreview))`(`[VideoPreview](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview)` videoContent)` Indicate the video preview content for the post.                                                     |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### addVisualContent

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

Add an image for the post.

Optional.  

### addVisualContents

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

Add the image contents for the post.

Optional.  

### build

```
public GenericPost build()
```  

### setLinkPreviewContent

```
@CanIgnoreReturnValue
public GenericPost.Builder setLinkPreviewContent(LinkPreview linkPreview)
```

Indicate the link preview content for the post.

Optional.  

### setTextContent

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

Indicate the text content for the post.

Optional.  

### setTimestamp

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

Sets the timestamp of the post.

Optional.  

### setVideoContent

```
@CanIgnoreReturnValue
public GenericPost.Builder setVideoContent(VideoPreview videoContent)
```

Indicate the video preview content for the post.

Optional.