Typical usage:
if (ad.isType().expandedTextAd()) { var expandedTextAd = ad.asType().expandedTextAd(); var headlinePart1 = expandedTextAd.getHeadlinePart1(); }
Methods:
Member | Type | Description |
---|---|---|
expandedTextAd | AdsApp.ExpandedTextAd |
Returns the ad as an ExpandedTextAd. |
gmailImageAd | AdsApp.GmailImageAd |
Returns the ad as a GmailImageAd. |
gmailMultiProductAd | AdsApp.GmailMultiProductAd |
Returns the ad as a GmailMultiProductAd. |
gmailSinglePromotionAd | AdsApp.GmailSinglePromotionAd |
Returns the ad as a GmailSinglePromotionAd. |
html5Ad | AdsApp.Html5Ad |
Returns the ad as a Html5Ad. |
imageAd | AdsApp.ImageAd |
Returns the ad as an ImageAd. |
responsiveDisplayAd | AdsApp.ResponsiveDisplayAd |
Returns the ad as a ResponsiveDisplayAd. |
responsiveSearchAd | AdsApp.ResponsiveSearchAd |
Returns the ad as a ResponsiveSearchAd. |
expandedTextAd()
Returns the ad as an ExpandedTextAd. Calling this on an ad of a different type will
result in an error.Return values:
Type | Description |
---|---|
AdsApp.ExpandedTextAd |
The ad as an ExpandedTextAd. |
gmailImageAd()
Returns the ad as a GmailImageAd. Calling this on an ad of a different type will result
in an error.Return values:
Type | Description |
---|---|
AdsApp.GmailImageAd |
The ad as a GmailImageAd. |
gmailMultiProductAd()
Returns the ad as a GmailMultiProductAd. Calling this on an ad of a different type will
result in an error.Return values:
Type | Description |
---|---|
AdsApp.GmailMultiProductAd |
The ad as a GmailMultiProductAd. |
gmailSinglePromotionAd()
Returns the ad as a GmailSinglePromotionAd. Calling this on an ad of a different type
will result in an error.Return values:
Type | Description |
---|---|
AdsApp.GmailSinglePromotionAd |
The ad as a GmailSinglePromotionAd. |
html5Ad()
Returns the ad as a Html5Ad. Calling this on an ad of a different type will result in
an error.Return values:
Type | Description |
---|---|
AdsApp.Html5Ad |
The ad as a Html5Ad. |
imageAd()
Returns the ad as an ImageAd. Calling this on an ad of a different type will result in
an error.Return values:
Type | Description |
---|---|
AdsApp.ImageAd |
The ad as an ImageAd. |
responsiveDisplayAd()
Returns the ad as a ResponsiveDisplayAd. Calling this on an ad of a different type will
result in an error.Return values:
Type | Description |
---|---|
AdsApp.ResponsiveDisplayAd |
The ad as a ResponsiveDisplayAd. |
responsiveSearchAd()
Returns the ad as a ResponsiveSearchAd. Calling this on an ad of a different type will
result in an error.Return values:
Type | Description |
---|---|
AdsApp.ResponsiveSearchAd |
The ad as a ResponsiveSearchAd. |