# SocialPostEntity

# SocialPostEntity

*** ** * ** ***

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

<br />

```
class SocialPostEntity : Entity
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                               |||
| ↳ | [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity)                        ||
|   | ↳ | [com.google.android.engage.social.datamodel.SocialPostEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity) |

*** ** * ** ***

An object representing a social media post.

## Summary

|                                                                                                                                            ### Nested types                                                                                                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[SocialPostEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity.Builder) Builder class for[SocialPostEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity). |

|                                                                                                                                                           ### Public functions                                                                                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html)`!`                                                                                                                                                                                                                                                                    | [getActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#getActionLinkUri())`()` Returns the action link uri of the social entity.                            |
| `(`[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)`!>!` | [getDisplayTimeWindows](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#getDisplayTimeWindows())`()` Returns the display time window associated with the social entity. |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!`                                                                                                                                                         | [getEntityId](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#getEntityId())`()` Returns the id of the entity.                                                          |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Profile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/Profile)`!>!`                                                                                                                             | [getProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#getProfile())`()` Returns the profile metadata for the social post entity.                                 |

|                                                                                                                                                     ### Public properties                                                                                                                                                     |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| [GenericPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/GenericPost)`!`                                                                                                                                                                                                       | [genericPost](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#genericPost())   |
| `(`[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)`!>!` | [interactions](https://developer.android.com/reference/kotlin/com/google/android/engage/social/datamodel/SocialPostEntity#interactions()) |

|                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getEntityType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity#getEntityType())`()` | |

## Public functions

### getActionLinkUri

```
fun getActionLinkUri(): Uri!
```

Returns the action link uri of the social entity.  

### getDisplayTimeWindows

```
fun getDisplayTimeWindows(): (Mutable)List<DisplayTimeWindow!>!
```

Returns the display time window associated with the social entity.

This can be used for several use cases like offer expiry time window, preorder availability time window.  

### getEntityId

```
fun getEntityId(): Optional<String!>!
```

Returns the id of the entity.  

### getProfile

```
fun getProfile(): Optional<Profile!>!
```

Returns the profile metadata for the social post entity.  

## Public properties

### genericPost

```
val genericPost: GenericPost!
```  

### interactions

```
val interactions: (Mutable)List<Interaction!>!
```