AdsApp.​YouTubeVideoAssetBuilder

Builds new YouTube video assets.

Typical usage:

var youTubeVideoId = "123ABCabc-_";
var assetOperation = AdsApp.adAssets().newYouTubeVideoAssetBuilder()
   .withName("name")
   .withYouTubeVideoId(youTubeVideoId)
   .build();
var videoAsset = assetOperation.getResult();

Methods:

MemberTypeDescription
build AdsApp.AssetOperation Creates a video asset.
withName AdsApp.YouTubeVideoAssetBuilder Sets new YouTube video asset's name to the specified value.
withYouTubeVideoId AdsApp.YouTubeVideoAssetBuilder Sets YouTube video ID.

build()

Creates a video asset. Returns an AssetOperation that can be used to get the new video asset (or access any associated errors if the creation failed).

Return values:

TypeDescription
AdsApp.AssetOperation The asset operation.

withName(name)

Sets new YouTube video asset's name to the specified value.

Arguments:

NameTypeDescription
name String The name for the video asset.

Return values:

TypeDescription
AdsApp.YouTubeVideoAssetBuilder The video asset builder with the specified name.

withYouTubeVideoId(youTubeVideoId)

Sets YouTube video ID. This field is required.

Arguments:

NameTypeDescription
youTubeVideoId String The YouTube video ID.

Return values:

TypeDescription
AdsApp.YouTubeVideoAssetBuilder The video asset builder with the specified YouTube video ID.