Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ILiveEventBuilder

interface ILiveEventBuilder
Extends com.amazon.apmf.IStandard Builder that will create the LiveEvent object.

Methods

identifier()

ILiveEventBuilder* identifier(string identifier)
Sets the unique identifer of the live event in the live event builder and returns an instance of the builder.

Parameters

identifier
string — Required The unique identifier for a specific live event. This identifier should be unique across all live events within the application package. This identifier should not change for a specific live event between updates. This field is required and has a maximum length of 8192 bytes.

Returns

ILiveEventBuilder* The LiveEventBuilder object with identifier set.

Throws


eventType()

ILiveEventBuilder* eventType(EventType eventType)
Sets the type of the live event in the live event builder and returns an instance of the builder.

Parameters

eventType
EventType — Required The type of the live event. This field is required. This must be one of the types defined in the EventType struct.

Returns

ILiveEventBuilder* The LiveEventBuilder object with eventType set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.

playbackReference()

ILiveEventBuilder* playbackReference(IPlaybackReference* playbackReference)
Sets the playback reference of the live event in the live event builder and returns an instance of the builder.

Parameters

playbackReference
IPlaybackReference* — Required The playback reference of the live event, which describes how to start playback. This field is required.

Returns

ILiveEventBuilder* The LiveEventBuilder object with playbackReference set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.

startTime()

ILiveEventBuilder* startTime(com.amazon.apmf.RealTimeInstant startTime)
Sets the start time of the live event in the live event builder and returns an instance of the builder.

Parameters

startTime
com.amazon.apmf.RealTimeInstant — Required The epoch time indicating the start time of a live event. This field can represent a past or future value. This field is required if eventType is set to SCHEDULED_EVENT.

Returns

ILiveEventBuilder* The LiveEventBuilder object with startTime set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.

endTime()

ILiveEventBuilder* endTime(com.amazon.apmf.RealTimeInstant endTime)
Sets the end time of the live event in the live event builder and returns an instance of the builder.

Parameters

endTime
com.amazon.apmf.RealTimeInstant — Required The epoch time indicating the end time of a live event. This field can represent a past or future value. This field is required if eventType is set to SCHEDULED_EVENT.

Returns

ILiveEventBuilder* The LiveEventBuilder object with endTime set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.

title()

ILiveEventBuilder* title(string title)
Sets the title of the live event in the live event builder and returns an instance of the builder.

Parameters

title
string — Required The title of the live event. This field is required. The string will be truncated if its length exceeds 255 bytes and the last 3 bytes will be replaced with ”…”.

Returns

ILiveEventBuilder* The LiveEventBuilder object with title set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError — if a string that is not valid UTF-8 is passed in.

description()

ILiveEventBuilder* description(string description)
Sets the description of the live event in the live event builder and returns an instance of the builder.

Parameters

description
string — Required The brief description of the live event. This field is optional. The string will be truncated if its length exceeds 8192 bytes and the last 3 bytes will be replaced with ”…”.

Returns

ILiveEventBuilder* The LiveEventBuilder object with description set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError — if a string that is not valid UTF-8 is passed in.

ratings()

ILiveEventBuilder* ratings(string[] ratings)
Sets the ratings of the live event in the live event builder and returns an instance of the builder.

Parameters

ratings
string[] — Required The list of strings used to indicate the level of parental guidance recommended for the particular live event. This can be any rating system used in the country or region where the live event is broadcasted. Providing parental guidance ratings is optional but they SHALL be provided if known. Please refer to the developer guide for a recommended list of canonical values for this field. The maximum size of the list is 32. If there are more than 32 items, the extra items will be removed. The maximmum size of each item is 255 bytes, any items that exceeds this length will be truncated and the last 3 bytes replaced with ”…”.

Returns

ILiveEventBuilder* The LiveEventBuilder object with ratings set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError — if a string that is not valid UTF-8 is passed in.

genres()

ILiveEventBuilder* genres(string[] genres)
Sets the genres of the live event in the live event builder and returns an instance of the builder.

Parameters

genres
string[] — Required The list of genres that apply to the live event. Please refer to the developer guide for a recommended list of canonical values for this field. Providing genres is optional but they SHALL be provided if known. The maximum size of the list is 32. If there are more than 32 items, the extra items will be removed. The maximmum size of each item is 255 bytes, any items that exceeds this length will be truncated and the last 3 bytes replaced with ”…”.

Returns

ILiveEventBuilder* The LiveEventBuilder object with genres set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError — if a string that is not valid UTF-8 is passed in.

logoUrl()

ILiveEventBuilder* logoUrl(string logoUrl)
Sets the logo URL of the live event in the live event builder and returns an instance of the builder.

Parameters

logoUrl
string — Required The URL where the live event logo can be found. This field is optional. This field has a maximum length of 8192 bytes.

Returns

ILiveEventBuilder* The LiveEventBuilder object with logoUrl set.

Throws


posterArtUrl()

ILiveEventBuilder* posterArtUrl(string posterArtUrl)
Sets the poster art URL of the live event in the live event builder and returns an instance of the builder.

Parameters

posterArtUrl
string — Required The URL where the poster art image can be found. This field is optional. This field has a maximum length of 8192 bytes.

Returns

ILiveEventBuilder* The LiveEventBuilder object with posterArtUrl set.

Throws


attributes()

ILiveEventBuilder* attributes(string[] attributes)
Sets the attributes of the live event in the live event builder and returns an instance of the builder.

Parameters

attributes
string[] — Required Properties of the live event. Please refer to the developer guide for a recommended list of canonical values for this field. This field is optional but SHALL be provided if known. The maximum size of the list is 32. If there are more than 32 items, the extra items will be removed. The maximmum size of each item is 255 bytes, any items that exceeds this length will be truncated and the last 3 bytes replaced with ”…”.

Returns

ILiveEventBuilder* The LiveEventBuilder object with attributes set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError — if a string that is not valid UTF-8 is passed in.

sortRank()

ILiveEventBuilder* sortRank(i32 sortRank)
Optional function to set the sort rank of the live event in the live event builder and returns an instance of the builder. Live events with lower integer values for the sort rank will be displayed before live events with higher sort rank values in the row for this app. This field is optional, and will be defaulted to MAX Int32 if not provided. If two or more live events have the same sort rank, they will be sorted alphabetically by their titles.

Parameters

sortRank
i32 — Required The sorting rank of this live event relative to other live events.

Returns

ILiveEventBuilder* The LiveEventBuilder object with sortRank set.

Throws

  • IllegalStateError — if the function is called after this builder instance has already built an object once.

build()

ILiveEvent* build()
Builds and returns a pointer to an instance of the ILiveEvent object. This function should be called after the desired fields of the live event builder have been set using the other builder functions. The build() function should only be called once per builder object.

Returns

ILiveEvent* An instance of a LiveEvent object with all of the data that was set.

Throws

  • InvalidArgumentError — if one or more of the required fields are not provided to the builder.
  • IllegalStateError — if the function is called after this builder instance has already built an object once.

Last modified on October 29, 2026