For types that are not fully supported, use Ad.getType instead.
Typical usage:
if (ad.isType().expandedTextAd()) { var expandedTextAd = ad.asType().expandedTextAd(); var headlinePart1 = expandedTextAd.getHeadlinePart1(); }
Methods:
Member | Type | Description |
---|---|---|
expandedTextAd | boolean |
Returns whether the ad is an ExpandedTextAd. |
gmailImageAd | boolean |
Returns whether the ad is a GmailImageAd. |
gmailMultiProductAd | boolean |
Returns whether the ad is a GmailMultiProductAd. |
gmailSinglePromotionAd | boolean |
Returns whether the ad is a GmailSinglePromotionAd. |
html5Ad | boolean |
Returns whether the ad is a Html5Ad . |
imageAd | boolean |
Returns whether the ad is an ImageAd. |
responsiveDisplayAd | boolean |
Returns whether the ad is a ResponsiveDisplayAd. |
responsiveSearchAd | boolean |
Returns whether the ad is a ResponsiveSearchAd. |
expandedTextAd()
Returns whether the ad is an ExpandedTextAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is an ExpandedTextAd. |
gmailImageAd()
Returns whether the ad is a GmailImageAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a GmailImageAd. |
gmailMultiProductAd()
Returns whether the ad is a GmailMultiProductAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a GmailMultiProductAd. |
gmailSinglePromotionAd()
Returns whether the ad is a GmailSinglePromotionAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a GmailSinglePromotionAd. |
html5Ad()
Returns whether the ad is a Html5Ad
. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a Html5Ad . |
imageAd()
Returns whether the ad is an ImageAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is an ImageAd. |
responsiveDisplayAd()
Returns whether the ad is a ResponsiveDisplayAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a ResponsiveDisplayAd. |
responsiveSearchAd()
Returns whether the ad is a ResponsiveSearchAd. Return values:
Type | Description |
---|---|
boolean |
Whether the ad is a ResponsiveSearchAd. |