Google Ads Ad Manager V1 Client - Class Creative (0.15.0)

Reference documentation and code samples for the Google Ads Ad Manager V1 Client class Creative.

The Creative resource.

Generated from protobuf message google.ads.admanager.v1.Creative

Namespace

Google \ Ads \ AdManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ ad_exchange_creative AdExchangeCreativeDetails

Optional. An Ad Exchange dynamic allocation creative.

↳ ad_sense_creative AdSenseCreativeDetails

Optional. An AdSense dynamic allocation creative.

↳ aspect_ratio_image_creative AspectRatioImageCreativeDetails

Optional. A Creative intended for mobile platforms that displays an image, whose size is defined as an aspect ratio. It can have multiple images whose dimensions conform to that aspect ratio.

↳ audio_creative AudioCreativeDetails

Optional. A Creative that contains Ad Manager hosted audio ads and is served via VAST XML.

↳ audio_redirect_creative AudioRedirectCreativeDetails

Optional. A Creative that contains externally hosted audio ads and is served via VAST XML.

↳ click_tracking_creative ClickTrackingCreativeDetails

Optional. A creative that is used for tracking clicks on ads that are served directly from the customers' web servers or media servers. NOTE: The size attribute is not used for click tracking creative and it will not be persisted upon save.

↳ custom_creative CustomCreativeDetails

Optional. A Creative that contains a custom HTML snippet and file assets.

↳ html5_creative Html5CreativeDetails

Optional. A Creative that contains a zipped HTML5 bundle asset, a list of third party impression trackers, and a third party click tracker.

↳ image_creative ImageCreativeDetails

Optional. A Creative that displays an image.

↳ image_overlay_creative ImageOverlayCreativeDetails

Optional. An overlay Creative that displays an image and is served via VAST 2.0 XML. Overlays cover part of the video content they are displayed on top of.

↳ image_redirect_creative ImageRedirectCreativeDetails

Optional. A Creative that loads an image asset from a specified URL.

↳ image_redirect_overlay_creative ImageRedirectOverlayCreativeDetails

Optional. An overlay Creative that loads an image asset from a specified URL and is served via VAST XML. Overlays cover part of the video content they are displayed on top of. This creative is read only.

↳ internal_redirect_creative InternalRedirectCreativeDetails

Optional. A Creative hosted by Campaign Manager 360. Similar to third-party creatives, a Campaign Manager 360 tag is used to retrieve a creative asset. However, Campaign Manager 360 tags are not sent to the user's browser. Instead, they are processed internally within the Google Marketing Platform system.

↳ legacy_dfp_creative LegacyDfpCreativeDetails

Optional. A Creative that isn't supported by Google DFP, but was migrated from DART. Creatives of this type cannot be created or modified.

↳ programmatic_creative ProgrammaticCreativeDetails

Optional. A Creative used for programmatic trafficking. This creative will be auto-created with the right approval from the buyer. This creative cannot be created through the API. This creative can be updated.

↳ rich_media_studio_creative RichMediaStudioCreativeDetails

Optional. A Creative that is created by a Rich Media Studio. You cannot create this creative, but you can update some fields of this creative.

↳ set_top_box_creative SetTopBoxCreativeDetails

Optional. A Creative that will be served into cable set-top boxes. There are no assets for this creative type, as they are hosted by external cable systems.

↳ template_creative TemplateCreativeDetails

Optional. A Creative that is created by the specified creative template.

↳ third_party_creative ThirdPartyCreativeDetails

Optional. A Creative that is served by a 3rd-party vendor.

↳ vast_redirect_creative VastRedirectCreativeDetails

Optional. A Creative that points to an externally hosted VAST ad and is served via VAST XML as a VAST Wrapper.

↳ video_creative VideoCreativeDetails

Optional. A Creative that contains Ad Manager hosted video ads and is served via VAST XML.

↳ video_redirect_creative VideoRedirectCreativeDetails

Optional. A Creative that contains externally hosted video ads and is served via VAST XML.

↳ name string

Identifier. The resource name of the Creative. Format: networks/{network_code}/creatives/{creative_id}

↳ display_name string

Required. Display name of the Creative. This attribute has a maximum length of 255 characters.

↳ advertiser string

Required. The resource name of the Company, which is of type Company.Type.ADVERTISER, to which this Creative belongs. Format: "networks/{network_code}/companies/{company_id}"

