Class: Google::Apis::AirqualityV1::CustomLocalAqi
- Inherits:
-
Object
- Object
- Google::Apis::AirqualityV1::CustomLocalAqi
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/airquality_v1/classes.rb,
lib/google/apis/airquality_v1/representations.rb,
lib/google/apis/airquality_v1/representations.rb
Overview
Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/ region will be displayed according to the chosen AQI.
Instance Attribute Summary collapse
-
#aqi ⇒ String
The AQI to associate the country/region with.
-
#region_code ⇒ String
The country/region requiring the custom AQI.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CustomLocalAqi
constructor
A new instance of CustomLocalAqi.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CustomLocalAqi
Returns a new instance of CustomLocalAqi.
292 293 294 |
# File 'lib/google/apis/airquality_v1/classes.rb', line 292 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aqi ⇒ String
The AQI to associate the country/region with. Value should be a valid index code.
Corresponds to the JSON property aqi
284 285 286 |
# File 'lib/google/apis/airquality_v1/classes.rb', line 284 def aqi @aqi end |
#region_code ⇒ String
The country/region requiring the custom AQI. Value should be provided using
ISO 3166-1 alpha-2 code.
Corresponds to the JSON property regionCode
290 291 292 |
# File 'lib/google/apis/airquality_v1/classes.rb', line 290 def region_code @region_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
297 298 299 300 |
# File 'lib/google/apis/airquality_v1/classes.rb', line 297 def update!(**args) @aqi = args[:aqi] if args.key?(:aqi) @region_code = args[:region_code] if args.key?(:region_code) end |