google-apis-airquality_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/airquality_v1/classes.rb +1004 -0
- data/lib/google/apis/airquality_v1/gem_version.rb +28 -0
- data/lib/google/apis/airquality_v1/representations.rb +346 -0
- data/lib/google/apis/airquality_v1/service.rb +201 -0
- data/lib/google/apis/airquality_v1.rb +36 -0
- data/lib/google-apis-airquality_v1.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,1004 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module AirqualityV1
|
24
|
+
|
25
|
+
# The emission sources and health effects of a given pollutant.
|
26
|
+
class AdditionalInfo
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Text representing the pollutant's main health effects.
|
30
|
+
# Corresponds to the JSON property `effects`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :effects
|
33
|
+
|
34
|
+
# Text representing the pollutant's main emission sources.
|
35
|
+
# Corresponds to the JSON property `sources`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :sources
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@effects = args[:effects] if args.key?(:effects)
|
46
|
+
@sources = args[:sources] if args.key?(:sources)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# The basic object for representing different air quality metrics. When brought
|
51
|
+
# together, these metrics provide a snapshot about the current air quality
|
52
|
+
# conditions. There are multiple indexes in the world serving different purposes
|
53
|
+
# and groups interested in measuring different aspects of air quality.
|
54
|
+
class AirQualityIndex
|
55
|
+
include Google::Apis::Core::Hashable
|
56
|
+
|
57
|
+
# The index's numeric score. Examples: 10, 100. The value is not normalized and
|
58
|
+
# should only be interpreted in the context of its related air-quality index.
|
59
|
+
# For non-numeric indexes, this field will not be returned. Note: This field
|
60
|
+
# should be used for calculations, graph display, etc. For displaying the index
|
61
|
+
# score, you should use the AQI display field.
|
62
|
+
# Corresponds to the JSON property `aqi`
|
63
|
+
# @return [Fixnum]
|
64
|
+
attr_accessor :aqi
|
65
|
+
|
66
|
+
# Textual representation of the index numeric score, that may include prefix or
|
67
|
+
# suffix symbols, which usually represents the worst index score. Example: >100
|
68
|
+
# or 10+. Note: This field should be used when you want to display the index
|
69
|
+
# score. For non-numeric indexes, this field is empty.
|
70
|
+
# Corresponds to the JSON property `aqiDisplay`
|
71
|
+
# @return [String]
|
72
|
+
attr_accessor :aqi_display
|
73
|
+
|
74
|
+
# Textual classification of the index numeric score interpretation. For example:
|
75
|
+
# "Excellent air quality".
|
76
|
+
# Corresponds to the JSON property `category`
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :category
|
79
|
+
|
80
|
+
# The index's code. This field represents the index for programming purposes by
|
81
|
+
# using snake case instead of spaces. Examples: "uaqi", "fra_atmo".
|
82
|
+
# Corresponds to the JSON property `code`
|
83
|
+
# @return [String]
|
84
|
+
attr_accessor :code
|
85
|
+
|
86
|
+
# Represents a color in the RGBA color space. This representation is designed
|
87
|
+
# for simplicity of conversion to and from color representations in various
|
88
|
+
# languages over compactness. For example, the fields of this representation can
|
89
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
90
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
91
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
92
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't have
|
93
|
+
# information about the absolute color space that should be used to interpret
|
94
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
95
|
+
# applications should assume the sRGB color space. When color equality needs to
|
96
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
97
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
98
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
99
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
100
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
101
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
102
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
103
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
104
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
105
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
106
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
107
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
108
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
109
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
110
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
111
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
112
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
113
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
114
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
115
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
116
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
117
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
118
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
119
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
120
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
121
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
122
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
123
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
124
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
125
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
126
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
127
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
128
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
129
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
130
|
+
# / ...
|
131
|
+
# Corresponds to the JSON property `color`
|
132
|
+
# @return [Google::Apis::AirqualityV1::Color]
|
133
|
+
attr_accessor :color
|
134
|
+
|
135
|
+
# A human readable representation of the index name. Example: "AQI (US)"
|
136
|
+
# Corresponds to the JSON property `displayName`
|
137
|
+
# @return [String]
|
138
|
+
attr_accessor :display_name
|
139
|
+
|
140
|
+
# The chemical symbol of the dominant pollutant. For example: "CO".
|
141
|
+
# Corresponds to the JSON property `dominantPollutant`
|
142
|
+
# @return [String]
|
143
|
+
attr_accessor :dominant_pollutant
|
144
|
+
|
145
|
+
def initialize(**args)
|
146
|
+
update!(**args)
|
147
|
+
end
|
148
|
+
|
149
|
+
# Update properties of this object
|
150
|
+
def update!(**args)
|
151
|
+
@aqi = args[:aqi] if args.key?(:aqi)
|
152
|
+
@aqi_display = args[:aqi_display] if args.key?(:aqi_display)
|
153
|
+
@category = args[:category] if args.key?(:category)
|
154
|
+
@code = args[:code] if args.key?(:code)
|
155
|
+
@color = args[:color] if args.key?(:color)
|
156
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
157
|
+
@dominant_pollutant = args[:dominant_pollutant] if args.key?(:dominant_pollutant)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Represents a color in the RGBA color space. This representation is designed
|
162
|
+
# for simplicity of conversion to and from color representations in various
|
163
|
+
# languages over compactness. For example, the fields of this representation can
|
164
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
165
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
166
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
167
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't have
|
168
|
+
# information about the absolute color space that should be used to interpret
|
169
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
170
|
+
# applications should assume the sRGB color space. When color equality needs to
|
171
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
172
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
173
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
174
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
175
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
176
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
177
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
178
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
179
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
180
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
181
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
182
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
183
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
184
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
185
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
186
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
187
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
188
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
189
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
190
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
191
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
192
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
193
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
194
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
195
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
196
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
197
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
198
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
199
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
200
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
201
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
202
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
203
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
204
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
205
|
+
# / ...
|
206
|
+
class Color
|
207
|
+
include Google::Apis::Core::Hashable
|
208
|
+
|
209
|
+
# The fraction of this color that should be applied to the pixel. That is, the
|
210
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
211
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
212
|
+
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
213
|
+
# completely transparent color. This uses a wrapper message rather than a simple
|
214
|
+
# float scalar so that it is possible to distinguish between a default value and
|
215
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
216
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
217
|
+
# Corresponds to the JSON property `alpha`
|
218
|
+
# @return [Float]
|
219
|
+
attr_accessor :alpha
|
220
|
+
|
221
|
+
# The amount of blue in the color as a value in the interval [0, 1].
|
222
|
+
# Corresponds to the JSON property `blue`
|
223
|
+
# @return [Float]
|
224
|
+
attr_accessor :blue
|
225
|
+
|
226
|
+
# The amount of green in the color as a value in the interval [0, 1].
|
227
|
+
# Corresponds to the JSON property `green`
|
228
|
+
# @return [Float]
|
229
|
+
attr_accessor :green
|
230
|
+
|
231
|
+
# The amount of red in the color as a value in the interval [0, 1].
|
232
|
+
# Corresponds to the JSON property `red`
|
233
|
+
# @return [Float]
|
234
|
+
attr_accessor :red
|
235
|
+
|
236
|
+
def initialize(**args)
|
237
|
+
update!(**args)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Update properties of this object
|
241
|
+
def update!(**args)
|
242
|
+
@alpha = args[:alpha] if args.key?(:alpha)
|
243
|
+
@blue = args[:blue] if args.key?(:blue)
|
244
|
+
@green = args[:green] if args.key?(:green)
|
245
|
+
@red = args[:red] if args.key?(:red)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
# The concentration of a given pollutant in the air.
|
250
|
+
class Concentration
|
251
|
+
include Google::Apis::Core::Hashable
|
252
|
+
|
253
|
+
# Units for measuring this pollutant concentration.
|
254
|
+
# Corresponds to the JSON property `units`
|
255
|
+
# @return [String]
|
256
|
+
attr_accessor :units
|
257
|
+
|
258
|
+
# Value of pollutant concentration.
|
259
|
+
# Corresponds to the JSON property `value`
|
260
|
+
# @return [Float]
|
261
|
+
attr_accessor :value
|
262
|
+
|
263
|
+
def initialize(**args)
|
264
|
+
update!(**args)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Update properties of this object
|
268
|
+
def update!(**args)
|
269
|
+
@units = args[:units] if args.key?(:units)
|
270
|
+
@value = args[:value] if args.key?(:value)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# Expresses a 'country/region to AQI' relationship. Pairs a country/region with
|
275
|
+
# a desired AQI so that air quality data that is required for that country/
|
276
|
+
# region will be displayed according to the chosen AQI.
|
277
|
+
class CustomLocalAqi
|
278
|
+
include Google::Apis::Core::Hashable
|
279
|
+
|
280
|
+
# The AQI to associate the country/region with. Value should be a [valid index](/
|
281
|
+
# maps/documentation/air-quality/laqis) code.
|
282
|
+
# Corresponds to the JSON property `aqi`
|
283
|
+
# @return [String]
|
284
|
+
attr_accessor :aqi
|
285
|
+
|
286
|
+
# The country/region requiring the custom AQI. Value should be provided using [
|
287
|
+
# ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
|
288
|
+
# Corresponds to the JSON property `regionCode`
|
289
|
+
# @return [String]
|
290
|
+
attr_accessor :region_code
|
291
|
+
|
292
|
+
def initialize(**args)
|
293
|
+
update!(**args)
|
294
|
+
end
|
295
|
+
|
296
|
+
# Update properties of this object
|
297
|
+
def update!(**args)
|
298
|
+
@aqi = args[:aqi] if args.key?(:aqi)
|
299
|
+
@region_code = args[:region_code] if args.key?(:region_code)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# Health recommendations for different population groups in a free text format.
|
304
|
+
# The recommendations are derived from their associated air quality conditions.
|
305
|
+
class HealthRecommendations
|
306
|
+
include Google::Apis::Core::Hashable
|
307
|
+
|
308
|
+
# Sports and other strenuous outdoor activities.
|
309
|
+
# Corresponds to the JSON property `athletes`
|
310
|
+
# @return [String]
|
311
|
+
attr_accessor :athletes
|
312
|
+
|
313
|
+
# Younger populations including children, toddlers, and babies.
|
314
|
+
# Corresponds to the JSON property `children`
|
315
|
+
# @return [String]
|
316
|
+
attr_accessor :children
|
317
|
+
|
318
|
+
# Retirees and people older than the general population.
|
319
|
+
# Corresponds to the JSON property `elderly`
|
320
|
+
# @return [String]
|
321
|
+
attr_accessor :elderly
|
322
|
+
|
323
|
+
# No specific sensitivities.
|
324
|
+
# Corresponds to the JSON property `generalPopulation`
|
325
|
+
# @return [String]
|
326
|
+
attr_accessor :general_population
|
327
|
+
|
328
|
+
# Heart and circulatory system diseases.
|
329
|
+
# Corresponds to the JSON property `heartDiseasePopulation`
|
330
|
+
# @return [String]
|
331
|
+
attr_accessor :heart_disease_population
|
332
|
+
|
333
|
+
# Respiratory related problems and asthma suffers.
|
334
|
+
# Corresponds to the JSON property `lungDiseasePopulation`
|
335
|
+
# @return [String]
|
336
|
+
attr_accessor :lung_disease_population
|
337
|
+
|
338
|
+
# Women at all stages of pregnancy.
|
339
|
+
# Corresponds to the JSON property `pregnantWomen`
|
340
|
+
# @return [String]
|
341
|
+
attr_accessor :pregnant_women
|
342
|
+
|
343
|
+
def initialize(**args)
|
344
|
+
update!(**args)
|
345
|
+
end
|
346
|
+
|
347
|
+
# Update properties of this object
|
348
|
+
def update!(**args)
|
349
|
+
@athletes = args[:athletes] if args.key?(:athletes)
|
350
|
+
@children = args[:children] if args.key?(:children)
|
351
|
+
@elderly = args[:elderly] if args.key?(:elderly)
|
352
|
+
@general_population = args[:general_population] if args.key?(:general_population)
|
353
|
+
@heart_disease_population = args[:heart_disease_population] if args.key?(:heart_disease_population)
|
354
|
+
@lung_disease_population = args[:lung_disease_population] if args.key?(:lung_disease_population)
|
355
|
+
@pregnant_women = args[:pregnant_women] if args.key?(:pregnant_women)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
# Contains the air quality information for each hour in the requested range. For
|
360
|
+
# example, if the request is for 48 hours of history there will be 48 elements
|
361
|
+
# of hourly info.
|
362
|
+
class HourInfo
|
363
|
+
include Google::Apis::Core::Hashable
|
364
|
+
|
365
|
+
# A rounded down timestamp indicating the time the data refers to in RFC3339 UTC
|
366
|
+
# "Zulu" format, with nanosecond resolution and up to nine fractional digits.
|
367
|
+
# For example: "2014-10-02T15:00:00Z".
|
368
|
+
# Corresponds to the JSON property `dateTime`
|
369
|
+
# @return [String]
|
370
|
+
attr_accessor :date_time
|
371
|
+
|
372
|
+
# Health recommendations for different population groups in a free text format.
|
373
|
+
# The recommendations are derived from their associated air quality conditions.
|
374
|
+
# Corresponds to the JSON property `healthRecommendations`
|
375
|
+
# @return [Google::Apis::AirqualityV1::HealthRecommendations]
|
376
|
+
attr_accessor :health_recommendations
|
377
|
+
|
378
|
+
# Based on the request parameters, this list will include (up to) two air
|
379
|
+
# quality indexes: - Universal AQI. Will be returned if the universalAqi boolean
|
380
|
+
# is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra
|
381
|
+
# computation is specified.
|
382
|
+
# Corresponds to the JSON property `indexes`
|
383
|
+
# @return [Array<Google::Apis::AirqualityV1::AirQualityIndex>]
|
384
|
+
attr_accessor :indexes
|
385
|
+
|
386
|
+
# A list of pollutants affecting the location specified in the request. Note:
|
387
|
+
# This field will be returned only for requests that specified one or more of
|
388
|
+
# the following extra computations: POLLUTANT_ADDITIONAL_INFO,
|
389
|
+
# DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
|
390
|
+
# Corresponds to the JSON property `pollutants`
|
391
|
+
# @return [Array<Google::Apis::AirqualityV1::Pollutant>]
|
392
|
+
attr_accessor :pollutants
|
393
|
+
|
394
|
+
def initialize(**args)
|
395
|
+
update!(**args)
|
396
|
+
end
|
397
|
+
|
398
|
+
# Update properties of this object
|
399
|
+
def update!(**args)
|
400
|
+
@date_time = args[:date_time] if args.key?(:date_time)
|
401
|
+
@health_recommendations = args[:health_recommendations] if args.key?(:health_recommendations)
|
402
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
403
|
+
@pollutants = args[:pollutants] if args.key?(:pollutants)
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
407
|
+
# Contains the air quality information for each hour in the requested range. For
|
408
|
+
# example, if the request is for 48 hours of forecast there will be 48 elements
|
409
|
+
# of hourly forecasts.
|
410
|
+
class HourlyForecast
|
411
|
+
include Google::Apis::Core::Hashable
|
412
|
+
|
413
|
+
# A rounded down timestamp indicating the time (hour) the data refers to in
|
414
|
+
# RFC3339 UTC "Zulu" format. For example: "2014-10-02T15:00:00Z".
|
415
|
+
# Corresponds to the JSON property `dateTime`
|
416
|
+
# @return [String]
|
417
|
+
attr_accessor :date_time
|
418
|
+
|
419
|
+
# Health recommendations for different population groups in a free text format.
|
420
|
+
# The recommendations are derived from their associated air quality conditions.
|
421
|
+
# Corresponds to the JSON property `healthRecommendations`
|
422
|
+
# @return [Google::Apis::AirqualityV1::HealthRecommendations]
|
423
|
+
attr_accessor :health_recommendations
|
424
|
+
|
425
|
+
# Based on the request parameters, this list will include (up to) two air
|
426
|
+
# quality indexes: - Universal AQI. Will be returned if the `universal_aqi`
|
427
|
+
# boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra
|
428
|
+
# computation is specified.
|
429
|
+
# Corresponds to the JSON property `indexes`
|
430
|
+
# @return [Array<Google::Apis::AirqualityV1::AirQualityIndex>]
|
431
|
+
attr_accessor :indexes
|
432
|
+
|
433
|
+
# A list of pollutants affecting the location specified in the request. Note:
|
434
|
+
# This field will be returned only for requests that specified one or more of
|
435
|
+
# the following extra computations: POLLUTANT_ADDITIONAL_INFO,
|
436
|
+
# DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
|
437
|
+
# Corresponds to the JSON property `pollutants`
|
438
|
+
# @return [Array<Google::Apis::AirqualityV1::Pollutant>]
|
439
|
+
attr_accessor :pollutants
|
440
|
+
|
441
|
+
def initialize(**args)
|
442
|
+
update!(**args)
|
443
|
+
end
|
444
|
+
|
445
|
+
# Update properties of this object
|
446
|
+
def update!(**args)
|
447
|
+
@date_time = args[:date_time] if args.key?(:date_time)
|
448
|
+
@health_recommendations = args[:health_recommendations] if args.key?(:health_recommendations)
|
449
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
450
|
+
@pollutants = args[:pollutants] if args.key?(:pollutants)
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
# Message that represents an arbitrary HTTP body. It should only be used for
|
455
|
+
# payload formats that can't be represented as JSON, such as raw binary or an
|
456
|
+
# HTML page. This message can be used both in streaming and non-streaming API
|
457
|
+
# methods in the request as well as the response. It can be used as a top-level
|
458
|
+
# request field, which is convenient if one wants to extract parameters from
|
459
|
+
# either the URL or HTTP template into the request fields and also want access
|
460
|
+
# to the raw HTTP body. Example: message GetResourceRequest ` // A unique
|
461
|
+
# request id. string request_id = 1; // The raw HTTP body is bound to this field.
|
462
|
+
# google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
|
463
|
+
# GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
|
464
|
+
# UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
|
465
|
+
# with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
|
466
|
+
# api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
|
467
|
+
# google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
|
468
|
+
# only changes how the request and response bodies are handled, all other
|
469
|
+
# features will continue to work unchanged.
|
470
|
+
class HttpBody
|
471
|
+
include Google::Apis::Core::Hashable
|
472
|
+
|
473
|
+
# The HTTP Content-Type header value specifying the content type of the body.
|
474
|
+
# Corresponds to the JSON property `contentType`
|
475
|
+
# @return [String]
|
476
|
+
attr_accessor :content_type
|
477
|
+
|
478
|
+
# The HTTP request/response body as raw binary.
|
479
|
+
# Corresponds to the JSON property `data`
|
480
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
481
|
+
# @return [String]
|
482
|
+
attr_accessor :data
|
483
|
+
|
484
|
+
# Application specific response metadata. Must be set in the first response for
|
485
|
+
# streaming APIs.
|
486
|
+
# Corresponds to the JSON property `extensions`
|
487
|
+
# @return [Array<Hash<String,Object>>]
|
488
|
+
attr_accessor :extensions
|
489
|
+
|
490
|
+
def initialize(**args)
|
491
|
+
update!(**args)
|
492
|
+
end
|
493
|
+
|
494
|
+
# Update properties of this object
|
495
|
+
def update!(**args)
|
496
|
+
@content_type = args[:content_type] if args.key?(:content_type)
|
497
|
+
@data = args[:data] if args.key?(:data)
|
498
|
+
@extensions = args[:extensions] if args.key?(:extensions)
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
# Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
503
|
+
# Timestamp end (exclusive). The start must be less than or equal to the end.
|
504
|
+
# When the start equals the end, the interval is empty (matches no time). When
|
505
|
+
# both start and end are unspecified, the interval matches any time.
|
506
|
+
class Interval
|
507
|
+
include Google::Apis::Core::Hashable
|
508
|
+
|
509
|
+
# Optional. Exclusive end of the interval. If specified, a Timestamp matching
|
510
|
+
# this interval will have to be before the end.
|
511
|
+
# Corresponds to the JSON property `endTime`
|
512
|
+
# @return [String]
|
513
|
+
attr_accessor :end_time
|
514
|
+
|
515
|
+
# Optional. Inclusive start of the interval. If specified, a Timestamp matching
|
516
|
+
# this interval will have to be the same or after the start.
|
517
|
+
# Corresponds to the JSON property `startTime`
|
518
|
+
# @return [String]
|
519
|
+
attr_accessor :start_time
|
520
|
+
|
521
|
+
def initialize(**args)
|
522
|
+
update!(**args)
|
523
|
+
end
|
524
|
+
|
525
|
+
# Update properties of this object
|
526
|
+
def update!(**args)
|
527
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
528
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
532
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
533
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
534
|
+
# specified otherwise, this object must conform to the WGS84 standard. Values
|
535
|
+
# must be within normalized ranges.
|
536
|
+
class LatLng
|
537
|
+
include Google::Apis::Core::Hashable
|
538
|
+
|
539
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
540
|
+
# Corresponds to the JSON property `latitude`
|
541
|
+
# @return [Float]
|
542
|
+
attr_accessor :latitude
|
543
|
+
|
544
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
545
|
+
# Corresponds to the JSON property `longitude`
|
546
|
+
# @return [Float]
|
547
|
+
attr_accessor :longitude
|
548
|
+
|
549
|
+
def initialize(**args)
|
550
|
+
update!(**args)
|
551
|
+
end
|
552
|
+
|
553
|
+
# Update properties of this object
|
554
|
+
def update!(**args)
|
555
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
556
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
557
|
+
end
|
558
|
+
end
|
559
|
+
|
560
|
+
# The request definition of the air quality current conditions.
|
561
|
+
class LookupCurrentConditionsRequest
|
562
|
+
include Google::Apis::Core::Hashable
|
563
|
+
|
564
|
+
# Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/
|
565
|
+
# region with a desired AQI so that air quality data that is required for that
|
566
|
+
# country/region will be displayed according to the chosen AQI. This parameter
|
567
|
+
# can be used to specify a non-default AQI for a given country, for example, to
|
568
|
+
# get the US EPA index for Canada rather than the default index for Canada.
|
569
|
+
# Corresponds to the JSON property `customLocalAqis`
|
570
|
+
# @return [Array<Google::Apis::AirqualityV1::CustomLocalAqi>]
|
571
|
+
attr_accessor :custom_local_aqis
|
572
|
+
|
573
|
+
# Optional. Additional features that can be optionally enabled. Specifying extra
|
574
|
+
# computations will result in the relevant elements and fields to be returned in
|
575
|
+
# the response.
|
576
|
+
# Corresponds to the JSON property `extraComputations`
|
577
|
+
# @return [Array<String>]
|
578
|
+
attr_accessor :extra_computations
|
579
|
+
|
580
|
+
# Optional. Allows the client to choose the language for the response. If data
|
581
|
+
# cannot be provided for that language the API uses the closest match. Allowed
|
582
|
+
# values rely on the IETF standard. Default value is en.
|
583
|
+
# Corresponds to the JSON property `languageCode`
|
584
|
+
# @return [String]
|
585
|
+
attr_accessor :language_code
|
586
|
+
|
587
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
588
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
589
|
+
# specified otherwise, this object must conform to the WGS84 standard. Values
|
590
|
+
# must be within normalized ranges.
|
591
|
+
# Corresponds to the JSON property `location`
|
592
|
+
# @return [Google::Apis::AirqualityV1::LatLng]
|
593
|
+
attr_accessor :location
|
594
|
+
|
595
|
+
# Optional. Determines the color palette used for data provided by the '
|
596
|
+
# Universal Air Quality Index' (UAQI). This color palette is relevant just for
|
597
|
+
# UAQI, other AQIs have a predetermined color palette that can't be controlled.
|
598
|
+
# Corresponds to the JSON property `uaqiColorPalette`
|
599
|
+
# @return [String]
|
600
|
+
attr_accessor :uaqi_color_palette
|
601
|
+
|
602
|
+
# Optional. If set to true, the Universal AQI will be included in the 'indexes'
|
603
|
+
# field of the response. Default value is true.
|
604
|
+
# Corresponds to the JSON property `universalAqi`
|
605
|
+
# @return [Boolean]
|
606
|
+
attr_accessor :universal_aqi
|
607
|
+
alias_method :universal_aqi?, :universal_aqi
|
608
|
+
|
609
|
+
def initialize(**args)
|
610
|
+
update!(**args)
|
611
|
+
end
|
612
|
+
|
613
|
+
# Update properties of this object
|
614
|
+
def update!(**args)
|
615
|
+
@custom_local_aqis = args[:custom_local_aqis] if args.key?(:custom_local_aqis)
|
616
|
+
@extra_computations = args[:extra_computations] if args.key?(:extra_computations)
|
617
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
618
|
+
@location = args[:location] if args.key?(:location)
|
619
|
+
@uaqi_color_palette = args[:uaqi_color_palette] if args.key?(:uaqi_color_palette)
|
620
|
+
@universal_aqi = args[:universal_aqi] if args.key?(:universal_aqi)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
#
|
625
|
+
class LookupCurrentConditionsResponse
|
626
|
+
include Google::Apis::Core::Hashable
|
627
|
+
|
628
|
+
# A rounded down timestamp in RFC3339 UTC "Zulu" format, with nanosecond
|
629
|
+
# resolution and up to nine fractional digits. For example: "2014-10-02T15:00:
|
630
|
+
# 00Z".
|
631
|
+
# Corresponds to the JSON property `dateTime`
|
632
|
+
# @return [String]
|
633
|
+
attr_accessor :date_time
|
634
|
+
|
635
|
+
# Health recommendations for different population groups in a free text format.
|
636
|
+
# The recommendations are derived from their associated air quality conditions.
|
637
|
+
# Corresponds to the JSON property `healthRecommendations`
|
638
|
+
# @return [Google::Apis::AirqualityV1::HealthRecommendations]
|
639
|
+
attr_accessor :health_recommendations
|
640
|
+
|
641
|
+
# Based on the request parameters, this list will include (up to) two air
|
642
|
+
# quality indexes: - Universal AQI. Will be returned if the universalAqi boolean
|
643
|
+
# is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra
|
644
|
+
# computation is specified.
|
645
|
+
# Corresponds to the JSON property `indexes`
|
646
|
+
# @return [Array<Google::Apis::AirqualityV1::AirQualityIndex>]
|
647
|
+
attr_accessor :indexes
|
648
|
+
|
649
|
+
# A list of pollutants affecting the location specified in the request. Note:
|
650
|
+
# This field will be returned only for requests that specified one or more of
|
651
|
+
# the following extra computations: POLLUTANT_ADDITIONAL_INFO,
|
652
|
+
# DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
|
653
|
+
# Corresponds to the JSON property `pollutants`
|
654
|
+
# @return [Array<Google::Apis::AirqualityV1::Pollutant>]
|
655
|
+
attr_accessor :pollutants
|
656
|
+
|
657
|
+
# The ISO_3166-1 alpha-2 code of the country/region corresponding to the
|
658
|
+
# location provided in the request. This field might be omitted from the
|
659
|
+
# response if the location provided in the request resides in a disputed
|
660
|
+
# territory.
|
661
|
+
# Corresponds to the JSON property `regionCode`
|
662
|
+
# @return [String]
|
663
|
+
attr_accessor :region_code
|
664
|
+
|
665
|
+
def initialize(**args)
|
666
|
+
update!(**args)
|
667
|
+
end
|
668
|
+
|
669
|
+
# Update properties of this object
|
670
|
+
def update!(**args)
|
671
|
+
@date_time = args[:date_time] if args.key?(:date_time)
|
672
|
+
@health_recommendations = args[:health_recommendations] if args.key?(:health_recommendations)
|
673
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
674
|
+
@pollutants = args[:pollutants] if args.key?(:pollutants)
|
675
|
+
@region_code = args[:region_code] if args.key?(:region_code)
|
676
|
+
end
|
677
|
+
end
|
678
|
+
|
679
|
+
# The request object of the air quality forecast API.
|
680
|
+
class LookupForecastRequest
|
681
|
+
include Google::Apis::Core::Hashable
|
682
|
+
|
683
|
+
# Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/
|
684
|
+
# region with a desired AQI so that air quality data that is required for that
|
685
|
+
# country/region will be displayed according to the chosen AQI. This parameter
|
686
|
+
# can be used to specify a non-default AQI for a given country, for example, to
|
687
|
+
# get the US EPA index for Canada rather than the default index for Canada.
|
688
|
+
# Corresponds to the JSON property `customLocalAqis`
|
689
|
+
# @return [Array<Google::Apis::AirqualityV1::CustomLocalAqi>]
|
690
|
+
attr_accessor :custom_local_aqis
|
691
|
+
|
692
|
+
# A timestamp for which to return the data for a specific point in time. The
|
693
|
+
# timestamp is rounded to the previous exact hour. Note: this will return hourly
|
694
|
+
# data for the requested timestamp only (i.e. a single hourly info element). For
|
695
|
+
# example, a request sent where the date_time parameter is set to 2023-01-03T11:
|
696
|
+
# 05:49Z will be rounded down to 2023-01-03T11:00:00Z.
|
697
|
+
# Corresponds to the JSON property `dateTime`
|
698
|
+
# @return [String]
|
699
|
+
attr_accessor :date_time
|
700
|
+
|
701
|
+
# Optional. Additional features that can be optionally enabled. Specifying extra
|
702
|
+
# computations will result in the relevant elements and fields to be returned in
|
703
|
+
# the response.
|
704
|
+
# Corresponds to the JSON property `extraComputations`
|
705
|
+
# @return [Array<String>]
|
706
|
+
attr_accessor :extra_computations
|
707
|
+
|
708
|
+
# Optional. Allows the client to choose the language for the response. If data
|
709
|
+
# cannot be provided for that language the API uses the closest match. Allowed
|
710
|
+
# values rely on the IETF standard (default = 'en').
|
711
|
+
# Corresponds to the JSON property `languageCode`
|
712
|
+
# @return [String]
|
713
|
+
attr_accessor :language_code
|
714
|
+
|
715
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
716
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
717
|
+
# specified otherwise, this object must conform to the WGS84 standard. Values
|
718
|
+
# must be within normalized ranges.
|
719
|
+
# Corresponds to the JSON property `location`
|
720
|
+
# @return [Google::Apis::AirqualityV1::LatLng]
|
721
|
+
attr_accessor :location
|
722
|
+
|
723
|
+
# Optional. The maximum number of hourly info records to return per page (
|
724
|
+
# default = 24).
|
725
|
+
# Corresponds to the JSON property `pageSize`
|
726
|
+
# @return [Fixnum]
|
727
|
+
attr_accessor :page_size
|
728
|
+
|
729
|
+
# Optional. A page token received from a previous forecast call. It is used to
|
730
|
+
# retrieve the subsequent page.
|
731
|
+
# Corresponds to the JSON property `pageToken`
|
732
|
+
# @return [String]
|
733
|
+
attr_accessor :page_token
|
734
|
+
|
735
|
+
# Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
736
|
+
# Timestamp end (exclusive). The start must be less than or equal to the end.
|
737
|
+
# When the start equals the end, the interval is empty (matches no time). When
|
738
|
+
# both start and end are unspecified, the interval matches any time.
|
739
|
+
# Corresponds to the JSON property `period`
|
740
|
+
# @return [Google::Apis::AirqualityV1::Interval]
|
741
|
+
attr_accessor :period
|
742
|
+
|
743
|
+
# Optional. Determines the color palette used for data provided by the '
|
744
|
+
# Universal Air Quality Index' (UAQI). This color palette is relevant just for
|
745
|
+
# UAQI, other AQIs have a predetermined color palette that can't be controlled.
|
746
|
+
# Corresponds to the JSON property `uaqiColorPalette`
|
747
|
+
# @return [String]
|
748
|
+
attr_accessor :uaqi_color_palette
|
749
|
+
|
750
|
+
# Optional. If set to true, the Universal AQI will be included in the 'indexes'
|
751
|
+
# field of the response (default = true).
|
752
|
+
# Corresponds to the JSON property `universalAqi`
|
753
|
+
# @return [Boolean]
|
754
|
+
attr_accessor :universal_aqi
|
755
|
+
alias_method :universal_aqi?, :universal_aqi
|
756
|
+
|
757
|
+
def initialize(**args)
|
758
|
+
update!(**args)
|
759
|
+
end
|
760
|
+
|
761
|
+
# Update properties of this object
|
762
|
+
def update!(**args)
|
763
|
+
@custom_local_aqis = args[:custom_local_aqis] if args.key?(:custom_local_aqis)
|
764
|
+
@date_time = args[:date_time] if args.key?(:date_time)
|
765
|
+
@extra_computations = args[:extra_computations] if args.key?(:extra_computations)
|
766
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
767
|
+
@location = args[:location] if args.key?(:location)
|
768
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
769
|
+
@page_token = args[:page_token] if args.key?(:page_token)
|
770
|
+
@period = args[:period] if args.key?(:period)
|
771
|
+
@uaqi_color_palette = args[:uaqi_color_palette] if args.key?(:uaqi_color_palette)
|
772
|
+
@universal_aqi = args[:universal_aqi] if args.key?(:universal_aqi)
|
773
|
+
end
|
774
|
+
end
|
775
|
+
|
776
|
+
# The response object of the air quality forecast API.
|
777
|
+
class LookupForecastResponse
|
778
|
+
include Google::Apis::Core::Hashable
|
779
|
+
|
780
|
+
# Optional. Contains the air quality information for each hour in the requested
|
781
|
+
# range. For example, if the request is for 48 hours of forecast there will be
|
782
|
+
# 48 elements of hourly forecasts.
|
783
|
+
# Corresponds to the JSON property `hourlyForecasts`
|
784
|
+
# @return [Array<Google::Apis::AirqualityV1::HourlyForecast>]
|
785
|
+
attr_accessor :hourly_forecasts
|
786
|
+
|
787
|
+
# Optional. The token to retrieve the next page.
|
788
|
+
# Corresponds to the JSON property `nextPageToken`
|
789
|
+
# @return [String]
|
790
|
+
attr_accessor :next_page_token
|
791
|
+
|
792
|
+
# Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to
|
793
|
+
# the location provided in the request. This field might be omitted from the
|
794
|
+
# response if the location provided in the request resides in a disputed
|
795
|
+
# territory.
|
796
|
+
# Corresponds to the JSON property `regionCode`
|
797
|
+
# @return [String]
|
798
|
+
attr_accessor :region_code
|
799
|
+
|
800
|
+
def initialize(**args)
|
801
|
+
update!(**args)
|
802
|
+
end
|
803
|
+
|
804
|
+
# Update properties of this object
|
805
|
+
def update!(**args)
|
806
|
+
@hourly_forecasts = args[:hourly_forecasts] if args.key?(:hourly_forecasts)
|
807
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
808
|
+
@region_code = args[:region_code] if args.key?(:region_code)
|
809
|
+
end
|
810
|
+
end
|
811
|
+
|
812
|
+
# The request object of the air quality history API.
|
813
|
+
class LookupHistoryRequest
|
814
|
+
include Google::Apis::Core::Hashable
|
815
|
+
|
816
|
+
# Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/
|
817
|
+
# region with a desired AQI so that air quality data that is required for that
|
818
|
+
# country/region will be displayed according to the chosen AQI. This parameter
|
819
|
+
# can be used to specify a non-default AQI for a given country, for example, to
|
820
|
+
# get the US EPA index for Canada rather than the default index for Canada.
|
821
|
+
# Corresponds to the JSON property `customLocalAqis`
|
822
|
+
# @return [Array<Google::Apis::AirqualityV1::CustomLocalAqi>]
|
823
|
+
attr_accessor :custom_local_aqis
|
824
|
+
|
825
|
+
# A timestamp for which to return historical data. The timestamp is rounded to
|
826
|
+
# the previous exact hour. Note: this will return hourly data for the requested
|
827
|
+
# timestamp only (i.e. a single hourly info element). For example, a request
|
828
|
+
# sent where the dateTime parameter is set to 2023-01-03T11:05:49Z will be
|
829
|
+
# rounded down to 2023-01-03T11:00:00Z. A timestamp in RFC3339 UTC "Zulu" format,
|
830
|
+
# with nanosecond resolution and up to nine fractional digits. Examples: "2014-
|
831
|
+
# 10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
|
832
|
+
# Corresponds to the JSON property `dateTime`
|
833
|
+
# @return [String]
|
834
|
+
attr_accessor :date_time
|
835
|
+
|
836
|
+
# Optional. Additional features that can be optionally enabled. Specifying extra
|
837
|
+
# computations will result in the relevant elements and fields to be returned in
|
838
|
+
# the response.
|
839
|
+
# Corresponds to the JSON property `extraComputations`
|
840
|
+
# @return [Array<String>]
|
841
|
+
attr_accessor :extra_computations
|
842
|
+
|
843
|
+
# Number from 1 to 720 that indicates the hours range for the request. For
|
844
|
+
# example: A value of 48 will yield data from the last 48 hours.
|
845
|
+
# Corresponds to the JSON property `hours`
|
846
|
+
# @return [Fixnum]
|
847
|
+
attr_accessor :hours
|
848
|
+
|
849
|
+
# Optional. Allows the client to choose the language for the response. If data
|
850
|
+
# cannot be provided for that language the API uses the closest match. Allowed
|
851
|
+
# values rely on the IETF standard. Default value is en.
|
852
|
+
# Corresponds to the JSON property `languageCode`
|
853
|
+
# @return [String]
|
854
|
+
attr_accessor :language_code
|
855
|
+
|
856
|
+
# An object that represents a latitude/longitude pair. This is expressed as a
|
857
|
+
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
858
|
+
# specified otherwise, this object must conform to the WGS84 standard. Values
|
859
|
+
# must be within normalized ranges.
|
860
|
+
# Corresponds to the JSON property `location`
|
861
|
+
# @return [Google::Apis::AirqualityV1::LatLng]
|
862
|
+
attr_accessor :location
|
863
|
+
|
864
|
+
# Optional. The maximum number of hourly info records to return per page. The
|
865
|
+
# default is 72 and the max value is 168 (7 days of data).
|
866
|
+
# Corresponds to the JSON property `pageSize`
|
867
|
+
# @return [Fixnum]
|
868
|
+
attr_accessor :page_size
|
869
|
+
|
870
|
+
# Optional. A page token received from a previous history call. It is used to
|
871
|
+
# retrieve the subsequent page. Note that when providing a value for this
|
872
|
+
# parameter all other parameters provided must match the call that provided the
|
873
|
+
# page token (the previous call).
|
874
|
+
# Corresponds to the JSON property `pageToken`
|
875
|
+
# @return [String]
|
876
|
+
attr_accessor :page_token
|
877
|
+
|
878
|
+
# Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
879
|
+
# Timestamp end (exclusive). The start must be less than or equal to the end.
|
880
|
+
# When the start equals the end, the interval is empty (matches no time). When
|
881
|
+
# both start and end are unspecified, the interval matches any time.
|
882
|
+
# Corresponds to the JSON property `period`
|
883
|
+
# @return [Google::Apis::AirqualityV1::Interval]
|
884
|
+
attr_accessor :period
|
885
|
+
|
886
|
+
# Optional. Determines the color palette used for data provided by the '
|
887
|
+
# Universal Air Quality Index' (UAQI). This color palette is relevant just for
|
888
|
+
# UAQI, other AQIs have a predetermined color palette that can't be controlled.
|
889
|
+
# Corresponds to the JSON property `uaqiColorPalette`
|
890
|
+
# @return [String]
|
891
|
+
attr_accessor :uaqi_color_palette
|
892
|
+
|
893
|
+
# Optional. If set to true, the Universal AQI will be included in the 'indexes'
|
894
|
+
# field of the response. Default value is true.
|
895
|
+
# Corresponds to the JSON property `universalAqi`
|
896
|
+
# @return [Boolean]
|
897
|
+
attr_accessor :universal_aqi
|
898
|
+
alias_method :universal_aqi?, :universal_aqi
|
899
|
+
|
900
|
+
def initialize(**args)
|
901
|
+
update!(**args)
|
902
|
+
end
|
903
|
+
|
904
|
+
# Update properties of this object
|
905
|
+
def update!(**args)
|
906
|
+
@custom_local_aqis = args[:custom_local_aqis] if args.key?(:custom_local_aqis)
|
907
|
+
@date_time = args[:date_time] if args.key?(:date_time)
|
908
|
+
@extra_computations = args[:extra_computations] if args.key?(:extra_computations)
|
909
|
+
@hours = args[:hours] if args.key?(:hours)
|
910
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
911
|
+
@location = args[:location] if args.key?(:location)
|
912
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
913
|
+
@page_token = args[:page_token] if args.key?(:page_token)
|
914
|
+
@period = args[:period] if args.key?(:period)
|
915
|
+
@uaqi_color_palette = args[:uaqi_color_palette] if args.key?(:uaqi_color_palette)
|
916
|
+
@universal_aqi = args[:universal_aqi] if args.key?(:universal_aqi)
|
917
|
+
end
|
918
|
+
end
|
919
|
+
|
920
|
+
#
|
921
|
+
class LookupHistoryResponse
|
922
|
+
include Google::Apis::Core::Hashable
|
923
|
+
|
924
|
+
# Optional. Contains the air quality information for each hour in the requested
|
925
|
+
# range. For example, if the request is for 48 hours of history there will be 48
|
926
|
+
# elements of hourly info.
|
927
|
+
# Corresponds to the JSON property `hoursInfo`
|
928
|
+
# @return [Array<Google::Apis::AirqualityV1::HourInfo>]
|
929
|
+
attr_accessor :hours_info
|
930
|
+
|
931
|
+
# Optional. The token to retrieve the next page.
|
932
|
+
# Corresponds to the JSON property `nextPageToken`
|
933
|
+
# @return [String]
|
934
|
+
attr_accessor :next_page_token
|
935
|
+
|
936
|
+
# Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to
|
937
|
+
# the location provided in the request. This field might be omitted from the
|
938
|
+
# response if the location provided in the request resides in a disputed
|
939
|
+
# territory.
|
940
|
+
# Corresponds to the JSON property `regionCode`
|
941
|
+
# @return [String]
|
942
|
+
attr_accessor :region_code
|
943
|
+
|
944
|
+
def initialize(**args)
|
945
|
+
update!(**args)
|
946
|
+
end
|
947
|
+
|
948
|
+
# Update properties of this object
|
949
|
+
def update!(**args)
|
950
|
+
@hours_info = args[:hours_info] if args.key?(:hours_info)
|
951
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
952
|
+
@region_code = args[:region_code] if args.key?(:region_code)
|
953
|
+
end
|
954
|
+
end
|
955
|
+
|
956
|
+
# Data regarding an air quality pollutant.
|
957
|
+
class Pollutant
|
958
|
+
include Google::Apis::Core::Hashable
|
959
|
+
|
960
|
+
# The emission sources and health effects of a given pollutant.
|
961
|
+
# Corresponds to the JSON property `additionalInfo`
|
962
|
+
# @return [Google::Apis::AirqualityV1::AdditionalInfo]
|
963
|
+
attr_accessor :additional_info
|
964
|
+
|
965
|
+
# The pollutant's code name. For example: "so2". A list of all available codes
|
966
|
+
# could be found [here](/maps/documentation/air-quality/pollutants#
|
967
|
+
# reported_pollutants).
|
968
|
+
# Corresponds to the JSON property `code`
|
969
|
+
# @return [String]
|
970
|
+
attr_accessor :code
|
971
|
+
|
972
|
+
# The concentration of a given pollutant in the air.
|
973
|
+
# Corresponds to the JSON property `concentration`
|
974
|
+
# @return [Google::Apis::AirqualityV1::Concentration]
|
975
|
+
attr_accessor :concentration
|
976
|
+
|
977
|
+
# The pollutant's display name. For example: "NOx".
|
978
|
+
# Corresponds to the JSON property `displayName`
|
979
|
+
# @return [String]
|
980
|
+
attr_accessor :display_name
|
981
|
+
|
982
|
+
# The pollutant's full name. For chemical compounds, this is the IUPAC name.
|
983
|
+
# Example: "Sulfur Dioxide". For more information about the IUPAC names table,
|
984
|
+
# see https://iupac.org/what-we-do/periodic-table-of-elements/
|
985
|
+
# Corresponds to the JSON property `fullName`
|
986
|
+
# @return [String]
|
987
|
+
attr_accessor :full_name
|
988
|
+
|
989
|
+
def initialize(**args)
|
990
|
+
update!(**args)
|
991
|
+
end
|
992
|
+
|
993
|
+
# Update properties of this object
|
994
|
+
def update!(**args)
|
995
|
+
@additional_info = args[:additional_info] if args.key?(:additional_info)
|
996
|
+
@code = args[:code] if args.key?(:code)
|
997
|
+
@concentration = args[:concentration] if args.key?(:concentration)
|
998
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
999
|
+
@full_name = args[:full_name] if args.key?(:full_name)
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
end
|
1003
|
+
end
|
1004
|
+
end
|