ChannelMetadataBuilder
Builder that creates an instance of the ChannelMetadata
object.
Extends
Constructors
new ChannelMetadataBuilder()
new ChannelMetadataBuilder():
ChannelMetadataBuilder
Returns
Inherited from
Methods
attributes()
attributes(
attributes
):ChannelMetadataBuilder
Sets the channel attributes in the ChannelMetadata
builder.
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 "…".
Returns
The ChannelMetadataBuilder
object with channel attributes set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
build()
build():
IChannelMetadata
Builds the ChannelMetadata
object based on the fields in the ChannelMetadataBuilder
.
Returns
The built ChannelMetadata
object.
Throws
InvalidArgumentError
if one or more of the required fields are missing.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Overrides
channelGroupId()
channelGroupId(
channelGroupId
):ChannelMetadataBuilder
Sets the channel group ID in the ChannelMetadata
builder.
Parameters
channelGroupId
string
The channel group ID provided by your Amazon contact. This field has a maximum length of 8192 bytes.
Returns
The ChannelMetadataBuilder
object with channelGroupId set.
Details
This field is optional and generally not needed unless recommended by your Amazon contact.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if any of the fields in ExternId exceeds the maximum length of 8192 bytes.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
channelType()
channelType(
channelType
):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.
Parameters
channelType
Channel type that represents the source of the channel.
This must be one of the sources defined in the ChannelTypeEnum
.
Returns
The ChannelMetadataBuilder
object with channel type set.
Details
This field is required for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
externalIdList()
externalIdList(
externalIdList
):ChannelMetadataBuilder
Sets the channel ExternalId
list in the ChannelMetadata
builder.
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.
Returns
The ChannelMetadataBuilder
object with channel external id list set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if any of the fields in ExternalId exceeds the maximum length of 8192 bytes.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
genres()
genres(
genres
):ChannelMetadataBuilder
Sets the channel genres in the ChannelMetadata
builder.
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 "…".
Returns
The ChannelMetadataBuilder
object with channel genres set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
logoUrl()
logoUrl(
logoUrl
):ChannelMetadataBuilder
Sets the channel logo URL in the ChannelMetadata
builder.
Parameters
logoUrl
string
URL of the channel logo. Used to render channel thumbnails. This field has a maximum length of 8192 bytes.
Returns
The ChannelMetadataBuilder
object with channel logo url set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if the field exceeds the maximum length of 8192 bytes.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
name()
name(
name
):ChannelMetadataBuilder
Sets the channel name in the ChannelMetadata
builder.
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 "…".
Returns
The ChannelMetadataBuilder
object with channel name set.
Details
This field is required and cannot be an empty string for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
sortRank()
sortRank(
sortRank
):ChannelMetadataBuilder
Sets the channel sort rank in the ChannelMetadata
builder.
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.
Returns
The ChannelMetadataBuilder
object with channel sort rank set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
videoResolution()
videoResolution(
videoResolution
):ChannelMetadataBuilder
Sets the channel video resolution in the ChannelMetadata
builder.
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 "…".
Returns
The ChannelMetadataBuilder
object with channel video resolution set.
Details
This field is optional for the channel metadata.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if a string that is not valid UTF-8 is passed in.
Last updated: Sep 30, 2025