↳ update_time Google\Protobuf\Timestamp

Output only. The instant this Creative was last modified.

↳ custom_field_values array<CustomFieldValue>

Optional. The values of the custom fields associated with this creative.

↳ preview_url string

Output only. The URL of the creative for previewing the media.

↳ size Size

Required. Immutable. The Size of the creative.

↳ third_party_data_declaration ThirdPartyDataDeclaration

Optional. The third party companies associated with this creative. This is distinct from any associated companies that Google may detect programmatically.

↳ third_party_data_declaration_status int

Output only. The status of the publisher's ThirdPartyDataDeclaration, when compared with the set of third party companies detected via automated scanning. For example, if automated scanning detects more companies than have been declared, this status will be CreativeThirdPartyDataDeclarationStatus.INCOMPLETE.

↳ self_declared_european_union_political_content bool

Optional. Whether this creative contains self-declared European Union political content.

↳ ad_badging_enabled bool

Optional. Non-empty default. Whether the creative has ad badging enabled. Defaults to false for VastRedirectCreative, ThirdPartyCreative, AudioRedirectCreative, ProgrammaticCreative, LegacyDfpMobileCreative, FlashOverlayCreative, GraphicalInterstitialCreative, LegacyDfpCreative, MobileAdNetworkCreative, MobileVideoInterstitialCreative, SdkMediationCreative, and FlashCreative types. Defaults to true for all other creative types.

↳ applied_labels array<AppliedLabel>

Optional. The set of labels applied directly to this creative.

↳ buyer_placement_config BuyerPlacementConfig

Optional. The buyer placement configuration for this creative.

getAdExchangeCreative

Optional. An Ad Exchange dynamic allocation creative.

Returns
Type Description
AdExchangeCreativeDetails|null

hasAdExchangeCreative

setAdExchangeCreative

Optional. An Ad Exchange dynamic allocation creative.

Parameter
Name Description
var AdExchangeCreativeDetails
Returns
Type Description
$this

getAdSenseCreative

Optional. An AdSense dynamic allocation creative.

Returns
Type Description
AdSenseCreativeDetails|null

hasAdSenseCreative

setAdSenseCreative

Optional. An AdSense dynamic allocation creative.

Parameter
Name Description
var AdSenseCreativeDetails
Returns
Type Description
$this

getAspectRatioImageCreative

Optional. A Creative intended for mobile platforms that displays an image, whose size is defined as an aspect ratio. It can have multiple images whose dimensions conform to that aspect ratio.

Returns
Type Description
AspectRatioImageCreativeDetails|null

hasAspectRatioImageCreative

setAspectRatioImageCreative

Optional. A Creative intended for mobile platforms that displays an image, whose size is defined as an aspect ratio. It can have multiple images whose dimensions conform to that aspect ratio.

Parameter
Name Description
var AspectRatioImageCreativeDetails
Returns
Type Description
$this

getAudioCreative

Optional. A Creative that contains Ad Manager hosted audio ads and is served via VAST XML.

Returns
Type Description
AudioCreativeDetails|null

hasAudioCreative

setAudioCreative

Optional. A Creative that contains Ad Manager hosted audio ads and is served via VAST XML.

Parameter
Name Description
var AudioCreativeDetails
Returns
Type Description
$this

getAudioRedirectCreative

Optional. A Creative that contains externally hosted audio ads and is served via VAST XML.

Returns
Type Description
AudioRedirectCreativeDetails|null

hasAudioRedirectCreative

setAudioRedirectCreative

Optional. A Creative that contains externally hosted audio ads and is served via VAST XML.

Parameter
Name Description
var AudioRedirectCreativeDetails
Returns
Type Description
$this

getClickTrackingCreative

Optional. A creative that is used for tracking clicks on ads that are served directly from the customers' web servers or media servers. NOTE: The size attribute is not used for click tracking creative and it will not be persisted upon save.

Returns
Type Description
ClickTrackingCreativeDetails|null

hasClickTrackingCreative

setClickTrackingCreative

Optional. A creative that is used for tracking clicks on ads that are served directly from the customers' web servers or media servers. NOTE: The size attribute is not used for click tracking creative and it will not be persisted upon save.

Parameter
Name Description
var ClickTrackingCreativeDetails
Returns
Type Description
$this

