Class: Google::Apis::YoutubePartnerV1::CountriesRestriction

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CountriesRestriction

Returns a new instance of CountriesRestriction.



1619
1620
1621
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1619

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

Instance Attribute Details

#ad_formatsArray<String>

A list of ad formats that can be used in the specified countries. Corresponds to the JSON property adFormats

Returns:

  • (Array<String>)


1611
1612
1613
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1611

def ad_formats
  @ad_formats
end

#territoriesArray<String>

A list of ISO 3166-1 alpha-2 country codes that identify the countries where ads are enabled. Corresponds to the JSON property territories

Returns:

  • (Array<String>)


1617
1618
1619
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1617

def territories
  @territories
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1624
1625
1626
1627
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1624

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