# SocialPostEntity.Builder

# SocialPostEntity.Builder

*** ** * ** ***

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

<br />

```
class SocialPostEntity.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                               ### Public functions                                                                |
|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addAllDisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#addAllDisplayTimeWindow(java.util.List<com.google.android.engage.common.datamodel.DisplayTimeWindow>))`(` ` displayTimeWindows: (`[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)`<`[DisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/DisplayTimeWindow)`!>!` `)` Adds the display time window for the social entity. |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addAllInteraction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#addAllInteraction(java.util.List<com.google.android.engage.social.datamodel.Interaction>))`(interactions: (`[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)`<`[Interaction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Interaction)`!>!)` Adds a list interaction to the social post entity.                                             |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addDisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#addDisplayTimeWindow(com.google.android.engage.common.datamodel.DisplayTimeWindow))`(displayTimeWindow: `[DisplayTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/DisplayTimeWindow)`!)` Adds the display time window for the social entity.                                                                                                                                                                                                                                   |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addInteraction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#addInteraction(com.google.android.engage.social.datamodel.Interaction))`(interaction: `[Interaction](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Interaction)`!)` Add an interaction for the social post entity.                                                                                                                                                                                                                                                                            |
| [SocialPostEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#setActionLinkUri(android.net.Uri))`(actionLinkUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!)` Sets the action link uri for the social entity.                                                                                                                                                                                                                                                                                                                                                             |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setEntityId](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#setEntityId(java.lang.String))`(entityId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets content id of the entity.                                                                                                                                                                                                                                                                                                                                                                               |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setGenericPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#setGenericPost(com.google.android.engage.social.datamodel.GenericPost))`(genericPost: `[GenericPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost)`!)` Sets the post content for the social post entity.                                                                                                                                                                                                                                                                         |
| [SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder#setProfile(com.google.android.engage.social.datamodel.Profile))`(profile: `[Profile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Profile)`!)` Sets the profile for the social media post.                                                                                                                                                                                                                                                                                                       |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addAllDisplayTimeWindow

```
@CanIgnoreReturnValue
fun addAllDisplayTimeWindow(
    displayTimeWindows: (Mutable)List<DisplayTimeWindow!>!
): SocialPostEntity.Builder!
```

Adds the display time window for the social entity.

Optional.  

### addAllInteraction

```
@CanIgnoreReturnValue
fun addAllInteraction(interactions: (Mutable)List<Interaction!>!): SocialPostEntity.Builder!
```

Adds a list interaction to the social post entity.

Optional.  

### addDisplayTimeWindow

```
@CanIgnoreReturnValue
fun addDisplayTimeWindow(displayTimeWindow: DisplayTimeWindow!): SocialPostEntity.Builder!
```

Adds the display time window for the social entity.

Optional.  

### addInteraction

```
@CanIgnoreReturnValue
fun addInteraction(interaction: Interaction!): SocialPostEntity.Builder!
```

Add an interaction for the social post entity.

Optional.  

### build

```
fun build(): SocialPostEntity!
```  

### setActionLinkUri

```
@CanIgnoreReturnValue
fun setActionLinkUri(actionLinkUri: Uri!): SocialPostEntity.Builder!
```

Sets the action link uri for the social entity.

Required.  

### setEntityId

```
@CanIgnoreReturnValue
fun setEntityId(entityId: String!): SocialPostEntity.Builder!
```

Sets content id of the entity.

Optional.  

### setGenericPost

```
@CanIgnoreReturnValue
fun setGenericPost(genericPost: GenericPost!): SocialPostEntity.Builder!
```

Sets the post content for the social post entity.

Required.  

### setProfile

```
@CanIgnoreReturnValue
fun setProfile(profile: Profile!): SocialPostEntity.Builder!
```

Sets the profile for the social media post.

Optional.