# Interaction.Builder

# Interaction.Builder

*** ** * ** ***

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

<br />

```
public final class Interaction.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                      ### Public methods                                                       |
|-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Interaction.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addVisual](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#addVisual(com.google.android.engage.common.datamodel.Image))`(`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)` image)` Add an image/icon showing what the interaction is for.                                                                                             |
| [Interaction.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addVisuals](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#addVisuals(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 images/icon showing what the interaction is for. |
| [Interaction](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction)                 | [build](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [Interaction.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setCount](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#setCount(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` count)` Sets the number of reaction.                                                                                                                                                                                   |
| [Interaction.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setCountValue](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#setCountValue(long))`(long countValue)` Sets the count value of the interaction.                                                                                                                                                                                                                                         |
| [Interaction.Builder](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLabel](https://developer.android.com/reference/com/google/android/engage/social/datamodel/Interaction.Builder#setLabel(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` label)` Indicate what the interaction is for. e.g. "Likes"                                                                                                                                                             |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### addVisual

```
@CanIgnoreReturnValue
public Interaction.Builder addVisual(Image image)
```

Add an image/icon showing what the interaction is for.

Optional.

If not provided, label must be set.  

### addVisuals

```
@CanIgnoreReturnValue
public Interaction.Builder addVisuals(List<Image> images)
```

Add the images/icon showing what the interaction is for.

Optional.  

### build

```
public Interaction build()
```  

### setCount

```
@CanIgnoreReturnValue
public Interaction.Builder setCount(String count)
```

Sets the number of reaction.

Required.  

### setCountValue

```
@CanIgnoreReturnValue
public Interaction.Builder setCountValue(long countValue)
```

Sets the count value of the interaction.

Optional.  

### setLabel

```
@CanIgnoreReturnValue
public Interaction.Builder setLabel(String label)
```

Indicate what the interaction is for. e.g. "Likes"

Optional.

If not provided, visuals must be set.