AdsApp.Asset
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads asset. An asset can be an image, text, or video.
Assets are deduplicated within a given customer account, so assets may be
shared between different ads.
Methods:
Member | Type | Description |
getDimensions |
AdsApp.Dimensions |
Returns image dimension info if this asset is an image, or
null otherwise. |
getEntityType |
String |
Returns the type of this entity as a String , in this case,
"Asset" . |
getId |
String |
Returns the ID of the asset. |
getImageUrl |
String |
Returns the image URL if this asset is an image, or null
otherwise. |
getName |
String |
Returns the name of the asset object, or null if the asset was
created without a name. |
getResourceName |
String |
Returns the resource name of the asset. |
getText |
String |
Returns asset text if this is a text asset, or null otherwise. |
getType |
String |
Returns the asset object's type. |
getYouTubeVideoId |
String |
Returns the YouTube video ID if this asset is a YouTube video, or
null otherwise. |
getDimensions()
Returns image dimension info if this asset is an image, or
null
otherwise.
Return values:
Type | Description |
AdsApp.Dimensions |
Image dimension info if this asset is an image, or
null otherwise. |
getEntityType()
Returns the type of this entity as a
String
, in this case,
"Asset"
.
Return values:
Type | Description |
String |
Type of this entity: "Asset" . |
getId()
Returns the ID of the asset.
Return values:
Type | Description |
String |
The ID of the asset. |
getImageUrl()
Returns the image URL if this asset is an image, or
null
otherwise.
Return values:
Type | Description |
String |
The image URL if this asset is an image, or null
otherwise. |
getName()
Returns the name of the asset object, or
null
if the asset was
created without a name.
Return values:
Type | Description |
String |
The name of the asset object, or null if the asset was
created without a name. |
getResourceName()
Returns the resource name of the asset.
Return values:
Type | Description |
String |
The resource name of the asset. |
getText()
Returns asset text if this is a text asset, or
null
otherwise.
Return values:
Type | Description |
String |
Asset text if this is a text asset, or null otherwise. |
getType()
Returns the asset object's type. This is one of
IMAGE
,
MEDIA_BUNDLE
,
TEXT
, or
YOUTUBE_VIDEO
.
Return values:
Type | Description |
String |
The asset type. |
getYouTubeVideoId()
Returns the YouTube video ID if this asset is a YouTube video, or
null
otherwise.
Return values:
Type | Description |
String |
The YouTube video ID if this asset is a YouTube video, or
null otherwise. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[[["Represents a Google Ads asset, which can be an image, text, or video, used within ads."],["Assets are deduplicated within a customer account and can be shared across different ads."],["Provides methods to access asset properties like ID, name, type, and content (text, image URL, YouTube video ID)."],["Offers specific methods like `getDimensions()` for image assets and `getText()` for text assets to retrieve their respective data."]]],[]]