Class: Google::Apis::DfareportingV3_5::Rule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dfareporting_v3_5/classes.rb,
lib/google/apis/dfareporting_v3_5/representations.rb,
lib/google/apis/dfareporting_v3_5/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

Constructor Details

#initialize(**args) ⇒ Rule

Returns a new instance of Rule.



11016
11017
11018
# File 'lib/google/apis/dfareporting_v3_5/classes.rb', line 11016

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

Instance Attribute Details

#asset_idFixnum

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:

  • (Fixnum)


11002
11003
11004
# File 'lib/google/apis/dfareporting_v3_5/classes.rb', line 11002

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)


11007
11008
11009
# File 'lib/google/apis/dfareporting_v3_5/classes.rb', line 11007

def name
  @name
end

#targeting_template_idFixnum

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:

  • (Fixnum)


11014
11015
11016
# File 'lib/google/apis/dfareporting_v3_5/classes.rb', line 11014

def targeting_template_id
  @targeting_template_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11021
11022
11023
11024
11025
# File 'lib/google/apis/dfareporting_v3_5/classes.rb', line 11021

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