Reference documentation and code samples for the Google Ads Ad Manager V1 Client class NativeStyle.
Used to define the look and feel of native ads, for both web and apps. Native styles determine how native creatives look for a segment of inventory.
Generated from protobuf message google.ads.admanager.v1.NativeStyle
Namespace
Google \ Ads \ AdManager \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Identifier. The resource name of the |
↳ creative_template |
string
Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}" |
↳ display_name |
string
Required. The display name of the native style. This attribute has a maximum length of 255 characters. |
↳ html_snippet |
string
Optional. The HTML snippet of the native style with placeholders for the associated variables. |
↳ css_snippet |
string
Optional. The CSS snippet of the native style, with placeholders for the associated variables. |
↳ targeting |
Targeting
Optional. The targeting criteria for this native style. |
↳ status |
int
Output only. The status of the native style. |
↳ size |
Size
Required. The size of the native style. |
getName
Identifier. The resource name of the NativeStyle.
Format: networks/{network_code}/nativeStyles/{native_style_id}
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Identifier. The resource name of the NativeStyle.
Format: networks/{network_code}/nativeStyles/{native_style_id}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreativeTemplate
Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}"
| Returns | |
|---|---|
| Type | Description |
string |
|
hasCreativeTemplate
clearCreativeTemplate
setCreativeTemplate
Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}"
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDisplayName
Required. The display name of the native style. This attribute has a maximum length of 255 characters.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDisplayName
clearDisplayName
setDisplayName
Required. The display name of the native style. This attribute has a maximum length of 255 characters.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getHtmlSnippet
Optional. The HTML snippet of the native style with placeholders for the associated variables.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasHtmlSnippet
clearHtmlSnippet
setHtmlSnippet
Optional. The HTML snippet of the native style with placeholders for the associated variables.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCssSnippet
Optional. The CSS snippet of the native style, with placeholders for the associated variables.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasCssSnippet
clearCssSnippet
setCssSnippet
Optional. The CSS snippet of the native style, with placeholders for the associated variables.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargeting
Optional. The targeting criteria for this native style.
| Returns | |
|---|---|
| Type | Description |
Targeting|null |
|
hasTargeting
clearTargeting
setTargeting
Optional. The targeting criteria for this native style.
| Parameter | |
|---|---|
| Name | Description |
var |
Targeting
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getStatus
Output only. The status of the native style.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasStatus
clearStatus
setStatus
Output only. The status of the native style.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSize
Required. The size of the native style.
| Returns | |
|---|---|
| Type | Description |
Size|null |
|
hasSize
clearSize
setSize
Required. The size of the native style.
| Parameter | |
|---|---|
| Name | Description |
var |
Size
|
| Returns | |
|---|---|
| Type | Description |
$this |
|