Class: Google::Apis::DfareportingV2_6::Rule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dfareporting_v2_6/classes.rb,
generated/google/apis/dfareporting_v2_6/representations.rb,
generated/google/apis/dfareporting_v2_6/representations.rb

Overview

A rule associates an asset with a targeting template for asset-level targeting. Applicable to INSTREAM_VIDEO creatives.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Rule

Returns a new instance of Rule.


10268
10269
10270
# File 'generated/google/apis/dfareporting_v2_6/classes.rb', line 10268

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#asset_idString

A creativeAssets[].id. This should refer to one of the parent assets in this creative. This is a required field. Corresponds to the JSON property assetId

Returns:

  • (String)

10254
10255
10256
# File 'generated/google/apis/dfareporting_v2_6/classes.rb', line 10254

def asset_id
  @asset_id
end

#nameString

A user-friendly name for this rule. This is a required field. Corresponds to the JSON property name

Returns:

  • (String)

10259
10260
10261
# File 'generated/google/apis/dfareporting_v2_6/classes.rb', line 10259

def name
  @name
end

#targeting_template_idString

A targeting template ID. The targeting from the targeting template will be used to determine whether this asset should be served. This is a required field. Corresponds to the JSON property targetingTemplateId

Returns:

  • (String)

10266
10267
10268
# File 'generated/google/apis/dfareporting_v2_6/classes.rb', line 10266

def targeting_template_id
  @targeting_template_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


10273
10274
10275
10276
10277
# File 'generated/google/apis/dfareporting_v2_6/classes.rb', line 10273

def update!(**args)
  @asset_id = args[:asset_id] if args.key?(:asset_id)
  @name = args[:name] if args.key?(:name)
  @targeting_template_id = args[:targeting_template_id] if args.key?(:targeting_template_id)
end