Class: Google::Apis::DfareportingV4::CreativeAssetSelection

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

Overview

Encapsulates the list of rules for asset selection and a default asset in case none of the rules match. Applicable to INSTREAM_VIDEO creatives.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CreativeAssetSelection

Returns a new instance of CreativeAssetSelection.



4316
4317
4318
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 4316

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

Instance Attribute Details

#default_asset_idFixnum

A creativeAssets[].id. This should refer to one of the parent assets in this creative, and will be served if none of the rules match. This is a required field. Corresponds to the JSON property defaultAssetId

Returns:

  • (Fixnum)


4307
4308
4309
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 4307

def default_asset_id
  @default_asset_id
end

#rulesArray<Google::Apis::DfareportingV4::Rule>

Rules determine which asset will be served to a viewer. Rules will be evaluated in the order in which they are stored in this list. This list must contain at least one rule. Applicable to INSTREAM_VIDEO creatives. Corresponds to the JSON property rules



4314
4315
4316
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 4314

def rules
  @rules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4321
4322
4323
4324
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 4321

def update!(**args)
  @default_asset_id = args[:default_asset_id] if args.key?(:default_asset_id)
  @rules = args[:rules] if args.key?(:rules)
end