Class: Google::Apis::Searchads360V23::GoogleAdsSearchads360V23CommonFrequencyCapKey

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

Overview

A group of fields used as keys for a frequency cap. There can be no more than one frequency cap with the same key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAdsSearchads360V23CommonFrequencyCapKey

Returns a new instance of GoogleAdsSearchads360V23CommonFrequencyCapKey.



5254
5255
5256
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5254

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

Instance Attribute Details

#event_typeString

The type of event that the cap applies to (for example, impression). Corresponds to the JSON property eventType

Returns:

  • (String)


5236
5237
5238
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5236

def event_type
  @event_type
end

#levelString

The level on which the cap is to be applied (for example, ad group ad, ad group). The cap is applied to all the entities of this level. Corresponds to the JSON property level

Returns:

  • (String)


5242
5243
5244
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5242

def level
  @level
end

#time_lengthFixnum

Number of time units the cap lasts. Corresponds to the JSON property timeLength

Returns:

  • (Fixnum)


5247
5248
5249
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5247

def time_length
  @time_length
end

#time_unitString

Unit of time the cap is defined at (for example, day, week). Corresponds to the JSON property timeUnit

Returns:

  • (String)


5252
5253
5254
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5252

def time_unit
  @time_unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5259
5260
5261
5262
5263
5264
# File 'lib/google/apis/searchads360_v23/classes.rb', line 5259

def update!(**args)
  @event_type = args[:event_type] if args.key?(:event_type)
  @level = args[:level] if args.key?(:level)
  @time_length = args[:time_length] if args.key?(:time_length)
  @time_unit = args[:time_unit] if args.key?(:time_unit)
end