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 IProgramBuilder

interface IProgramBuilder
Extends com.amazon.apmf.IStandard Builder that will create the Program object.

Methods

identifier()

IProgramBuilder* identifier(string identifier)
Sets the identifer of the program in the program builder and returns an instance of the builder.

Parameters

identifier
string — Required The identifier for a program in an electronic program guide list. This field is required and has a maximum length of 8192 bytes.

Returns

IProgramBuilder* The ProgramBuilder object with identifier set.

Throws


channelDescriptor()

IProgramBuilder* channelDescriptor(IChannelDescriptor* channelDescriptor)
Sets the channel descriptor of the program in the program builder and returns an instance of the builder.

Parameters

channelDescriptor
IChannelDescriptor* — Required The uniquely identifying descriptor of the channel on which this program is airing. This field is required.

Returns

IProgramBuilder* The ProgramBuilder object with channelDescriptor set.

Throws

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

startTime()

IProgramBuilder* startTime(com.amazon.apmf.RawTimeValue startTime)
Sets the start time of the program in the program builder and returns an instance of the builder.

Parameters

startTime
com.amazon.apmf.RawTimeValue — Required The epoch time indicating the start time of a program. This field can represent a past or future value. This field is required.

Returns

IProgramBuilder* The ProgramBuilder object with startTime set.

Throws

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

endTime()

IProgramBuilder* endTime(com.amazon.apmf.RawTimeValue endTime)
Sets the end time of the program in the program builder and returns an instance of the builder.

Parameters

endTime
com.amazon.apmf.RawTimeValue — Required The epoch time indicating the end time of a program. This field can represent a past or future value. This field is required.

Returns

IProgramBuilder* The ProgramBuilder object with endTime set.

Throws

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

title()

IProgramBuilder* title(string title)
Sets the title of the program in the program builder and returns an instance of the builder.

Parameters

title
string — Required The title or name for the specific program. For example, “MCIS: Los Angeles”. 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

IProgramBuilder* The ProgramBuilder 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.

subtitle()

IProgramBuilder* subtitle(string subtitle)
Sets the subtitle of the program in the program builder and returns an instance of the builder.

Parameters

subtitle
string — Required The subordinate title for a specific program. For example, “Maybe Today” which is an episode name for “MCIS: Los Angeles”. This field is optional but SHALL be provided if applicable and known. The string will be truncated if its length exceeds 255 bytes and the last 3 bytes will be replaced with ”…”.

Returns

IProgramBuilder* The ProgramBuilder object with subtitle 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()

IProgramBuilder* description(string description)
Sets the description of the program in the program builder and returns an instance of the builder.

Parameters

description
string — Required The brief description for the specific program. For example, a description of an episode. This field is optional but SHALL be provided if known. The string will be truncated if its length exceeds 8192 bytes and the last 3 bytes will be replaced with ”…”.

Returns

IProgramBuilder* The ProgramBuilder 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()

IProgramBuilder* ratings(string[] ratings)
Sets the ratings of the program in the program 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 program. This can be any rating system used in the country or region where the program 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

IProgramBuilder* The ProgramBuilder 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()

IProgramBuilder* genres(string[] genres)
Sets the genres of the program in the program builder and returns an instance of the builder.

Parameters

genres
string[] — Required The list of genres that apply to the program. 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

IProgramBuilder* The ProgramBuilder 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.

thumbnailUrl()

IProgramBuilder* thumbnailUrl(string thumbnailUrl)
Sets the thumbnailUrl of the program in the program builder and returns an instance of the builder.

Parameters

thumbnailUrl
string — Required The URL where the thumbnail image can be found. Used to render program thumbnails. This field is optional. This field has a maximum length of 8192 bytes.

Returns

IProgramBuilder* The ProgramBuilder object with thumbnailUrl set.

Throws


posterArtUrl()

IProgramBuilder* posterArtUrl(string posterArtUrl)
Sets the posterArtUrl of the program in the program builder and returns an instance of the builder.

Parameters

posterArtUrl
string — Required The URL where the poster art image can be found. Used to render larger sized program images such as the background banner for the detail view. This field is optional. This field has a maximum length of 8192 bytes.

Returns

IProgramBuilder* The ProgramBuilder object with posterArtUrl set.

Throws


seriesInfo()

IProgramBuilder* seriesInfo(ISeriesInfo* seriesInfo)
Sets the seriesInfo of the program in the program builder and returns an instance of the builder.

Parameters

seriesInfo
ISeriesInfo* — Required Series-related information for the program, such as season and episode number. This field is optional but SHOULD be provided if the program represents an episode and this information is available.

Returns

IProgramBuilder* The ProgramBuilder object with seriesInfo set.

Throws

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

attributes()

IProgramBuilder* attributes(string[] attributes)
Sets the attributes in the program builder and returns an instance of the builder.

Parameters

attributes
string[] — Required Properties of the program. 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

IProgramBuilder* The ProgramBuilder 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.

build()

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

Returns

IProgram* An instance of a Program 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