EventEntity.Builder


public final class EventEntity.Builder


Builder class for EventEntity.

Summary

Public constructors

Public methods

EventEntity.Builder

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

EventEntity.Builder

Add badges for the event entity.

EventEntity.Builder

Add eligible content categories for the event entity.

EventEntity.Builder

Add eligible content category for the event entity.

EventEntity.Builder

Add a poster image of the entity.

EventEntity.Builder

Add poster images of the entity.

EventEntity.Builder

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

EventEntity.Builder

Add subtitles for the event entity.

EventEntity
EventEntity.Builder

Sets the action link uri for the event entity.

EventEntity.Builder

Sets the description for the event entity.

EventEntity.Builder

This method is deprecated.

Use setLocalizedEndTime instead.

EventEntity.Builder

Sets content id of the entity.

EventEntity.Builder

Sets the event mode of the event entity.

EventEntity.Builder

Sets the localized end time of the event reservation entity.

EventEntity.Builder

Sets the localized start time for the event reservation entity.

EventEntity.Builder

Sets the location/address of the event entity.

EventEntity.Builder

Sets the price for the event entity;

EventEntity.Builder

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

EventEntity.Builder

This method is deprecated.

Use setLocalizedStartTime instead.

EventEntity.Builder

Sets the title of the event entity.

Public constructors

Builder

public Builder()

Public methods

addBadge

@CanIgnoreReturnValue
public EventEntity.Builder addBadge(Badge badge)

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

Optional.

addBadges

@CanIgnoreReturnValue
public EventEntity.Builder addBadges(List<Badge> badges)

Add badges for the event entity.

Optional.

addContentCategories

@CanIgnoreReturnValue
public EventEntity.Builder addContentCategories(List<Integer> contentCategories)

Add eligible content categories for the event entity.

Optional.

addContentCategory

@CanIgnoreReturnValue
public EventEntity.Builder addContentCategory(
    @EventEntity.EligibleContentCategory int contentCategory
)

Add eligible content category for the event entity.

Optional.

addPosterImage

@CanIgnoreReturnValue
public EventEntity.Builder addPosterImage(Image image)

Add a poster image of the entity.

Required.

addPosterImages

@CanIgnoreReturnValue
public EventEntity.Builder addPosterImages(List<Image> images)

Add poster images of the entity.

Required.

addSubtitle

@CanIgnoreReturnValue
public EventEntity.Builder addSubtitle(String subtitle)

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

Optional.

addSubtitles

@CanIgnoreReturnValue
public EventEntity.Builder addSubtitles(List<String> subtitles)

Add subtitles for the event entity.

Optional.

build

public EventEntity build()

setActionLinkUri

@CanIgnoreReturnValue
public EventEntity.Builder setActionLinkUri(Uri actionLinkUri)

Sets the action link uri for the event entity.

Required.

setDescription

@CanIgnoreReturnValue
public EventEntity.Builder setDescription(String description)

Sets the description for the event entity.

Optional.

setEndTime

@CanIgnoreReturnValue
public EventEntity.Builder setEndTime(Long endTime)

Sets the end time of the event entity.

Optional.

setEntityId

@CanIgnoreReturnValue
public EventEntity.Builder setEntityId(String entityId)

Sets content id of the entity.

Optional.

setEventMode

@CanIgnoreReturnValue
public EventEntity.Builder setEventMode(@EventMode int eventMode)

Sets the event mode of the event entity.

Required.

setLocalizedEndTime

@CanIgnoreReturnValue
public EventEntity.Builder setLocalizedEndTime(LocalizedTimestamp localizedEndTime)

Sets the localized end time of the event reservation entity.

Optional.

setLocalizedStartTime

@CanIgnoreReturnValue
public EventEntity.Builder setLocalizedStartTime(LocalizedTimestamp localizedStartTime)

Sets the localized start time for the event reservation entity.

Required.

setLocation

@CanIgnoreReturnValue
public EventEntity.Builder setLocation(Address location)

Sets the location/address of the event entity.

Required if event mode is set to TYPE_IN_PERSON or TYPE_HYBRID.

setPrice

@CanIgnoreReturnValue
public EventEntity.Builder setPrice(Price price)

Sets the price for the event entity;

Optional.

setPriceCallout

@CanIgnoreReturnValue
public EventEntity.Builder setPriceCallout(String priceCallout)

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

Optional.

setStartTime

@CanIgnoreReturnValue
public EventEntity.Builder setStartTime(Long startTime)

Sets the start time of the event entity.

Required.

setTitle

@CanIgnoreReturnValue
public EventEntity.Builder setTitle(@NonNull String title)

Sets the title of the event entity.

Required.