ChannelMetadataBuilder
Builder that creates an instance of the ChannelMetadata object.
Extends
Builder
Constructors
new ChannelMetadataBuilder()
new ChannelMetadataBuilder(): ChannelMetadataBuilder
Returns
Methods
attributes()
attributes(attributes:
string[]): ChannelMetadataBuilder
Sets the channel attributes in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
attributes
string[]
Attributes of the channel. 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
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel attributes set.
build()
build(): IChannelMetadata
Builds the ChannelMetadata object based on the fields in the ChannelMetadataBuilder.
Throws
InvalidArgumentErrorif one or more of the required fields are missing.IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
IChannelMetadata The built ChannelMetadata object.
channelGroupId()
channelGroupId(channelGroupId:
string): ChannelMetadataBuilder
Sets the channel group ID in the ChannelMetadata builder.
This field is optional and generally not needed unless recommended by your Amazon contact.
Parameters
channelGroupId
string
The channel group ID provided by your Amazon contact. This field has a maximum length of 8192 bytes.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif any of the fields in ExternId exceeds the maximum length of 8192 bytes.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channelGroupId set.
channelType()
channelType(channelType: ChannelTypeEnum): ChannelMetadataBuilder
Sets the channel type in the ChannelMetadata builder.
This field should only be set to OTT as the other channel types are not available yet.
This field is required for the channel metadata.
Parameters
channelType
Channel type that represents the source of the channel.
This must be one of the sources defined in the ChannelTypeEnum.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel type set.
externalIdList()
externalIdList(externalIdList: IExternalId
[]): ChannelMetadataBuilder
Sets the channel ExternalId list in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
externalIdList
List of identifiers for external lineup sources.
to which the channel should be associated.
The maximum size of the list is 255. If there are more than 255 items, the extra items will be removed.
The maximum length for a field in IExtrnalId is 8192 bytes.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif any of the fields in ExternalId exceeds the maximum length of 8192 bytes.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel external id list set.
genres()
genres(genres:
string[]): ChannelMetadataBuilder
Sets the channel genres in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
genres
string[]
List of genres that apply to the channel. 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
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel genres set.
logoUrl()
logoUrl(logoUrl:
string): ChannelMetadataBuilder
Sets the channel logo URL in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
logoUrl
string
URL of the channel logo. Used to render channel thumbnails. This field has a maximum length of 8192 bytes.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif the field exceeds the maximum length of 8192 bytes.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel logo url set.
name()
name(name:
string): ChannelMetadataBuilder
Sets the channel name in the ChannelMetadata builder.
This field is required and cannot be an empty string for the channel metadata.
Parameters
name
string
Indicates the marketing name for the channel, such as “The CW" or "Comedy Central". The string will be truncated if its length exceeds 255 bytes and the last 3 bytes will be replaced with "…".
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel name set.
sortRank()
sortRank(sortRank:
number): ChannelMetadataBuilder
Sets the channel sort rank in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
sortRank
number
Sort rank of this channel relative to other channels. Channels with lower integer values for the sort rank will be display before channels with higher sort rank values in the Electronic Programming Guide (EPG) for this app. This field is optional, and will be defaulted to MAX Int32 if not provided. Please reach out to your Amazon contact if you want to display channels according to their sort rank values.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel sort rank set.
videoResolution()
videoResolution(videoResolution:
string): ChannelMetadataBuilder
Sets the channel video resolution in the ChannelMetadata builder.
This field is optional for the channel metadata.
Parameters
videoResolution
string
Video resolution of the channel. Please refer to the developer guide for a recommended list of canonical values for this field. The string will be truncated if its length exceeds 127 bytes and the last 3 bytes will be replaced with "…".
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelMetadataBuilder The ChannelMetadataBuilder object with channel video resolution set.
Last updated: Jul 31, 2026

