Interface ILiveEventBuilder
interface ILiveEventBuilder
Extends com.amazon.apmf.IStandard
Builder that will create the LiveEvent object.
Methods
identifier()
Sets the unique identifer of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*identifier(stringidentifier)
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
IllegalStateError— if the function is called after this builder instance has already built an object once.InvalidArgumentError— if the field exceeds maximum length of 8192 bytes.InvalidArgumentError— if a string that is not valid UTF-8 is passed in.
eventType()
Sets the type of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*eventType(EventTypeeventType)
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()
Sets the playback reference of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*playbackReference(IPlaybackReference*playbackReference)
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()
Sets the start time of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*startTime(com.amazon.apmf.RealTimeInstantstartTime)
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()
Sets the end time of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*endTime(com.amazon.apmf.RealTimeInstantendTime)
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()
Sets the title of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*title(stringtitle)
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()
Sets the description of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*description(stringdescription)
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()
Sets the ratings of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*ratings(string[]ratings)
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()
Sets the genres of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*genres(string[]genres)
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()
Sets the logo URL of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*logoUrl(stringlogoUrl)
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
IllegalStateError— if the function is called after this builder instance has already built an object once.InvalidArgumentError— if the field exceeds maximum length of 8192 bytes.InvalidArgumentError— if a string that is not valid UTF-8 is passed in.
posterArtUrl()
Sets the poster art URL of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*posterArtUrl(stringposterArtUrl)
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
IllegalStateError— if the function is called after this builder instance has already built an object once.InvalidArgumentError— if the field exceeds maximum length of 8192 bytes.InvalidArgumentError— if a string that is not valid UTF-8 is passed in.
attributes()
Sets the attributes of the live event in the live event builder and returns an instance of the builder.ILiveEventBuilder*attributes(string[]attributes)
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()
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.ILiveEventBuilder*sortRank(i32sortRank)
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()
Builds and returns a pointer to an instance of theILiveEvent*build()
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.

