Class: Google::Apis::AdsenseV2::AdUnit
- Inherits:
-
Object
- Object
- Google::Apis::AdsenseV2::AdUnit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/adsense_v2/classes.rb,
lib/google/apis/adsense_v2/representations.rb,
lib/google/apis/adsense_v2/representations.rb
Overview
Representation of an ad unit. An ad unit represents a saved ad unit with a specific set of ad settings that have been customized within an account.
Instance Attribute Summary collapse
-
#content_ads_settings ⇒ Google::Apis::AdsenseV2::ContentAdsSettings
Settings specific to content ads (AFC).
-
#display_name ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#reporting_dimension_id ⇒ String
Output only.
-
#state ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AdUnit
constructor
A new instance of AdUnit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AdUnit
Returns a new instance of AdUnit.
222 223 224 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 222 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content_ads_settings ⇒ Google::Apis::AdsenseV2::ContentAdsSettings
Settings specific to content ads (AFC).
Corresponds to the JSON property contentAdsSettings
197 198 199 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 197 def content_ads_settings @content_ads_settings end |
#display_name ⇒ String
Required. Display name of the ad unit, as provided when the ad unit was
created.
Corresponds to the JSON property displayName
203 204 205 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 203 def display_name @display_name end |
#name ⇒ String
Output only. Resource name of the ad unit. Format: accounts/account
/
adclients/adclient
/adunits/adunit
Corresponds to the JSON property name
209 210 211 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 209 def name @name end |
#reporting_dimension_id ⇒ String
Output only. Unique ID of the ad unit as used in the AD_UNIT_ID
reporting
dimension.
Corresponds to the JSON property reportingDimensionId
215 216 217 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 215 def reporting_dimension_id @reporting_dimension_id end |
#state ⇒ String
Required. State of the ad unit.
Corresponds to the JSON property state
220 221 222 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 220 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
227 228 229 230 231 232 233 |
# File 'lib/google/apis/adsense_v2/classes.rb', line 227 def update!(**args) @content_ads_settings = args[:content_ads_settings] if args.key?(:content_ads_settings) @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id) @state = args[:state] if args.key?(:state) end |