Class: Google::Apis::DfareportingV4::CustomViewabilityMetricConfiguration

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

The attributes, like playtime and percent onscreen, that define the Custom Viewability Metric.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CustomViewabilityMetricConfiguration

Returns a new instance of CustomViewabilityMetricConfiguration.



5180
5181
5182
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5180

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

Instance Attribute Details

#audibleBoolean Also known as: audible?

Whether the video must be audible to count an impression. Corresponds to the JSON property audible

Returns:

  • (Boolean)


5157
5158
5159
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5157

def audible
  @audible
end

#time_millisFixnum

The time in milliseconds the video must play for the Custom Viewability Metric to count an impression. If both this and timePercent are specified, the earlier of the two will be used. Corresponds to the JSON property timeMillis

Returns:

  • (Fixnum)


5165
5166
5167
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5165

def time_millis
  @time_millis
end

#time_percentFixnum

The percentage of video that must play for the Custom Viewability Metric to count an impression. If both this and timeMillis are specified, the earlier of the two will be used. Corresponds to the JSON property timePercent

Returns:

  • (Fixnum)


5172
5173
5174
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5172

def time_percent
  @time_percent
end

#viewability_percentFixnum

The percentage of video that must be on screen for the Custom Viewability Metric to count an impression. Corresponds to the JSON property viewabilityPercent

Returns:

  • (Fixnum)


5178
5179
5180
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5178

def viewability_percent
  @viewability_percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5185
5186
5187
5188
5189
5190
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 5185

def update!(**args)
  @audible = args[:audible] if args.key?(:audible)
  @time_millis = args[:time_millis] if args.key?(:time_millis)
  @time_percent = args[:time_percent] if args.key?(:time_percent)
  @viewability_percent = args[:viewability_percent] if args.key?(:viewability_percent)
end