# EventEntity.Builder

# EventEntity.Builder

*** ** * ** ***

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


```
class EventEntity.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                          ### Public functions                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addBadge](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addBadge(com.google.android.engage.common.datamodel.Badge))`(badge: `[Badge](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Badge)`!)` Add a badge (image/text) for the event entity. e.g. "Onsale".                                                                                                                                                                                                       |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addBadges](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addBadges(java.util.List<com.google.android.engage.common.datamodel.Badge>))`(badges: (`[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)`<`[Badge](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Badge)`!>!)` Add badges for the event entity.             |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addContentCategories](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addContentCategories(java.util.List<java.lang.Integer>))`(contentCategories: (`[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)`<`[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`!>!)` Add eligible content categories for the event entity.                    |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addContentCategory](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addContentCategory(int))`(` ` @`[EventEntity.EligibleContentCategory](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.EligibleContentCategory)` contentCategory: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) `)` Add eligible content category for the event entity.                                                                                  |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addPosterImage](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addPosterImage(com.google.android.engage.common.datamodel.Image))`(image: `[Image](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Image)`!)` Add a poster image of the entity.                                                                                                                                                                                                                       |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addPosterImages](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.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)`!>!)` Add poster images of the entity. |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addSubtitle](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addSubtitle(java.lang.String))`(subtitle: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Add a subtitle for the event entity. e.g. "Over 50M users watched Hamilton already", "4 sessions every Monday"                                                                                                                                                                                                     |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addSubtitles](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#addSubtitles(java.util.List<java.lang.String>))`(subtitles: (`[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 subtitles for the event entity.                                                         |
| [EventEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setActionLinkUri](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setActionLinkUri(android.net.Uri))`(actionLinkUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!)` Sets the action link uri for the event entity.                                                                                                                                                                                                                                                                    |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setDescription](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setDescription(java.lang.String))`(description: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets the description for the event entity.                                                                                                                                                                                                                                                                |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) ~~[setEndTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setEndTime(java.lang.Long))~~`(endTime: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`!)` **This function is deprecated.** Use [setLocalizedEndTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedEndTime(com.google.android.engage.common.datamodel.LocalizedTimestamp)) instead. <br />                                            |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setEntityId](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setEntityId(java.lang.String))`(entityId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets content id of the entity.                                                                                                                                                                                                                                                                                     |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setEventMode](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setEventMode(int))`(@`[EventMode](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventMode)` eventMode: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the event mode of the event entity.                                                                                                                                                                        |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocalizedEndTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedEndTime(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(localizedEndTime: `[LocalizedTimestamp](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LocalizedTimestamp)`!)` Sets the localized end time of the event reservation entity.                                                                                                                                |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocalizedStartTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedStartTime(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(localizedStartTime: `[LocalizedTimestamp](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LocalizedTimestamp)`!)` Sets the localized start time for the event reservation entity.                                                                                                                       |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocation](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocation(com.google.android.engage.common.datamodel.Address))`(location: `[Address](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Address)`!)` Sets the location/address of the event entity.                                                                                                                                                                                                       |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setPrice](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setPrice(com.google.android.engage.common.datamodel.Price))`(price: `[Price](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Price)`!)` Sets the price for the event entity;                                                                                                                                                                                                                                |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setPriceCallout](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setPriceCallout(java.lang.String))`(priceCallout: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets the price callout for the event entity. e.g. "Limited offer"                                                                                                                                                                                                                                      |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) ~~[setStartTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setStartTime(java.lang.Long))~~`(startTime: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`!)` **This function is deprecated.** Use [setLocalizedStartTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedStartTime(com.google.android.engage.common.datamodel.LocalizedTimestamp)) instead. <br />                                  |
| [EventEntity.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setTitle](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setTitle(java.lang.String))`(title: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the title of the event entity.                                                                                                                                                                                                                                                                                          |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addBadge

```
@CanIgnoreReturnValue
fun addBadge(badge: Badge!): EventEntity.Builder!
```

Add a badge (image/text) for the event entity. e.g. "Onsale".

Optional.  

### addBadges

```
@CanIgnoreReturnValue
fun addBadges(badges: (Mutable)List<Badge!>!): EventEntity.Builder!
```

Add badges for the event entity.

Optional.  

### addContentCategories

```
@CanIgnoreReturnValue
fun addContentCategories(contentCategories: (Mutable)List<Int!>!): EventEntity.Builder!
```

Add eligible content categories for the event entity.

Optional.  

### addContentCategory

```
@CanIgnoreReturnValue
fun addContentCategory(
    @EventEntity.EligibleContentCategory contentCategory: Int
): EventEntity.Builder!
```

Add eligible content category for the event entity.

Optional.  

### addPosterImage

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

Add a poster image of the entity.

Required.  

### addPosterImages

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

Add poster images of the entity.

Required.  

### addSubtitle

```
@CanIgnoreReturnValue
fun addSubtitle(subtitle: String!): EventEntity.Builder!
```

Add a subtitle for the event entity. e.g. "Over 50M users watched Hamilton already", "4 sessions every Monday"

Optional.  

### addSubtitles

```
@CanIgnoreReturnValue
fun addSubtitles(subtitles: (Mutable)List<String!>!): EventEntity.Builder!
```

Add subtitles for the event entity.

Optional.  

### build

```
fun build(): EventEntity!
```  

### setActionLinkUri

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

Sets the action link uri for the event entity.

Required.  

### setDescription

```
@CanIgnoreReturnValue
fun setDescription(description: String!): EventEntity.Builder!
```

Sets the description for the event entity.

Optional.  

### setEndTime

```
@CanIgnoreReturnValue
fun [setEndTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setEndTime(java.lang.Long))(endTime: Long!): EventEntity.Builder!
```
| **This function is deprecated.**   
|
| Use [setLocalizedEndTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedEndTime(com.google.android.engage.common.datamodel.LocalizedTimestamp)) instead.

Sets the end time of the event entity.

Optional.  

### setEntityId

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

Sets content id of the entity.

Optional.  

### setEventMode

```
@CanIgnoreReturnValue
fun setEventMode(@EventMode eventMode: Int): EventEntity.Builder!
```

Sets the event mode of the event entity.

Required.  

### setLocalizedEndTime

```
@CanIgnoreReturnValue
fun setLocalizedEndTime(localizedEndTime: LocalizedTimestamp!): EventEntity.Builder!
```

Sets the localized end time of the event reservation entity.

Optional.  

### setLocalizedStartTime

```
@CanIgnoreReturnValue
fun setLocalizedStartTime(localizedStartTime: LocalizedTimestamp!): EventEntity.Builder!
```

Sets the localized start time for the event reservation entity.

Required.  

### setLocation

```
@CanIgnoreReturnValue
fun setLocation(location: Address!): EventEntity.Builder!
```

Sets the location/address of the event entity.

Required if event mode is set to TYPE_IN_PERSON or TYPE_HYBRID.  

### setPrice

```
@CanIgnoreReturnValue
fun setPrice(price: Price!): EventEntity.Builder!
```

Sets the price for the event entity;

Optional.  

### setPriceCallout

```
@CanIgnoreReturnValue
fun setPriceCallout(priceCallout: String!): EventEntity.Builder!
```

Sets the price callout for the event entity. e.g. "Limited offer"

Optional.  

### setStartTime

```
@CanIgnoreReturnValue
fun [setStartTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setStartTime(java.lang.Long))(startTime: Long!): EventEntity.Builder!
```
| **This function is deprecated.**   
|
| Use [setLocalizedStartTime](https://developer.android.com/reference/kotlin/com/google/android/engage/travel/datamodel/EventEntity.Builder#setLocalizedStartTime(com.google.android.engage.common.datamodel.LocalizedTimestamp)) instead.

Sets the start time of the event entity.

Required.  

### setTitle

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

Sets the title of the event entity.

Required.