# ShoppingList.Builder

# ShoppingList.Builder

*** ** * ** ***

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

<br />

```
class ShoppingList.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                            ### Public functions                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addItemLabel](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#addItemLabel(java.lang.String))`(itemLabel: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Add a item label in the shopping list                                                                                                                                                                                                                                                                                                |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addItemLabels](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#addItemLabels(java.util.List<java.lang.String>))`(itemLabels: (`[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)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!>!)` Add a list of item labels in the shopping list                                                                |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addPosterImage](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#addPosterImage(com.google.android.engage.common.datamodel.Image))`(image: `[Image](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Image)`!)` Adds a poster image of the items in the shopping list.                                                                                                                                                                                                                       |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addPosterImages](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#addPosterImages(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)`!>!)` Adds poster images of the items in the shopping list. |
| [ShoppingList](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#setActionLinkUri(android.net.Uri))`(actionLinkUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!)` Sets the action link uri for the shopping list.                                                                                                                                                                                                                                                                                        |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setActionText](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#setActionText(java.lang.String))`(actionText: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets the action text of the shopping cart. e.g. "View List"                                                                                                                                                                                                                                                                       |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setNumberOfItems](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#setNumberOfItems(int))`(numberOfItems: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the number of items in the shopping list.                                                                                                                                                                                                                                                                                               |
| [ShoppingList.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setTitle](https://developer.android.com/reference/kotlin/com/google/android/engage/shopping/datamodel/ShoppingList.Builder#setTitle(java.lang.String))`(title: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets the title of the shopping list.                                                                                                                                                                                                                                                                                                             |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addItemLabel

```
@CanIgnoreReturnValue
fun addItemLabel(itemLabel: String!): ShoppingList.Builder!
```

Add a item label in the shopping list

Optional.  

### addItemLabels

```
@CanIgnoreReturnValue
fun addItemLabels(itemLabels: (Mutable)List<String!>!): ShoppingList.Builder!
```

Add a list of item labels in the shopping list

Optional.  

### addPosterImage

```
@CanIgnoreReturnValue
fun addPosterImage(image: Image!): ShoppingList.Builder!
```

Adds a poster image of the items in the shopping list.

Optional.  

### addPosterImages

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

Adds poster images of the items in the shopping list.

Optional.  

### build

```
fun build(): ShoppingList!
```  

### setActionLinkUri

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

Sets the action link uri for the shopping list.

Required.  

### setActionText

```
@CanIgnoreReturnValue
fun setActionText(actionText: String!): ShoppingList.Builder!
```

Sets the action text of the shopping cart. e.g. "View List"

Optional.  

### setNumberOfItems

```
@CanIgnoreReturnValue
fun setNumberOfItems(numberOfItems: Int): ShoppingList.Builder!
```

Sets the number of items in the shopping list.

When set to 0, the list is empty.

Optional.  

### setTitle

```
@CanIgnoreReturnValue
fun setTitle(title: String!): ShoppingList.Builder!
```

Sets the title of the shopping list.

Optional.