as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
Builder that creates an instance of the Program object.

Extends

  • Builder

Constructors

new ProgramBuilder()

new ProgramBuilder(): ProgramBuilder

Returns

ProgramBuilder

Methods

attributes()

attributes(attributes: string[]): ProgramBuilder
Sets the attributes of the Program. This field is optional for the program.

Parameters

attributes
string[] of the Program. 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 ”…”.

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with attributes set.

build()

build(): IProgram
Builds the Program object from the provided parameters.

Throws

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

Returns

IProgram IProgram The built Program object.

channelDescriptor()

channelDescriptor(channelDescriptor: IChannelDescriptor): ProgramBuilder
Sets the ChannelDescriptor of the program. This field is required in order to build a Program object.

Parameters

channelDescriptor
IChannelDescriptor The uniquely identifying descriptor of the channel on which this program is airing.

Throws

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

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with ChannelDescriptor set.

description()

description(description: string): ProgramBuilder
Sets the description of the program. This field is optional but SHALL be provided if known.

Parameters

description
string The brief description for the specific program. For example, a description of an episode. The string will be truncated with ”…” if its length exceeds 8192 bytes.

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with description set.

endTimeMs()

endTimeMs(endTimeMs: number): ProgramBuilder
Sets the end time of the program. This field is required in order to build a Program object.

Parameters

endTimeMs
number The epoch time (in ms sinch epoch) indicating the end time of a program. This field can represent a past or future value.

Throws

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

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with end time set.

genres()

genres(genres: string[]): ProgramBuilder
Sets the genres of the program. This field is optional but SHALL be provided if known.

Parameters

genres
string[] 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. 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 ”…”.

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with genres set.

identifier()

identifier(identifier: string): ProgramBuilder
Sets the identifier of the program.

Parameters

identifier
string The identifier for a program in an electronic program guide list. This field is required in order to build the Program. This field has a maximum length of 8192 bytes.

Throws

  • IllegalStateError if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError if the field exceeds the maximum length of 8192 bytes.
  • InvalidArgumentError if a string that is not valid UTF-8 is passed in.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with program identifier set.

posterArtUrl()

posterArtUrl(url: string): ProgramBuilder
Sets the poster art url of the program. This field is optional but SHALL be provided if known.

Parameters

url
string

Throws

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

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with poster art url set.

ratings()

ratings(ratings: string[]): ProgramBuilder
Sets the ratings of the program. This field is optional but SHALL be provided if known.

Parameters

ratings
string[] The list of strings used to indicate the level of parental guidance recommended for a particular program. This can be any rating system used in the country or region where the program is broadcasted. 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 ”…”.

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with ratings set.

seriesInfo()

seriesInfo(seriesInfo: ISeriesInfo): ProgramBuilder
Sets the series information of the program. This field is optional but SHALL be provided if the program represents an episode and this information is available.

Parameters

seriesInfo
ISeriesInfo Series-related information for the program, such as season and episode number.

Throws

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

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with seriesInfo set.

startTimeMs()

startTimeMs(starTime: number): ProgramBuilder
Sets the start time of the program. This field is required in order to build a Program object.

Parameters

starTime
number

Throws

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

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with start time set.

subtitle()

subtitle(subtitle: string): ProgramBuilder
Sets the subtitle of the program. This field is optional but SHALL be provided if applicable and known.

Parameters

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

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with subtitle set.

thumbnailUrl()

thumbnailUrl(url: string): ProgramBuilder
Sets the thumbnail url of the program. This field is optional but SHALL be provided if known.

Parameters

url
string

Throws

  • IllegalStateError if the function is called after this builder instance has already built an object once.
  • InvalidArgumentError if the field exceeds the maximum length of 8192 bytes.
  • InvalidArgumentError if a string that is not valid UTF-8 is passed in.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with thumbnail url set.

title()

title(title: string): ProgramBuilder
Sets the title of the program. This field is required in order to build a Program object.

Parameters

title
string The title or name for the specific program. For example, “MCIS: Los Angeles”. The string will be truncated if its length exceeds 255 bytes and the last 3 bytes will be replaced with ”…”.

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.

Returns

ProgramBuilder ProgramBuilder The ProgramBuilder object with title set.
最終更新日 2026年8月25日