getCustomCreative

Optional. A Creative that contains a custom HTML snippet and file assets.

Returns
Type Description
CustomCreativeDetails|null

hasCustomCreative

setCustomCreative

Optional. A Creative that contains a custom HTML snippet and file assets.

Parameter
Name Description
var CustomCreativeDetails
Returns
Type Description
$this

getHtml5Creative

Optional. A Creative that contains a zipped HTML5 bundle asset, a list of third party impression trackers, and a third party click tracker.

Returns
Type Description
Html5CreativeDetails|null

hasHtml5Creative

setHtml5Creative

Optional. A Creative that contains a zipped HTML5 bundle asset, a list of third party impression trackers, and a third party click tracker.

Parameter
Name Description
var Html5CreativeDetails
Returns
Type Description
$this

getImageCreative

Optional. A Creative that displays an image.

Returns
Type Description
ImageCreativeDetails|null

hasImageCreative

setImageCreative

Optional. A Creative that displays an image.

Parameter
Name Description
var ImageCreativeDetails
Returns
Type Description
$this

getImageOverlayCreative

Optional. An overlay Creative that displays an image and is served via VAST 2.0 XML. Overlays cover part of the video content they are displayed on top of.

Returns
Type Description
ImageOverlayCreativeDetails|null

hasImageOverlayCreative

setImageOverlayCreative

Optional. An overlay Creative that displays an image and is served via VAST 2.0 XML. Overlays cover part of the video content they are displayed on top of.

Parameter
Name Description
var ImageOverlayCreativeDetails
Returns
Type Description
$this

getImageRedirectCreative

Optional. A Creative that loads an image asset from a specified URL.

Returns
Type Description
ImageRedirectCreativeDetails|null

hasImageRedirectCreative

setImageRedirectCreative

Optional. A Creative that loads an image asset from a specified URL.

Parameter
Name Description
var ImageRedirectCreativeDetails
Returns
Type Description
$this

getImageRedirectOverlayCreative

Optional. An overlay Creative that loads an image asset from a specified URL and is served via VAST XML. Overlays cover part of the video content they are displayed on top of. This creative is read only.

Returns
Type Description
ImageRedirectOverlayCreativeDetails|null

hasImageRedirectOverlayCreative

setImageRedirectOverlayCreative

Optional. An overlay Creative that loads an image asset from a specified URL and is served via VAST XML. Overlays cover part of the video content they are displayed on top of. This creative is read only.

Parameter
Name Description
var ImageRedirectOverlayCreativeDetails
Returns
Type Description
$this

getInternalRedirectCreative

Optional. A Creative hosted by Campaign Manager 360.

Similar to third-party creatives, a Campaign Manager 360 tag is used to retrieve a creative asset. However, Campaign Manager 360 tags are not sent to the user's browser. Instead, they are processed internally within the Google Marketing Platform system.

Returns
Type Description
InternalRedirectCreativeDetails|null

hasInternalRedirectCreative

setInternalRedirectCreative

Optional. A Creative hosted by Campaign Manager 360.

Similar to third-party creatives, a Campaign Manager 360 tag is used to retrieve a creative asset. However, Campaign Manager 360 tags are not sent to the user's browser. Instead, they are processed internally within the Google Marketing Platform system.

Parameter
Name Description
var InternalRedirectCreativeDetails
Returns
Type Description
$this

getLegacyDfpCreative

Optional. A Creative that isn't supported by Google DFP, but was migrated from DART. Creatives of this type cannot be created or modified.

Returns
Type Description
LegacyDfpCreativeDetails|null

hasLegacyDfpCreative

setLegacyDfpCreative

Optional. A Creative that isn't supported by Google DFP, but was migrated from DART. Creatives of this type cannot be created or modified.

Parameter
Name Description
var LegacyDfpCreativeDetails
Returns
Type Description
$this

getProgrammaticCreative

Optional. A Creative used for programmatic trafficking. This creative will be auto-created with the right approval from the buyer. This creative cannot be created through the API. This creative can be updated.

Returns
Type Description
ProgrammaticCreativeDetails|null

hasProgrammaticCreative

setProgrammaticCreative

Optional. A Creative used for programmatic trafficking. This creative will be auto-created with the right approval from the buyer. This creative cannot be created through the API. This creative can be updated.

