AdsApp.​MediaBundleAssetBuilder

Builds new media bundle assets.

Typical usage:

var assetBundleUrl = "http://www.example.com/example.zip";
var assetBundleBlob = UrlFetchApp.fetch(assetBundleUrl).getBlob();
var assetOperation = AdsApp.adAssets().newMediaBundleAssetBuilder()
   .withName("name")
   .withData(assetBundleBlob)
   .build();
var bundleAsset = assetOperation.getResult();

Methods:

MemberTypeDescription
build AdsApp.AssetOperation Creates a bundle asset.
withData AdsApp.MediaBundleAssetBuilder Sets new bundle asset's data to the specified value.
withName AdsApp.MediaBundleAssetBuilder Sets new bundle asset's name to the specified value.

build()

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

Return values:

TypeDescription
AdsApp.AssetOperation The asset operation.

withData(data)

Sets new bundle asset's data to the specified value. This field is required.

Arguments:

NameTypeDescription
data Blob.Blob The data for the asset bundle.

Return values:

TypeDescription
AdsApp.MediaBundleAssetBuilder The asset bundle builder with the specified data.

withName(name)

Sets new bundle asset's name to the specified value. This field is required.

Arguments:

NameTypeDescription
name String The name for the asset bundle.

Return values:

TypeDescription
AdsApp.MediaBundleAssetBuilder The asset bundle builder with the specified name.