Reference documentation and code samples for the Google Ads Ad Manager V1 Client class ListStringCreativeTemplateVariable.
Represents a list variable defined in a creative template. This is similar to StringCreativeTemplateVariable, except that there are possible choices to choose from.
Use StringCreativeTemplateVariableValue to specify the value for this variable when creating a TemplateCreative from a CreativeTemplate.
Generated from protobuf message google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable
Namespace
Google \ Ads \ AdManager \ V1 \ CreativeTemplateVariableMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ default_value |
string
Optional. Default value to be filled in when creating creatives from the creative template. |
↳ sample_value |
string
Optional. Sample value that is used when previewing the template in the UI. |
↳ choices |
array<ListStringCreativeTemplateVariable\VariableChoice>
Optional. The selectable values that the user can choose from. |
↳ allow_other_choice |
bool
Optional. |
getDefaultValue
Optional. Default value to be filled in when creating creatives from the creative template.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDefaultValue
clearDefaultValue
setDefaultValue
Optional. Default value to be filled in when creating creatives from the creative template.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSampleValue
Optional. Sample value that is used when previewing the template in the UI.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSampleValue
clearSampleValue
setSampleValue
Optional. Sample value that is used when previewing the template in the UI.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getChoices
Optional. The selectable values that the user can choose from.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setChoices
Optional. The selectable values that the user can choose from.
| Parameter | |
|---|---|
| Name | Description |
var |
array<ListStringCreativeTemplateVariable\VariableChoice>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAllowOtherChoice
Optional. True if a user can specify an 'other' value. For example, if
a variable called backgroundColor is defined as a list with values: red,
green, blue, this boolean can be set to allow a user to enter a value not
on the list such as purple.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasAllowOtherChoice
clearAllowOtherChoice
setAllowOtherChoice
Optional. True if a user can specify an 'other' value. For example, if
a variable called backgroundColor is defined as a list with values: red,
green, blue, this boolean can be set to allow a user to enter a value not
on the list such as purple.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|