Class: PinterestSdkClient::AdGroupUpdateRequest

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/pinterest_sdk/models/ad_group_update_request.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ AdGroupUpdateRequest

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 202

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdGroupUpdateRequest` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::AdGroupUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'bid_multiplier')
    self.bid_multiplier = attributes[:'bid_multiplier']
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  else
    self.id = nil
  end

  if attributes.key?(:'targeting_spec_operations')
    if (value = attributes[:'targeting_spec_operations']).is_a?(Array)
      self.targeting_spec_operations = value
    end
  end

  if attributes.key?(:'auto_targeting_enabled')
    self.auto_targeting_enabled = attributes[:'auto_targeting_enabled']
  end

  if attributes.key?(:'bid_in_micro_currency')
    self.bid_in_micro_currency = attributes[:'bid_in_micro_currency']
  end

  if attributes.key?(:'bid_strategy_type')
    self.bid_strategy_type = attributes[:'bid_strategy_type']
  end

  if attributes.key?(:'billable_event')
    self.billable_event = attributes[:'billable_event']
  end

  if attributes.key?(:'budget_in_micro_currency')
    self.budget_in_micro_currency = attributes[:'budget_in_micro_currency']
  end

  if attributes.key?(:'budget_type')
    self.budget_type = attributes[:'budget_type']
  end

  if attributes.key?(:'campaign_id')
    self.campaign_id = attributes[:'campaign_id']
  end

  if attributes.key?(:'end_time')
    self.end_time = attributes[:'end_time']
  end

  if attributes.key?(:'is_creative_optimization')
    self.is_creative_optimization = attributes[:'is_creative_optimization']
  end

  if attributes.key?(:'lifetime_frequency_cap')
    self.lifetime_frequency_cap = attributes[:'lifetime_frequency_cap']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'optimization_goal_metadata')
    self. = attributes[:'optimization_goal_metadata']
  end

  if attributes.key?(:'pacing_delivery_type')
    self.pacing_delivery_type = attributes[:'pacing_delivery_type']
  end

  if attributes.key?(:'placement_group')
    self.placement_group = attributes[:'placement_group']
  end

  if attributes.key?(:'promotion_application_level')
    self.promotion_application_level = attributes[:'promotion_application_level']
  end

  if attributes.key?(:'promotion_id')
    self.promotion_id = attributes[:'promotion_id']
  else
    self.promotion_id = '0'
  end

  if attributes.key?(:'promotion_ids')
    if (value = attributes[:'promotion_ids']).is_a?(Array)
      self.promotion_ids = value
    end
  end

  if attributes.key?(:'start_time')
    self.start_time = attributes[:'start_time']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'targeting_spec')
    self.targeting_spec = attributes[:'targeting_spec']
  end

  if attributes.key?(:'targeting_template_ids')
    if (value = attributes[:'targeting_template_ids']).is_a?(Array)
      self.targeting_template_ids = value
    end
  end

  if attributes.key?(:'tracking_urls')
    self.tracking_urls = attributes[:'tracking_urls']
  end
end

Instance Attribute Details

#auto_targeting_enabledObject

Enable auto-targeting for ad group. Default value is True. Also known as <a href="https://help.pinterest.com/en/business/article/performance-plus-targeting" target="_blank">"Pinterest Performance+ targeting".



28
29
30
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 28

def auto_targeting_enabled
  @auto_targeting_enabled
end

#bid_in_micro_currencyObject

Bid price in micro currency. This field is REQUIRED for the following campaign objective_type/billable_event combinations: AWARENESS/IMPRESSION, CONSIDERATION/CLICKTHROUGH, CATALOG_SALES/CLICKTHROUGH.



31
32
33
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 31

def bid_in_micro_currency
  @bid_in_micro_currency
end

#bid_multiplierObject

<a href="/docs/getting-started/using-beta-and-restricted-features/" target="blank>Open beta Bid multiplier for ad group. This value is a double between 0.1 and 10.0. Enter 0 to remove the bid multiplier. - Make sure the bid_strategy type for your ad group is set to AUTOMATIC_BID. - Not currently supported for <a href="/docs/api-features/pinterest-performance-plus-setup/" target="blank">Pinterest Performance+ campaigns.



19
20
21
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 19

def bid_multiplier
  @bid_multiplier
end

#bid_strategy_typeObject

Returns the value of attribute bid_strategy_type.



33
34
35
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 33

def bid_strategy_type
  @bid_strategy_type
end

#billable_eventObject

Returns the value of attribute billable_event.



35
36
37
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 35

def billable_event
  @billable_event
end

#budget_in_micro_currencyObject

Budget in micro currency. This field is REQUIRED for non-CBO (campaign budget optimization) campaigns. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. A CBO campaign is limited to 70 or less ad groups.



38
39
40
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 38

def budget_in_micro_currency
  @budget_in_micro_currency
end

#budget_typeObject

Returns the value of attribute budget_type.



40
41
42
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 40

def budget_type
  @budget_type
end

#campaign_idObject

Campaign ID of the ad group.



43
44
45
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 43

def campaign_id
  @campaign_id
end

#end_timeObject

Timestamp in Unix format for scheduling when ads in the ad group stop appearing. If not specified, ads run indefinitely unless you update the ad group by changing their status to paused. Cannot occur after end_time for parent campaign (if specified). Learn about <a href="/docs/api-features/managing-ads/#step-2-create-an-ad-group" target="blank">scheduling ads. For certain organizations (<a href="/docs/getting-started/using-beta-and-restricted-features/" target="blank" target="blank">Closed beta): Supported for campaigns with Campaign Budget Optimization (CBO). For all organizations: Supported for campaigns without CBO.



46
47
48
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 46

def end_time
  @end_time
end

#idObject

Ad group ID.



22
23
24
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 22

def id
  @id
end

#is_creative_optimizationObject

Enable creative optimization for the ad group, default value is FALSE. When enabled, you allow Pinterest to automatically turn your product Pins into ads in different formats (collections and shopping) and deliver those ads to users at scale.



49
50
51
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 49

def is_creative_optimization
  @is_creative_optimization
end

#lifetime_frequency_capObject

Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href="/docs/redoc/#section/Billable-event">billable_event value. This field REQUIRES the end_time field.



52
53
54
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 52

def lifetime_frequency_cap
  @lifetime_frequency_cap
end

#nameObject

Ad group name.



55
56
57
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 55

def name
  @name
end

#optimization_goal_metadataObject

Optimization goals for objective-based performance campaigns. REQUIRED when campaign's objective_type is set to \"WEB_CONVERSION\".



58
59
60
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 58

def 
  @optimization_goal_metadata
end

#pacing_delivery_typeObject

Returns the value of attribute pacing_delivery_type.



60
61
62
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 60

def pacing_delivery_type
  @pacing_delivery_type
end

#placement_groupObject

<a href="/docs/redoc/#section/Placement-group">Placement group.



63
64
65
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 63

def placement_group
  @placement_group
end

#promotion_application_levelObject

Specify if the promotion is applied at ad group or item level



66
67
68
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 66

def promotion_application_level
  @promotion_application_level
end

#promotion_idObject

Promotion ID. To clear this field, set to null.



69
70
71
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 69

def promotion_id
  @promotion_id
end

#promotion_idsObject

Promotion IDs list. To clear this field, set to an empty array [].



72
73
74
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 72

def promotion_ids
  @promotion_ids
end

#start_timeObject

Timestamp in Unix format for scheduling when ads in the ad group start to appear. If not specified, ads appear during parent campaign's start_time. Cannot precede start_time for parent campaign (if specified). Learn about <a href="/docs/api-features/managing-ads/#step-2-create-an-ad-group" target="blank">scheduling ads. For certain organizations (<a href="/docs/getting-started/using-beta-and-restricted-features/" target="blank" target="blank">Closed beta): Supported for campaigns with Campaign Budget Optimization (CBO). For all organizations: Supported for campaigns without CBO.



75
76
77
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 75

def start_time
  @start_time
end

#statusObject

Ad group/entity status.



78
79
80
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 78

def status
  @status
end

#targeting_specObject

Returns the value of attribute targeting_spec.



80
81
82
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 80

def targeting_spec
  @targeting_spec
end

#targeting_spec_operationsObject

Targeting spec operations define modifications to apply to the targeting spec.

NOTE: The targeting_spec and targeting_spec_operations cannot be sent at the same time.

The supported operations are:
  • SET: sets the field with the given values. If value is set to null, the field will be removed.
  • ADD: adds the given values to the field.
  • REMOVE: removes the given values from the field.
Note the following:
  • Same items are not added and removed at the same time.
  • For a given field, only ADD/REMOVE or SET operations are allowed, not a mix of them.
  • Only one SET operation is allowed for a given field.
  • The AGE_BUCKET, MAXIMUM_AGE, MINIMUM_AGE and SHOPPING_RETARGETING fields only support the SET operation.


25
26
27
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 25

def targeting_spec_operations
  @targeting_spec_operations
end

#targeting_template_idsObject

Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].



83
84
85
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 83

def targeting_template_ids
  @targeting_template_ids
end

#tracking_urlsObject

Third-party tracking URLs.
JSON object with the format: href=\"/docs/redoc/#section/Tracking-URL-event\">Tracking event enum\":[URL string array],...
For example: [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"].
Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - EmptyObject - to remove tracking URLs.

For more information, see <a href="https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking" target="_blank">Third-party and dynamic tracking.



86
87
88
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 86

def tracking_urls
  @tracking_urls
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



142
143
144
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 142

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



147
148
149
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 147

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 111

def self.attribute_map
  {
    :'bid_multiplier' => :'bid_multiplier',
    :'id' => :'id',
    :'targeting_spec_operations' => :'targeting_spec_operations',
    :'auto_targeting_enabled' => :'auto_targeting_enabled',
    :'bid_in_micro_currency' => :'bid_in_micro_currency',
    :'bid_strategy_type' => :'bid_strategy_type',
    :'billable_event' => :'billable_event',
    :'budget_in_micro_currency' => :'budget_in_micro_currency',
    :'budget_type' => :'budget_type',
    :'campaign_id' => :'campaign_id',
    :'end_time' => :'end_time',
    :'is_creative_optimization' => :'is_creative_optimization',
    :'lifetime_frequency_cap' => :'lifetime_frequency_cap',
    :'name' => :'name',
    :'optimization_goal_metadata' => :'optimization_goal_metadata',
    :'pacing_delivery_type' => :'pacing_delivery_type',
    :'placement_group' => :'placement_group',
    :'promotion_application_level' => :'promotion_application_level',
    :'promotion_id' => :'promotion_id',
    :'promotion_ids' => :'promotion_ids',
    :'start_time' => :'start_time',
    :'status' => :'status',
    :'targeting_spec' => :'targeting_spec',
    :'targeting_template_ids' => :'targeting_template_ids',
    :'tracking_urls' => :'tracking_urls'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 508

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 183

def self.openapi_nullable
  Set.new([
    :'auto_targeting_enabled',
    :'bid_in_micro_currency',
    :'bid_strategy_type',
    :'budget_in_micro_currency',
    :'end_time',
    :'is_creative_optimization',
    :'optimization_goal_metadata',
    :'promotion_application_level',
    :'promotion_id',
    :'start_time',
    :'targeting_template_ids',
    :'tracking_urls'
  ])
end

.openapi_typesObject

Attribute type mapping.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 152

def self.openapi_types
  {
    :'bid_multiplier' => :'Float',
    :'id' => :'String',
    :'targeting_spec_operations' => :'Array<TargetingSpecOperations>',
    :'auto_targeting_enabled' => :'Boolean',
    :'bid_in_micro_currency' => :'Integer',
    :'bid_strategy_type' => :'BidStrategyType',
    :'billable_event' => :'ActionType',
    :'budget_in_micro_currency' => :'Integer',
    :'budget_type' => :'BudgetType',
    :'campaign_id' => :'String',
    :'end_time' => :'Integer',
    :'is_creative_optimization' => :'Boolean',
    :'lifetime_frequency_cap' => :'Integer',
    :'name' => :'String',
    :'optimization_goal_metadata' => :'Object',
    :'pacing_delivery_type' => :'PacingDeliveryType',
    :'placement_group' => :'PlacementGroupType',
    :'promotion_application_level' => :'String',
    :'promotion_id' => :'String',
    :'promotion_ids' => :'Array<String>',
    :'start_time' => :'Integer',
    :'status' => :'EntityStatus',
    :'targeting_spec' => :'TargetingSpec',
    :'targeting_template_ids' => :'Array<String>',
    :'tracking_urls' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 463

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      bid_multiplier == o.bid_multiplier &&
      id == o.id &&
      targeting_spec_operations == o.targeting_spec_operations &&
      auto_targeting_enabled == o.auto_targeting_enabled &&
      bid_in_micro_currency == o.bid_in_micro_currency &&
      bid_strategy_type == o.bid_strategy_type &&
      billable_event == o.billable_event &&
      budget_in_micro_currency == o.budget_in_micro_currency &&
      budget_type == o.budget_type &&
      campaign_id == o.campaign_id &&
      end_time == o.end_time &&
      is_creative_optimization == o.is_creative_optimization &&
      lifetime_frequency_cap == o.lifetime_frequency_cap &&
      name == o.name &&
       == o. &&
      pacing_delivery_type == o.pacing_delivery_type &&
      placement_group == o.placement_group &&
      promotion_application_level == o.promotion_application_level &&
      promotion_id == o.promotion_id &&
      promotion_ids == o.promotion_ids &&
      start_time == o.start_time &&
      status == o.status &&
      targeting_spec == o.targeting_spec &&
      targeting_template_ids == o.targeting_template_ids &&
      tracking_urls == o.tracking_urls
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


495
496
497
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 495

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



501
502
503
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 501

def hash
  [bid_multiplier, id, targeting_spec_operations, auto_targeting_enabled, bid_in_micro_currency, bid_strategy_type, billable_event, budget_in_micro_currency, budget_type, campaign_id, end_time, is_creative_optimization, lifetime_frequency_cap, name, , pacing_delivery_type, placement_group, promotion_application_level, promotion_id, promotion_ids, start_time, status, targeting_spec, targeting_template_ids, tracking_urls].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 329

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if !@bid_multiplier.nil? && @bid_multiplier > 10
    invalid_properties.push('invalid value for "bid_multiplier", must be smaller than or equal to 10.')
  end

  if !@bid_multiplier.nil? && @bid_multiplier < 0
    invalid_properties.push('invalid value for "bid_multiplier", must be greater than or equal to 0.')
  end

  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  pattern = Regexp.new(/^\d+$/)
  if @id !~ pattern
    invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[C]?\d+$/)
  if !@campaign_id.nil? && @campaign_id !~ pattern
    invalid_properties.push("invalid value for \"campaign_id\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^\d+$/)
  if !@promotion_id.nil? && @promotion_id !~ pattern
    invalid_properties.push("invalid value for \"promotion_id\", must conform to the pattern #{pattern}.")
  end

  if !@targeting_template_ids.nil? && @targeting_template_ids.length > 1
    invalid_properties.push('invalid value for "targeting_template_ids", number of items must be less than or equal to 1.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 530

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/pinterest_sdk/models/ad_group_update_request.rb', line 368

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if !@bid_multiplier.nil? && @bid_multiplier > 10
  return false if !@bid_multiplier.nil? && @bid_multiplier < 0
  return false if @id.nil?
  return false if @id !~ Regexp.new(/^\d+$/)
  return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/^[C]?\d+$/)
  promotion_application_level_validator = EnumAttributeValidator.new('String', ["NONE", "ITEM", "AD_GROUP"])
  return false unless promotion_application_level_validator.valid?(@promotion_application_level)
  return false if !@promotion_id.nil? && @promotion_id !~ Regexp.new(/^\d+$/)
  return false if !@targeting_template_ids.nil? && @targeting_template_ids.length > 1
  true
end