This is the legacy documentation for Google Ads scripts. Go to the current docs.

AdsApp.​VideoBuilder

Builder for a YouTube video under construction.

Typical usage:

 var youTubeVideoId = "123ABCabc-_";
 var mediaOperation = AdsApp.adMedia().newVideoBuilder()
    .withYouTubeVideoId(youTubeVideoId)
    .build();
 var video = mediaOperation.getResult();

Methods:

MemberTypeDescription
build AdsApp.MediaOperation Adds a video in media server.
withYouTubeVideoId AdsApp.VideoBuilder Sets YouTube video ID.

build()

Adds a video in media server. Returns a MediaOperation that can be used to get the new video (or access any associated errors if the creation failed).

Return values:

TypeDescription
AdsApp.MediaOperation The media operation.

withYouTubeVideoId(youTubeVideoId)

Sets YouTube video ID. This field is required.

Arguments:

NameTypeDescription
youTubeVideoId String The YouTube video ID.

Return values:

TypeDescription
AdsApp.VideoBuilder The video builder with the specified YouTube video ID.