AdsApp.​VideoAdGroupBuilder

Builder for a video ad group under construction.

Typical usage:

var videoAdGroupBuilder = videoCampaign.newVideoAdGroupBuilder();
var videoAdGroupOperation = videoAdGroupBuilder
   .withName("ad group name")
   .withStatus("PAUSED")
   .withAdGroupType('TRUE_VIEW_IN_STREAM')
   .build();
var videoAdGroup = videoAdGroupOperation.getResult();

Methods:

MemberTypeDescription
build AdsApp.VideoAdGroupOperation Creates a VideoAdGroup.
withAdGroupType AdsApp.VideoAdGroupBuilder Sets the video ad group type, either TRUE_VIEW_IN_STREAM, TRUE_VIEW_IN_DISPLAY, NON_SKIPPABLE_IN_STREAM, BUMPER, VIDEO_EFFICIENT_REACH, or VIDEO_RESPONSIVE.
withCpa AdsApp.VideoAdGroupBuilder Sets the Target CPA bid of the new video ad group to the specified value.
withCpm AdsApp.VideoAdGroupBuilder Sets the CPM bid of the new video ad group to the specified value.
withCpv AdsApp.VideoAdGroupBuilder Sets the max CPV bid of the new video ad group to the specified value.
withName AdsApp.VideoAdGroupBuilder Sets the name of the new ad group to the specified value.
withStatus AdsApp.VideoAdGroupBuilder Sets the status of the new ad group to the specified value.
withTargetCpm AdsApp.VideoAdGroupBuilder Sets the Target CPM bid of the new video ad group to the specified value.

build()

Creates a VideoAdGroup. Returns an VideoAdGroupOperation that can be used to get the new ad group (or access any associated errors if creation failed).

Return values:

TypeDescription
AdsApp.VideoAdGroupOperation The associated ad group operation.

withAdGroupType(adGroupType)

Sets the video ad group type, either TRUE_VIEW_IN_STREAM, TRUE_VIEW_IN_DISPLAY, NON_SKIPPABLE_IN_STREAM, BUMPER, VIDEO_EFFICIENT_REACH, or VIDEO_RESPONSIVE. This field is required.

Arguments:

NameTypeDescription
adGroupType String The type of the ad group.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder Ad group builder with the specified ad group type.

withCpa(cpa)

Sets the Target CPA bid of the new video ad group to the specified value.

If the bid is not set, the ad group will use the campaign's default target CPA bid.

Arguments:

NameTypeDescription
cpa double The Target CPA bid of the video ad group.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder The video ad group builder with the specified Target CPA.

withCpm(cpm)

Sets the CPM bid of the new video ad group to the specified value.

See Cost-per-thousand impressions (CPM) for more information.

If the bid is not set, the ad group will assume a default max CPM bid of $0.01.

Arguments:

NameTypeDescription
cpm double The CPM bid of the video ad group.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder The video ad group builder with the specified CPM.

withCpv(cpv)

Sets the max CPV bid of the new video ad group to the specified value.

If the bid is not set, the ad group will assume a default max CPV bid of $0.01.

Arguments:

NameTypeDescription
cpv double The max CPV bid of the video ad group.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder The video ad group builder with the specified max CPV.

withName(name)

Sets the name of the new ad group to the specified value. If ad group name is not set, the ad group will assume a default name ('Ad Group #5').

Arguments:

NameTypeDescription
name String Ad group name.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder Ad group builder with the specified name.

withStatus(status)

Sets the status of the new ad group to the specified value. If the status is not set, it will default to ENABLED.

Arguments:

NameTypeDescription
status String Ad group status.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder Ad group builder with the specified status.

withTargetCpm(targetCpm)

Sets the Target CPM bid of the new video ad group to the specified value.

If the bid is not set, the ad group will assume a default CPM bid of $0.01.

Arguments:

NameTypeDescription
targetCpm double The Target CPM bid of the video ad group.

Return values:

TypeDescription
AdsApp.VideoAdGroupBuilder The video ad group builder with the specified Target CPM.