Parameter
Name Description
var ProgrammaticCreativeDetails
Returns
Type Description
$this

getRichMediaStudioCreative

Optional. A Creative that is created by a Rich Media Studio. You cannot create this creative, but you can update some fields of this creative.

Returns
Type Description
RichMediaStudioCreativeDetails|null

hasRichMediaStudioCreative

setRichMediaStudioCreative

Optional. A Creative that is created by a Rich Media Studio. You cannot create this creative, but you can update some fields of this creative.

Parameter
Name Description
var RichMediaStudioCreativeDetails
Returns
Type Description
$this

getSetTopBoxCreative

Optional. A Creative that will be served into cable set-top boxes. There are no assets for this creative type, as they are hosted by external cable systems.

Returns
Type Description
SetTopBoxCreativeDetails|null

hasSetTopBoxCreative

setSetTopBoxCreative

Optional. A Creative that will be served into cable set-top boxes. There are no assets for this creative type, as they are hosted by external cable systems.

Parameter
Name Description
var SetTopBoxCreativeDetails
Returns
Type Description
$this

getTemplateCreative

Optional. A Creative that is created by the specified creative template.

Returns
Type Description
TemplateCreativeDetails|null

hasTemplateCreative

setTemplateCreative

Optional. A Creative that is created by the specified creative template.

Parameter
Name Description
var TemplateCreativeDetails
Returns
Type Description
$this

getThirdPartyCreative

Optional. A Creative that is served by a 3rd-party vendor.

Returns
Type Description
ThirdPartyCreativeDetails|null

hasThirdPartyCreative

setThirdPartyCreative

Optional. A Creative that is served by a 3rd-party vendor.

Parameter
Name Description
var ThirdPartyCreativeDetails
Returns
Type Description
$this

getVastRedirectCreative

Optional. A Creative that points to an externally hosted VAST ad and is served via VAST XML as a VAST Wrapper.

Returns
Type Description
VastRedirectCreativeDetails|null

hasVastRedirectCreative

setVastRedirectCreative

Optional. A Creative that points to an externally hosted VAST ad and is served via VAST XML as a VAST Wrapper.

Parameter
Name Description
var VastRedirectCreativeDetails
Returns
Type Description
$this

getVideoCreative

Optional. A Creative that contains Ad Manager hosted video ads and is served via VAST XML.

Returns
Type Description
VideoCreativeDetails|null

hasVideoCreative

setVideoCreative

Optional. A Creative that contains Ad Manager hosted video ads and is served via VAST XML.

Parameter
Name Description
var VideoCreativeDetails
Returns
Type Description
$this

getVideoRedirectCreative

Optional. A Creative that contains externally hosted video ads and is served via VAST XML.

Returns
Type Description
VideoRedirectCreativeDetails|null

hasVideoRedirectCreative

setVideoRedirectCreative

Optional. A Creative that contains externally hosted video ads and is served via VAST XML.

Parameter
Name Description
var VideoRedirectCreativeDetails
Returns
Type Description
$this

getName

Identifier. The resource name of the Creative.

Format: networks/{network_code}/creatives/{creative_id}

Returns
Type Description
string

setName

Identifier. The resource name of the Creative.

Format: networks/{network_code}/creatives/{creative_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

Required. Display name of the Creative. This attribute has a maximum length of 255 characters.

Returns
Type Description
string

hasDisplayName

clearDisplayName

setDisplayName

Required. Display name of the Creative. This attribute has a maximum length of 255 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getAdvertiser

Required. The resource name of the Company, which is of type Company.Type.ADVERTISER, to which this Creative belongs. Format: "networks/{network_code}/companies/{company_id}"

Returns
Type Description
string

hasAdvertiser

clearAdvertiser

setAdvertiser

Required. The resource name of the Company, which is of type Company.Type.ADVERTISER, to which this Creative belongs. Format: "networks/{network_code}/companies/{company_id}"

Parameter
Name Description
var string
Returns
Type Description
$this

getUpdateTime

Output only. The instant this Creative was last modified.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The instant this Creative was last modified.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCustomFieldValues

Optional. The values of the custom fields associated with this creative.

Returns
Type Description
Google\Protobuf\RepeatedField<CustomFieldValue>

setCustomFieldValues

Optional. The values of the custom fields associated with this creative.

Parameter
Name Description
var array<CustomFieldValue>
Returns
Type Description
$this

getPreviewUrl

Output only. The URL of the creative for previewing the media.

Returns
Type Description
string

hasPreviewUrl

clearPreviewUrl

setPreviewUrl

Output only. The URL of the creative for previewing the media.

Parameter
Name Description
var string
Returns
Type Description
$this

getSize

Required. Immutable. The Size of the creative.

Returns
Type Description
Size|null

hasSize

clearSize

setSize

Required. Immutable. The Size of the creative.

Parameter
Name Description
var Size
Returns
Type Description
$this

getThirdPartyDataDeclaration

Optional. The third party companies associated with this creative.

This is distinct from any associated companies that Google may detect programmatically.

Returns
Type Description
ThirdPartyDataDeclaration|null

hasThirdPartyDataDeclaration

clearThirdPartyDataDeclaration

setThirdPartyDataDeclaration

Optional. The third party companies associated with this creative.

This is distinct from any associated companies that Google may detect programmatically.

Parameter
Name Description
var ThirdPartyDataDeclaration
Returns
Type Description
$this

getThirdPartyDataDeclarationStatus

Output only. The status of the publisher's ThirdPartyDataDeclaration, when compared with the set of third party companies detected via automated scanning.

For example, if automated scanning detects more companies than have been declared, this status will be CreativeThirdPartyDataDeclarationStatus.INCOMPLETE.

Returns
Type Description
int

hasThirdPartyDataDeclarationStatus

clearThirdPartyDataDeclarationStatus

setThirdPartyDataDeclarationStatus

Output only. The status of the publisher's ThirdPartyDataDeclaration, when compared with the set of third party companies detected via automated scanning.

For example, if automated scanning detects more companies than have been declared, this status will be CreativeThirdPartyDataDeclarationStatus.INCOMPLETE.

Parameter
Name Description
var int
Returns
Type Description
$this

getSelfDeclaredEuropeanUnionPoliticalContent

Optional. Whether this creative contains self-declared European Union political content.

Returns
Type Description
bool

hasSelfDeclaredEuropeanUnionPoliticalContent

clearSelfDeclaredEuropeanUnionPoliticalContent

setSelfDeclaredEuropeanUnionPoliticalContent

Optional. Whether this creative contains self-declared European Union political content.

Parameter
Name Description
var bool
Returns
Type Description
$this

getAdBadgingEnabled

Optional. Non-empty default. Whether the creative has ad badging enabled.

Defaults to false for VastRedirectCreative, ThirdPartyCreative, AudioRedirectCreative, ProgrammaticCreative, LegacyDfpMobileCreative, FlashOverlayCreative, GraphicalInterstitialCreative, LegacyDfpCreative, MobileAdNetworkCreative, MobileVideoInterstitialCreative, SdkMediationCreative, and FlashCreative types. Defaults to true for all other creative types.

Returns
Type Description
bool

hasAdBadgingEnabled

clearAdBadgingEnabled

setAdBadgingEnabled

Optional. Non-empty default. Whether the creative has ad badging enabled.

Defaults to false for VastRedirectCreative, ThirdPartyCreative, AudioRedirectCreative, ProgrammaticCreative, LegacyDfpMobileCreative, FlashOverlayCreative, GraphicalInterstitialCreative, LegacyDfpCreative, MobileAdNetworkCreative, MobileVideoInterstitialCreative, SdkMediationCreative, and FlashCreative types. Defaults to true for all other creative types.

Parameter
Name Description
var bool
Returns
Type Description
$this

getAppliedLabels

Optional. The set of labels applied directly to this creative.

Returns
Type Description
Google\Protobuf\RepeatedField<AppliedLabel>

setAppliedLabels

Optional. The set of labels applied directly to this creative.

Parameter
Name Description
var array<AppliedLabel>
Returns
Type Description
$this

getBuyerPlacementConfig

Optional. The buyer placement configuration for this creative.

Returns
Type Description
BuyerPlacementConfig|null

hasBuyerPlacementConfig

clearBuyerPlacementConfig

setBuyerPlacementConfig

Optional. The buyer placement configuration for this creative.

Parameter
Name Description
var BuyerPlacementConfig
Returns
Type Description
$this

getDetails

Returns
Type Description
string